/* ═══════════════════════════════════════════════════════════════════════
   Los Polos Empires — tutorial.css   (M8 — F4 Agent)
   Step-by-step kezdő-tutorial overlay style-jai.

   Komponensek:
     .lpe-tutorial-overlay   — top-right pergamen-kártya (cím / szöveg / gombok)
     .lpe-tutorial-highlight — pulzáló narancs téglalap DOM-elem köré
     .lpe-tutorial-help      — "?" fix-gomb a tutorial újraindításához

   A game.css változókat újrahasználjuk (--lpe-acc, --lpe-cream, ...).
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Kártya ─────────────────────────────────────────────────────── */
.lpe-tutorial-overlay {
    position: fixed;
    top: 76px;            /* a HUD-top alatt */
    right: 16px;
    z-index: 10500;
    width: 320px;
    max-width: calc(100vw - 32px);
    padding: 14px 16px 12px;
    background: linear-gradient(180deg, #f6e7c8 0%, #ead8b0 100%);
    color: #3D2800;
    border: 2px solid #b85510;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(232, 113, 26, 0.5),
        0 12px 28px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
    line-height: 1.4;
    animation: lpe-tut-slide-in 320ms cubic-bezier(.2,.8,.2,1.05);
    pointer-events: auto;
}

@keyframes lpe-tut-slide-in {
    from { opacity: 0; transform: translateX(40px) scale(.96); }
    to   { opacity: 1; transform: translateX(0)    scale(1);   }
}

.lpe-tut-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}

.lpe-tut-step {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #b85510;
    background: rgba(184, 85, 16, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
}

.lpe-tut-close {
    border: none;
    background: transparent;
    color: #7a4a1f;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}
.lpe-tut-close:hover { background: rgba(184, 85, 16, 0.15); color: #3D2800; }

.lpe-tut-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 18px;
    color: #3D2800;
    margin: 0 0 6px;
    line-height: 1.25;
}

.lpe-tut-text {
    font-size: 13.5px;
    color: #3D2800;
    margin: 0 0 12px;
}

.lpe-tut-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.lpe-tut-btn {
    appearance: none;
    border: 1px solid #b85510;
    background: #fff8ec;
    color: #3D2800;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform .08s, background .12s;
}
.lpe-tut-btn:hover { background: #ffe3bd; }
.lpe-tut-btn:active { transform: translateY(1px); }

.lpe-tut-skip {
    color: #7a4a1f;
    background: transparent;
    border-color: rgba(184, 85, 16, 0.5);
}
.lpe-tut-later {
    color: #7a4a1f;
    background: transparent;
    border-color: rgba(184, 85, 16, 0.4);
}
.lpe-tut-next {
    background: linear-gradient(180deg, #f4a35c 0%, #E8711A 100%);
    color: #fff;
    border-color: #b85510;
    box-shadow: 0 2px 6px rgba(232, 113, 26, 0.4);
}
.lpe-tut-next:hover {
    background: linear-gradient(180deg, #ffb978 0%, #f08029 100%);
}

/* ─── DOM-elem highlight (pulzáló box) ───────────────────────────── */
.lpe-tutorial-highlight {
    position: fixed;
    z-index: 10499;          /* a kártya alatt, mindenki más fölött */
    pointer-events: none;
    border: 3px solid #E8711A;
    border-radius: 8px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.4),
        0 0 18px 6px rgba(232, 113, 26, 0.65),
        inset 0 0 0 1px rgba(255, 217, 153, 0.7);
    animation: lpe-tut-pulse 1.4s ease-in-out infinite;
    transition: left .12s linear, top .12s linear,
                width .12s linear, height .12s linear;
}

@keyframes lpe-tut-pulse {
    0%   { box-shadow: 0 0 0 2px rgba(255,255,255,0.4),
                       0 0 12px 3px rgba(232,113,26,0.5),
                       inset 0 0 0 1px rgba(255,217,153,0.6); }
    50%  { box-shadow: 0 0 0 2px rgba(255,255,255,0.55),
                       0 0 26px 10px rgba(232,113,26,0.85),
                       inset 0 0 0 1px rgba(255,217,153,0.85); }
    100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.4),
                       0 0 12px 3px rgba(232,113,26,0.5),
                       inset 0 0 0 1px rgba(255,217,153,0.6); }
}

/* ─── "?" újraindító gomb (dismiss után) ─────────────────────────── */
.lpe-tutorial-help {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 10498;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #b85510;
    background: linear-gradient(180deg, #f4a35c 0%, #E8711A 100%);
    color: #fff;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,255,255,0.4);
    transition: transform .12s, box-shadow .12s;
}
.lpe-tutorial-help:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(232,113,26,0.5),
                inset 0 1px 0 rgba(255,255,255,0.5);
}
.lpe-tutorial-help::after {
    content: 'Tutorial újraindítása';
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(42, 29, 16, 0.94);
    color: #F5F0EA;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}
.lpe-tutorial-help:hover::after { opacity: 1; }

/* ─── Mobil — kártya alulra ─────────────────────────────────────── */
@media (max-width: 720px) {
    .lpe-tutorial-overlay {
        top: auto;
        bottom: 16px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }
    .lpe-tutorial-help {
        top: auto;
        bottom: 16px;
        right: 16px;
    }
    .lpe-tut-actions { justify-content: space-between; }
}

/* ─── Kis képernyőn a "Később" gombot elrejtjük helyhiány miatt ── */
@media (max-width: 380px) {
    .lpe-tut-later { display: none; }
}
