/* ============================================================
   Bifröst — PDF Tool Theme (Modern & CSP-konform)
   ============================================================ */

.pdf-container {
    display: flex;
    flex-direction: row;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 800px;
    transition: all var(--transition);
}

.pdf-container.fullSize {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    border: none;
    z-index: 9999;
    margin: 0;
}

/* ── Sidebars ── */
.pdfSideBar {
    width: 48px;
    background: var(--nav-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
    overflow-x: hidden;
    white-space: nowrap;
}

.pdfSideBar.expanded {
    width: 200px;
}

#mycPDFLeft {
    border-right: 1px solid rgba(255,255,255,0.05);
}

#mycPDFRight {
    border-left: 1px solid rgba(255,255,255,0.05);
}

/* ── Toolbars (Icon Leiste) ── */
.pdfToolbar, .pdfToolbarBottom {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    gap: 0.5rem;
    width: 100%;
}

.pdfToolbarBottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin-top: auto;
}

.pdfToolBarButton {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdfToolBarButton:hover,
.pdfToolBarButton.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
}

/* ── Content Area ── */
#mycPDFcontent {
    flex: 1;
    background: var(--color-bg);
    position: relative;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

[data-theme="dark"] #mycPDFcontent {
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.embedPDF, .pdfobject-container {
    width: 100%;
    height: 100%;
}

/* ── Grid System (generiert von JS) ── */
.row { display: flex; flex-wrap: wrap; margin: -0.25rem; align-items: center; margin-bottom: 0.5rem; }
.row > [class^="col-"] { padding: 0.25rem; }
.col-2 { width: 16.666%; }
.col-3 { width: 25%; }
.col-5 { width: 41.666%; }
.col-6 { width: 50%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333%; }

/* ── Formulare im Tool ── */
#mycPDFoverlayContent input, #mycPDFoverlayContent select {
    width: 100%; padding: 0.45rem 0.75rem; background: var(--color-bg);
    border: 1px solid var(--color-border); color: var(--color-text);
    border-radius: var(--radius-sm); font-family: var(--font-sans);
    font-size: 0.85rem; transition: border-color var(--transition);
}
#mycPDFoverlayContent input:focus, #mycPDFoverlayContent select:focus { outline: none; border-color: var(--color-primary); }
#mycPDFoverlayContent label { font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); }
#mycPDFoverlayContent h2 { font-size: 1.15rem; margin-bottom: 1rem; color: var(--color-heading); border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
input[type="range"].slider { width: 100%; margin: 0.5rem 0; accent-color: var(--color-primary); cursor: ew-resize; }
input[type="checkbox"] { width: auto !important; accent-color: var(--color-primary); transform: scale(1.1); cursor: pointer; }
button { background: var(--color-primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: background var(--transition); }
button:hover { background: var(--color-primary-dark); }
button.btnClear { background: transparent; color: var(--color-text-muted); padding: 0.25rem; font-size: 1.1rem; }
button.btnClear:hover { background: rgba(121, 134, 203, 0.1); color: var(--color-primary); }

/* ── Overlay (Bewerbungs-Dialoge) ── */
#mycPDFoverlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(5px); z-index: 10000;
    display: flex; align-items: center; justify-content: center; padding: 2rem; animation: fadeIn 0.2s ease-out forwards;
}
#mycPDFoverlayContent {
    background: var(--color-surface); border-radius: var(--radius-lg); padding: 2.5rem; width: 80vw; height: 80vh; max-width: 1200px;
    overflow-y: auto; box-shadow: var(--shadow-lg); position: relative; animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
#mycPDFoverlayClose {
    position: absolute; top: 1.25rem; right: 1.25rem; width: 32px; height: 32px; background: var(--color-bg);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-weight: bold; color: var(--color-text-muted); transition: all var(--transition);
}
#mycPDFoverlayClose:hover { background: var(--color-danger); color: #fff; transform: rotate(90deg); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

canvas { border-radius: var(--radius); background: var(--color-bg); border: 1px dashed var(--color-border); max-width: 100%; height: auto; }

/* Flexbox Layout für saubere Buttons */
.pdfToolBarButton {
    display: flex;
    justify-content: flex-start; /* Links ausgerichtet */
    align-items: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px; /* Ggf. Padding für deine Icons anpassen */
}

/* Text im eingefahrenen Zustand (unsichtbar & nimmt 0 Platz ein) */
.btn-desc.desc-hidden {
    opacity: 0;
    width: 0;
    padding-left: 0;
    font-size: 0.8rem;
    transition: opacity 0.2s ease, width 0.3s ease, padding 0.3s ease;
    pointer-events: none;
}

/* Text im ausgefahrenen Zustand (sichtbar) */
.btn-desc.desc-visible {
    opacity: 1;
    width: auto;
    padding-left: 8px;
    font-size: 0.8rem;
    transition: opacity 0.4s ease 0.1s, width 0.3s ease, padding 0.3s ease;
    pointer-events: auto;
}
