/* ==================================================================
   Guided Tutorial — on-page coach overlay
   Loaded only when $_SESSION['isTutorial'] is set (see coach.php).
   Non-blocking: the card floats; the rest of the page stays clickable
   so the novice performs the REAL action while being guided.
   ================================================================== */

.tut-coach {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 9999;

    display: flex;
    gap: 1rem;
    align-items: stretch;

    width: min(46rem, calc(100vw - 2rem));
    padding: 1rem 1.15rem;

    background: #12203b;
    border: 1px solid rgba(120, 170, 255, 0.35);
    border-radius: 0.85rem;
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.5);

    color: #eef3fb;
    font-family: 'Montserrat', Arial, sans-serif;

    animation: tut-rise 0.35s ease-out both;
}

@keyframes tut-rise {
    from { opacity: 0; transform: translate(-50%, 1rem); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* mascot ---------------------------------------------------------- */
.tut-coach__mascot {
    flex: 0 0 auto;
    width: 4.75rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tut-coach__mascot img {
    width: 4.75rem;
    height: auto;
    filter: drop-shadow(0 0.4rem 0.6rem rgba(0, 0, 0, 0.45));
}

/* body ------------------------------------------------------------ */
.tut-coach__body { flex: 1 1 auto; min-width: 0; }

.tut-coach__topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.15rem;
    padding-right: 1.4rem;   /* clear the minimize button so "Step N of M" isn't overlapped */
}

.tut-coach__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.66rem;
    font-weight: 700;
    color: #7fb2ff;
}

.tut-coach__progress {
    font-size: 0.66rem;
    font-weight: 600;
    color: #9fb0cc;
    white-space: nowrap;
}

.tut-coach__title {
    margin: 0.1rem 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.tut-coach__scene {
    float: right;
    width: 8rem;
    max-width: 34%;
    margin: 0 0 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tut-coach__text {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #dbe6f7;
}

.tut-coach__text strong { color: #ffffff; }

.tut-coach__why {
    margin: 0 0 0.7rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #aebbd4;
}

.tut-coach__why-tag {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.3rem;
    background: rgba(127, 178, 255, 0.15);
    color: #9fc2ff;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* actions --------------------------------------------------------- */
.tut-coach__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
}

.tut-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.tut-btn--primary {
    background: #1e90ff;
    color: #fff;
    box-shadow: 0 0 0.9rem rgba(30, 144, 255, 0.35);
}
.tut-btn--primary:hover { background: #3aa0ff; }

.tut-btn--ghost {
    background: transparent;
    color: #cfe0ff;
    border: 1px solid rgba(160, 190, 255, 0.4);
}
.tut-btn--ghost:hover { background: rgba(160, 190, 255, 0.1); }

.tut-coach__skip {
    margin-left: auto;
    font-size: 0.78rem;
    color: #8a99b6;
    text-decoration: none;
}
.tut-coach__skip:hover { color: #cbd6ea; text-decoration: underline; }

.tut-coach__toggle {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #7e8db0;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
}
.tut-coach__toggle:hover { color: #eef3fb; }

/* small label shown only in the minimized pill */
.tut-coach__min-label {
    display: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cfe0ff;
    white-space: nowrap;
}

/* ------------------------------------------------------------------
   Minimized state — collapse to a small pill in the bottom-right so it
   never covers the page's own fields/buttons. Click it to expand again.
   The tour stays active (this is NOT the same as "Skip tour").
   ------------------------------------------------------------------ */
.tut-coach--min {
    left: auto;
    right: 1rem;
    transform: none;
    width: auto;
    padding: 0.4rem 0.6rem 0.4rem 0.75rem;
    gap: 0.5rem;
    align-items: center;
    cursor: pointer;
}
.tut-coach--min .tut-coach__body { display: none; }
.tut-coach--min .tut-coach__min-label { display: inline; }
.tut-coach--min .tut-coach__mascot { width: 2.25rem; align-items: center; }
.tut-coach--min .tut-coach__mascot img { width: 2.25rem; }
.tut-coach--min .tut-coach__toggle {
    position: static;
    color: #cfe0ff;
    font-size: 1.35rem;
}

/* ------------------------------------------------------------------
   Spotlight — applied by tutorial_coach.js to the highlighted control.
   A pulsing ring that draws the eye without blocking interaction.
   ------------------------------------------------------------------ */
.tut-spotlight {
    position: relative;
    z-index: 9998;
    border-radius: 0.4rem;
    animation: tut-pulse 1.8s ease-in-out infinite;
    outline: 2px solid rgba(30, 144, 255, 0.9);
    outline-offset: 3px;
}

@keyframes tut-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.55); }
    70%  { box-shadow: 0 0 0 0.75rem rgba(30, 144, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 144, 255, 0); }
}

/* floating pointer arrow that parks next to the spotlighted control */
.tut-pointer {
    position: absolute;
    z-index: 9998;
    font-size: 1.6rem;
    line-height: 1;
    color: #1e90ff;
    text-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.5);
    animation: tut-bob 1.1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tut-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-0.35rem); }
}

/* responsive ------------------------------------------------------ */
@media (max-width: 34rem) {
    .tut-coach { flex-direction: column; bottom: 0.5rem; padding: 0.85rem; }
    .tut-coach__mascot { display: none; }
    .tut-coach__scene { display: none; }
    .tut-coach__skip { margin-left: 0; }
}
