/* ========================================
   File upload / Dropzone (from source.css)
   ======================================== */

.modal-body input[type="file"].form-control {
    padding: 0;
    height: auto;
    border: 2px dashed var(--border-color);
    background: var(--surface-1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-body input[type="file"].form-control:hover {
    border-color: var(--primary-color);
    background: var(--color-primary-50);
}

.modal-body input[type="file"].form-control:focus {
    border-color: var(--primary-color);
    background: var(--color-primary-50);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-body input[type="file"].form-control::file-selector-button {
    padding: 12px 20px;
    margin-right: 16px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-body input[type="file"].form-control::file-selector-button:hover {
    background: var(--primary-dark);
}

.modal-body input[type="file"].form-control {
    font-size: 14px;
    color: var(--text-secondary);
    padding-right: 16px;
}

input[type="file"].form-control {
    padding: 0;
    height: auto;
    border: 2px dashed var(--border-color);
    background: var(--surface-1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"].form-control:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.04);
}

input[type="file"].form-control::file-selector-button {
    padding: 12px 20px;
    margin-right: 16px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="file"].form-control::file-selector-button:hover {
    background: var(--primary-dark);
}

.file-dropzone {
    position: relative;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.file-dropzone:hover {
    border-color: #2563eb;
    background: #f3f4f6;
}

.file-dropzone.dragover {
    border-color: #2563eb;
    border-style: solid;
    background: #eff6ff;
}

.file-dropzone-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-dropzone-content {
    pointer-events: none;
}

.file-dropzone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: #2563eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-dropzone-icon i {
    font-size: 20px;
    color: #ffffff;
}

.file-dropzone:hover .file-dropzone-icon {
    background: #1d4ed8;
}

.file-dropzone.dragover .file-dropzone-icon {
    background: #1d4ed8;
}

.file-dropzone-text {
    margin-bottom: 8px;
}

.file-dropzone-primary {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.file-dropzone-secondary {
    font-size: 13px;
    color: #6b7280;
}

.file-dropzone-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: underline;
}

.file-dropzone:hover .file-dropzone-link {
    color: #1d4ed8;
}

.file-dropzone-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

.file-dropzone-files {
    margin-top: 16px;
    text-align: left;
}

.file-dropzone-files:empty {
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 8px;
}

.file-item:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item-icon i {
    font-size: 16px;
    color: #2563eb;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 12px;
    color: #6b7280;
}

.file-item-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.file-item-remove:hover {
    background: #fef2f2;
    color: #dc2626;
}
