/* ======================= DOWNLOAD FORMAT DIALOG ======================= */

.download-format-dialog {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

/* ======================= PDF FULL PANEL ======================= */

.pdf-fullpanel {
    display: none;
    flex-direction: column;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 95vw;
    max-width: 1400px;
    height: 90dvh;
    overflow: hidden;
}
 
.pdf-fullpanel.active {
    display: flex;
    animation: dialog-pop 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.pdf-fullpanel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 12px;
}

.pdf-fullpanel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-fullpanel-title h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.pdf-fullpanel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-fullpanel-body {
    display: grid;
    grid-template-columns: 400px 1fr;
    flex: 1;
    overflow: hidden;
    gap: 0;
    position: relative; /* needed for absolute-positioned settings overlay & backdrop */
}

.pdf-fullpanel-settings {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pdf-settings-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pdf-settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    white-space: nowrap;
    margin-bottom: 10px;
}

.pdf-settings-section-title::before,
.pdf-settings-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.pdf-settings-section .settings-group {
    margin-bottom: 12px;
}

.pdf-fullpanel-preview {
    overflow-y: auto;
    overflow-x: auto;
    padding: 24px;
    background: rgb(240, 240, 245);
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark-mode .pdf-fullpanel-preview{
    background: rgb(51, 51, 51);
}

.pdf-preview-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Keep existing download options styling */
.dialog-content-scrollable {
    overflow-y: visible;
    max-height: none;
}

.pdf-options-container {
    display: none;
}

/* ======================= PDF PANEL — SETTINGS FAB & OVERLAY ======================= */

/* Settings backdrop — absolutely positioned so it never affects the grid layout.
   Hidden by default; fades in via responsive.css when the settings overlay is open. */
.pdf-settings-backdrop {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9;
    cursor: pointer;
}

/* Floating settings gear button — hidden on desktop, shown via responsive.css on smaller screens.
   Matches the metronome FAB style: accent background, white icon, coloured glow.
   Bottom-left position keeps it clear of the preview page content and easy to reach. */
.pdf-settings-fab {
    display: none;
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 8;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pdf-settings-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 50%, transparent);
}

.pdf-settings-fab:active {
    transform: scale(0.95);
}

/* When the settings drawer is open: invert to surface + accent text (mirrors metronome panel-open) */
.pdf-settings-fab.active {
    background: var(--surface-elevated);
    color: var(--accent);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* ======================= PDF COLOR TOGGLE ROW ======================= */
.pdf-color-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}