/*
 * PDF flipbook: first-visit guide to the controls (js/pages/flipbook-tour.js,
 * ticket IR-14), and the Guide button in the top bar. A dark dialog with a
 * PhoenixBev orange (#f36b21) frame points at each control; the control is
 * ringed in orange and the rest of the page is dimmed.
 */

/* ---------- Guide button (top bar, next to the language switch) ---------- */
.fb-guide {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px;
    border: 1px solid var(--orange-line); background: transparent; color: rgba(255, 255, 255, .9);
    font-family: inherit; font-size: .85rem; font-weight: 500; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.fb-guide i { color: var(--orange-light); transition: color .2s; }
.fb-guide:hover, .fb-guide:focus-visible { background: var(--orange); border-color: var(--orange); color: #fff; outline: none; }
.fb-guide:hover i, .fb-guide:focus-visible i { color: #fff; }

/* ---------- Click blocker, dimmed page and ring ---------- */
.fbt-blocker { position: fixed; inset: 0; z-index: 100; background: transparent; transition: background .3s; }
.fbt-blocker.is-dim { background: rgba(3, 10, 16, .66); }
.fbt-spot {
    position: fixed; z-index: 101; pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(3, 10, 16, .66), 0 0 0 2px var(--orange), 0 0 24px 4px rgba(243, 107, 33, .55);
    transition: top .35s cubic-bezier(.2, .7, .2, 1), left .35s cubic-bezier(.2, .7, .2, 1), width .35s cubic-bezier(.2, .7, .2, 1), height .35s cubic-bezier(.2, .7, .2, 1), border-radius .35s;
}
.fbt-spot::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--orange); animation: fbtRing 1.8s ease-out infinite; }
@keyframes fbtRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
/* While the guide is open, the previous arrow shows even on the cover */
body.fbt-on .fb-arrow:disabled { opacity: .7; }

/* ---------- Dialog ---------- */
.fbt-pop {
    position: fixed; z-index: 102; width: min(390px, calc(100vw - 24px));
    padding: 18px 18px 14px; border-radius: 16px;
    background: #0d2433; border: 1px solid var(--orange); color: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 4px rgba(243, 107, 33, .14);
    transition: top .35s cubic-bezier(.2, .7, .2, 1), left .35s cubic-bezier(.2, .7, .2, 1);
}
.fbt-pop[hidden], .fbt-blocker[hidden], .fbt-spot[hidden] { display: none; }
.fbt-pop.is-nudged { animation: fbtShake .4s ease; }
@keyframes fbtShake { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }

/* Caret pointing at the control */
.fbt-caret { position: absolute; width: 14px; height: 14px; background: #0d2433; border: 1px solid var(--orange); transform: translate(-50%, -50%) rotate(45deg); }
.fbt-pop[data-side="none"] .fbt-caret { display: none; }
.fbt-pop[data-side="top"] .fbt-caret { top: 100% !important; border-width: 0 1px 1px 0; }
.fbt-pop[data-side="bottom"] .fbt-caret { top: 0 !important; border-width: 1px 0 0 1px; }
.fbt-pop[data-side="left"] .fbt-caret { left: 100% !important; border-width: 1px 1px 0 0; }
.fbt-pop[data-side="right"] .fbt-caret { left: 0 !important; border-width: 0 0 1px 1px; }

.fbt-head { display: flex; align-items: center; gap: 12px; }
.fbt-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fbt-count { color: var(--orange-light); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fbt-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.fbt-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: background .2s, width .2s; }
.fbt-dots i.is-done { background: rgba(243, 107, 33, .55); }
.fbt-dots i.is-on { width: 18px; border-radius: 4px; background: var(--orange); }

/* The control's icon, on orange, moving the way the control is used */
.fbt-icon {
    flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: var(--orange); color: #fff; font-size: 1.35rem; box-shadow: 0 8px 20px rgba(243, 107, 33, .4);
}
.fbt-icon > * { display: block; animation: 1.6s ease-in-out infinite; }
.fbt-arrow svg { display: block; width: 20px; height: 20px; margin-left: 3px; }
.fbt-arrow.is-prev svg { transform: scaleX(-1); margin: 0 3px 0 0; }
.fbt-anim-nudge-r > * { animation-name: fbtNudgeR; }
.fbt-anim-nudge-l > * { animation-name: fbtNudgeL; }
.fbt-anim-pulse > * { animation-name: fbtPulse; }
.fbt-anim-grow > * { animation-name: fbtGrow; }
.fbt-anim-wave > * { animation-name: fbtWave; }
.fbt-anim-slide > * { animation-name: fbtSlide; }
.fbt-anim-float > * { animation-name: fbtFloat; }
.fbt-anim-drop > * { animation-name: fbtDrop; }
@keyframes fbtNudgeR { 50% { transform: translateX(5px); } }
@keyframes fbtNudgeL { 50% { transform: translateX(-5px); } }
@keyframes fbtPulse { 50% { transform: scale(.85); } }
@keyframes fbtGrow { 50% { transform: scale(1.2); } }
@keyframes fbtWave { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes fbtSlide { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes fbtFloat { 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes fbtDrop { 50% { transform: translateY(4px); } }

.fbt-title { margin: 14px 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.fbt-text { margin: 0; color: rgba(255, 255, 255, .78); font-size: .9rem; line-height: 1.55; text-align: justify; text-align-last: left; }
.fbt-key { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.fbt-key kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--orange-line); background: rgba(243, 107, 33, .14); color: #fff; font-family: inherit; font-size: .78rem; font-weight: 700; text-align: center; }

.fbt-foot { display: flex; flex-wrap: wrap-reverse; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.fbt-links { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.fbt-link { padding: 4px 0; border: 0; background: none; color: var(--muted); font-family: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.fbt-link:hover, .fbt-link:focus-visible { color: var(--orange-light); text-decoration-color: currentColor; outline: none; }
.fbt-nav { display: flex; gap: 8px; margin-left: auto; }
.fbt-btn { padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid transparent; font-family: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.fbt-btn[hidden] { display: none; }
.fbt-btn--primary { background: var(--orange); color: #fff; }
.fbt-btn--primary:hover, .fbt-btn--primary:focus-visible { background: var(--orange-light); transform: translateY(-1px); }
.fbt-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
.fbt-btn--ghost:hover, .fbt-btn--ghost:focus-visible { border-color: var(--orange); background: var(--orange-soft); }
.fbt-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .fbt-spot, .fbt-pop, .fbt-blocker { transition: none; }
    .fbt-spot::after, .fbt-icon > *, .fbt-pop.is-nudged { animation: none; }
}
