/*
 * Aistea FlippingBook — BDL-Branding + Launcher-UI
 * Flipbook ist initial versteckt im Modal, Launcher-Card zeigt Cover + Button.
 * v3 — 2026-10-05
 */

/* ================== LAUNCHER (Default-Ansicht) ================== */

.fb-launcher {
    margin: 24px 0 32px;
}

.fb-launcher__header h2 {
    color: #1C4F9C;
    font-weight: 600;
    margin-bottom: 6px;
}

.fb-launcher__intro {
    color: #1a2334;
    opacity: 0.78;
    font-size: 0.94em;
    max-width: 760px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.fb-launcher__card {
    display: flex;
    gap: 24px;
    align-items: stretch;
    background: #f3f5f8;
    border: 1px solid rgba(28, 79, 156, 0.14);
    border-radius: 10px;
    padding: 18px;
    max-width: 640px;
}

.fb-launcher__cover {
    position: relative;
    display: block;
    width: 170px;
    min-width: 170px;
    padding: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(28, 79, 156, 0.11);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fb-launcher__cover:hover,
.fb-launcher__cover:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(28, 79, 156, 0.18);
    outline: none;
}
.fb-launcher__cover img {
    display: block;
    width: 100%;
    height: auto;
}
.fb-launcher__cover-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 300 / 424;
    background: linear-gradient(135deg, #eef2f7, #d6deeb);
}

.fb-launcher__cover-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    background: rgba(28, 79, 156, 0.86);
    opacity: 0;
    transition: opacity 0.18s ease;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.fb-launcher__cover-hover svg {
    width: 36px;
    height: 36px;
    stroke: #ffffff;
    stroke-width: 1.6;
    fill: none;
}
.fb-launcher__cover:hover .fb-launcher__cover-hover,
.fb-launcher__cover:focus-visible .fb-launcher__cover-hover {
    opacity: 1;
}

.fb-launcher__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.fb-launcher__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95em;
    text-decoration: none;
    border: 1px solid #1C4F9C;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.fb-launcher__btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fb-launcher__btn--primary {
    background: #1C4F9C;
    color: #ffffff;
}
.fb-launcher__btn--primary:hover,
.fb-launcher__btn--primary:focus-visible {
    background: #164082;
    color: #ffffff;
}
.fb-launcher__btn--ghost {
    background: #ffffff;
    color: #1C4F9C;
}
.fb-launcher__btn--ghost:hover,
.fb-launcher__btn--ghost:focus-visible {
    background: #1C4F9C;
    color: #ffffff;
}

@media (max-width: 640px) {
    .fb-launcher__card { flex-direction: column; max-width: none; }
    .fb-launcher__cover { width: 100%; min-width: 0; max-width: 240px; }
}

/* ================== MODAL (Flipbook-Overlay) ================== */

.fb-launcher__modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fb-launcher__modal[hidden] { display: none; }

.fb-launcher__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 44, 0.68);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.fb-launcher__modal-inner {
    position: relative;
    width: min(1240px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.fb-launcher__modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #1C4F9C;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.fb-launcher__modal-close svg {
    width: 20px; height: 20px;
    stroke: #ffffff; stroke-width: 2; fill: none; stroke-linecap: round;
}
.fb-launcher__modal-close:hover { background: #164082; }

/* body-Scroll-Lock wenn Modal offen */
body.fb-modal-open { overflow: hidden; }

/* ================== BOOK (im Modal) — Theme-Variablen ================== */

.fb-book {
    --fb-bg: #f3f5f8;
    --fb-surface: #ffffff;
    --fb-surface-soft: #eef2f7;
    --fb-surface-elevated: #e3e9f1;
    --fb-border: rgba(28, 79, 156, 0.22);
    --fb-text: #1a2334;
    --fb-muted: #4a5a73;
    --fb-accent: #1C4F9C;
    padding: 0;
}

.fb-book--theme-dark,
.fb-book[data-theme="dark"] {
    --fb-bg: #0f2550;
    --fb-surface: #163a73;
    --fb-surface-soft: #1C4F9C;
    --fb-surface-elevated: #2461b8;
    --fb-border: rgba(255, 255, 255, 0.15);
    --fb-text: #ffffff;
    --fb-muted: rgba(255, 255, 255, 0.72);
    --fb-accent: #ffffff;
}

.fb-book__header h2 {
    color: var(--fb-accent);
    margin-top: 0;
    margin-bottom: 12px;
}

.fb-book__app {
    border: 1px solid var(--fb-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 24px rgba(28, 79, 156, 0.09) !important;
}

.fb-book__toolbar {
    background: linear-gradient(180deg, rgba(28, 79, 156, 0.07), rgba(28, 79, 156, 0.02)) !important;
    padding: 10px 14px !important;
}

.fb-book__toolbar button,
.fb-book__toolbar .fb-book__button {
    border: 1px solid var(--fb-accent) !important;
    border-radius: 8px !important;
    color: var(--fb-accent) !important;
    background: #ffffff !important;
}
.fb-book__toolbar button:hover,
.fb-book__toolbar .fb-book__button:hover {
    background-color: var(--fb-accent) !important;
    color: #ffffff !important;
}

.fb-book__toolbar .fb-book__button--download {
    background-color: var(--fb-accent) !important;
    color: #ffffff !important;
    border-color: var(--fb-accent) !important;
}
.fb-book__toolbar .fb-book__button--download:hover {
    background-color: #164082 !important;
}

.fb-book__page-indicator,
[data-fb-page-indicator] {
    color: var(--fb-accent) !important;
    font-weight: 500;
    letter-spacing: 0.02em;
}
