/* ===== UPLOAD AREA - PDFQuick ===== */

/* Input file COMPLETAMENTE nascosto */
.pdfq-file-input-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Nasconde QUALSIASI input file nativo che potrebbe essere rimasto */
input[type="file"]:not(.pdfq-file-input-hidden) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    clip: rect(0, 0, 0, 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Area upload principale */
.pdfq-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    margin: 24px auto;
    max-width: 600px;
    background: #ffffff;
    border: 2px dashed #99f6e4;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

/* Hover */
.pdfq-upload-area:hover {
    border-color: #14b8a6;
    background: #f0fdfa;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}

/* Drag over */
.pdfq-upload-area.drag-over {
    border-color: #0d9488;
    border-style: solid;
    background: #f0fdfa;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
    transform: scale(1.01);
}

/* Icona */
.pdfq-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: #f0fdfa;
    border-radius: 16px;
    margin-bottom: 20px;
    color: #0d9488;
    transition: all 0.2s ease;
}

.pdfq-upload-area:hover .pdfq-upload-icon {
    background: #ccfbf1;
    transform: translateY(-2px);
}

.pdfq-upload-area.drag-over .pdfq-upload-icon {
    background: #99f6e4;
    animation: pdfq-bounce 0.5s ease;
}

/* Titolo */
.pdfq-upload-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

/* Divider "oppure" */
.pdfq-upload-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    width: 100%;
    max-width: 200px;
}

.pdfq-upload-divider::before,
.pdfq-upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.pdfq-upload-divider span {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
}

/* Bottone */
.pdfq-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #0d9488;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.pdfq-upload-btn:hover {
    background: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pdfq-upload-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Info formato */
.pdfq-upload-info {
    font-size: 12px;
    color: #94a3b8;
    margin: 16px 0 0 0;
}

/* Animazione bounce */
@keyframes pdfq-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .pdfq-upload-area,
.dark .pdfq-upload-area {
    background: #1e1b4b;
    border-color: #4338ca;
}

[data-theme="dark"] .pdfq-upload-area:hover,
.dark .pdfq-upload-area:hover {
    background: #252262;
    border-color: #0d9488;
}

[data-theme="dark"] .pdfq-upload-title,
.dark .pdfq-upload-title {
    color: #e2e8f0;
}

[data-theme="dark"] .pdfq-upload-icon,
.dark .pdfq-upload-icon {
    background: #312e81;
    color: #a5b4fc;
}

[data-theme="dark"] .pdfq-upload-info,
.dark .pdfq-upload-info {
    color: #64748b;
}

[data-theme="dark"] .pdfq-upload-divider span,
.dark .pdfq-upload-divider span {
    color: #64748b;
}

[data-theme="dark"] .pdfq-upload-divider::before,
[data-theme="dark"] .pdfq-upload-divider::after,
.dark .pdfq-upload-divider::before,
.dark .pdfq-upload-divider::after {
    background: #334155;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .pdfq-upload-area {
        padding: 36px 24px;
        margin: 16px;
        border-radius: 14px;
    }
    
    .pdfq-upload-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    
    .pdfq-upload-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .pdfq-upload-title {
        font-size: 16px;
    }
    
    .pdfq-upload-btn {
        padding: 14px 32px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 12px;
    }
}

/* ===== FILE SELEZIONATO ===== */
.pdfq-file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
}

.pdfq-file-preview-icon {
    width: 40px;
    height: 40px;
    background: #ef4444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pdfq-file-preview-info {
    flex: 1;
    min-width: 0;
}

.pdfq-file-preview-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdfq-file-preview-size {
    font-size: 12px;
    color: #94a3b8;
}

.pdfq-file-preview-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.pdfq-file-preview-remove:hover {
    background: #fecaca;
}

[data-theme="dark"] .pdfq-file-preview,
.dark .pdfq-file-preview {
    background: #1e293b;
}

[data-theme="dark"] .pdfq-file-preview-name,
.dark .pdfq-file-preview-name {
    color: #e2e8f0;
}
