/* Local Fonts (Outfit) - Removed to allow theme inheritance */
/* 
@font-face blocks removed to prevent loading unused fonts
*/

:root {
    --ecu-primary: #6366f1;
    --ecu-primary-dark: #4f46e5;
    --ecu-surface: #ffffff;
    --ecu-bg: #f8fafc;
    --ecu-text: #1e293b;
    --ecu-text-muted: #64748b;
    --ecu-border: #e2e8f0;
    --ecu-radius: 16px;
    --ecu-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.ecu-upload-form-wrapper {
    font-family: inherit;
    max-width: 480px;
    margin: 60px auto;
    padding: 40px;
    background: var(--ecu-surface);
    border-radius: var(--ecu-radius);
    box-shadow: var(--ecu-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* Ensure inputs and buttons inherit the font (Divi override support) */
.ecu-upload-form-wrapper input,
.ecu-upload-form-wrapper button,
.ecu-upload-form-wrapper select,
.ecu-upload-form-wrapper textarea {
    font-family: inherit;
}

/* Subtle accent line on top */
/* Gradient Line */
.ecu-upload-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--ecu-primary), var(--ecu-secondary));
}

.ecu-upload-form-wrapper h2 {
    font-weight: 600;
    color: var(--ecu-text);
    margin-bottom: 24px;
    text-align: center;
}

.ecu-field-group {
    margin-bottom: 24px;
}

.ecu-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ecu-text);
    transition: color 0.2s;
}

.ecu-field-group input[type="text"],
.ecu-field-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ecu-border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--ecu-text);
    background: #fdfdfd;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.ecu-field-group input[type="text"]:focus,
.ecu-field-group input[type="email"]:focus {
    border-color: var(--ecu-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Modern File Selection Button */
.ecu-file-select-btn {
    display: inline-block;
    padding: 10px 16px;
    background-color: #f1f5f9;
    color: var(--ecu-text);
    border: 1px dashed var(--ecu-border);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ecu-file-select-btn:hover {
    background-color: #e2e8f0;
    border-color: var(--ecu-text-muted);
}

/* Checkbox Style */
.ecu-field-group.checkbox {
    margin-top: 10px;
}

.ecu-field-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--ecu-text-muted);
    cursor: pointer;
}

.ecu-field-group.checkbox input[type="checkbox"] {
    accent-color: var(--ecu-primary);
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

/* Button */
.ecu-button {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--ecu-primary), var(--ecu-secondary));
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.ecu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.ecu-button:active {
    transform: translateY(0);
}

.ecu-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.ecu-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.ecu-progress-bar .bar {
    height: 100%;
    background: var(--ecu-primary);
    width: 0%;
    transition: width 0.3s;
}

/* Messages */
.ecu-message {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.ecu-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ecu-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File Preview Styles */
.ecu-file-preview {
    margin-top: 15px;
    background: #f8fafc;
    border: 1px solid var(--ecu-border);
    border-radius: 8px;
    padding: 15px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.ecu-file-preview h4 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: var(--ecu-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecu-file-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecu-file-preview li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    margin-bottom: 6px;
    border-radius: 6px;
}

.ecu-file-preview li:last-child {
    margin-bottom: 0;
}

.ecu-file-preview .ecu-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ecu-file-preview .ecu-thumb-placeholder {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 6px;
}

.ecu-file-preview .ecu-file-info {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    overflow: hidden;
    flex: 1;
}

.ecu-file-preview .ecu-filename {
    font-weight: 500;
    color: var(--ecu-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ecu-file-preview .ecu-filesize {
    color: var(--ecu-text-muted);
    font-size: 0.75rem;
}

.ecu-remove-file {
    font-size: 20px;
    color: #ef4444;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.ecu-remove-file:hover {
    background: #fee2e2;
}