/* PDF Opener Bar (index.html) & PDF Viewer Styles */

/* ==========================================
   PDF Opener Bar on index.html
   ========================================== */

.pdf-opener {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-opener-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pdf-opener-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.pdf-opener-icon {
    font-size: 20px;
}

.pdf-opener-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.pdf-url-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.2s;
}

.pdf-url-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.pdf-url-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.25);
}

.pdf-opener-divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-style: italic;
}

.pdf-browse-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.pdf-browse-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.pdf-file-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   PDF Viewer Welcome / Drop Zone
   ========================================== */

.viewer-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.welcome-card {
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.welcome-card > p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
}

.viewer-open-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.viewer-url-row {
    display: flex;
    gap: 10px;
}

.viewer-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.viewer-url-input:focus {
    outline: none;
    border-color: #2563eb;
}

.viewer-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #94a3b8;
    font-size: 14px;
}

.viewer-divider::before,
.viewer-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.viewer-browse-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px !important;
    font-size: 16px !important;
}

.drop-zone {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.drop-zone p {
    margin: 0;
    font-weight: 500;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .pdf-opener-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pdf-opener-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-url-input {
        min-width: unset;
        width: 100%;
    }

    .pdf-opener-divider {
        text-align: center;
    }

    .viewer-url-row {
        flex-direction: column;
    }

    .welcome-icon {
        font-size: 48px;
    }

    .welcome-card h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .pdf-opener-label span:last-child {
        display: none;
    }
}
