/* v0.15.2 — First-time visitor tour styles.
 *
 * Architecture: the tip element lives INSIDE a fixed-position flex wrapper
 * that fills the viewport with 12px padding. The tip itself has no left/top
 * positioning of its own — it sizes naturally inside the wrapper, capped at
 * 420px wide. This makes horizontal overflow STRUCTURALLY impossible, so the
 * tour stays inside the viewport even when LiteSpeed CSS Combine reorders or
 * strips media queries (which broke v0.15.0 and v0.15.1 on iPhone).
 *
 * !important is used liberally because the tour must render correctly even
 * after LiteSpeed minification.
 */

.apt-tour-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(8, 24, 18, 0.62) !important;
    z-index: 2147483646 !important;
    animation: apt-tour-fade 0.2s ease-out;
}

.apt-tour-active { overflow: hidden; }

.apt-tour-highlight {
    position: relative !important;
    z-index: 2147483647 !important;
    box-shadow: 0 0 0 4px #ff9900, 0 0 0 8px rgba(255, 153, 0, 0.32), 0 8px 28px rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
    transition: box-shadow 0.2s ease-out;
}

/* Wrapper: fills the viewport, flex-positions the tip inside.
   The tip can NEVER overflow horizontally because it's a flex child with
   max-width:420px and width:100% — even if every media query is stripped. */
.apt-tour-wrap {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    z-index: 2147483647 !important;
    pointer-events: none !important; /* backdrop catches clicks; tip re-enables */
}

/* Mobile bottom-sheet alignment is just a flex modifier — no positioning math. */
.apt-tour-wrap-bottom { align-items: flex-end !important; }
.apt-tour-wrap-center { align-items: center !important; }
.apt-tour-wrap-near-top    { align-items: center !important; }
.apt-tour-wrap-near-bottom { align-items: center !important; }

.apt-tour-tip {
    pointer-events: auto !important;
    position: relative !important; /* for the absolute close button */
    width: 100% !important;
    max-width: 420px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #0a4d3a !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32) !important;
    padding: 22px 22px 18px !important;
    font-family: inherit !important;
    line-height: 1.55 !important;
    animation: apt-tour-pop 0.22s ease-out;
}

.apt-tour-step {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.apt-tour-title {
    margin: 0 0 8px !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #0a4d3a !important;
    line-height: 1.3 !important;
}

.apt-tour-body {
    margin: 0 0 16px !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.apt-tour-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}
.apt-tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s ease;
}
.apt-tour-dot-active {
    background: #0a4d3a;
    width: 18px;
    border-radius: 4px;
}

.apt-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.apt-tour-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apt-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.apt-tour-btn-primary {
    background: #0a4d3a !important;
    color: #ffffff !important;
    border-color: #0a4d3a !important;
}
.apt-tour-btn-primary:hover,
.apt-tour-btn-primary:focus {
    background: #0d6147 !important;
    border-color: #0d6147 !important;
    color: #ffffff !important;
}
.apt-tour-btn-ghost {
    background: transparent;
    color: #475569;
    border-color: transparent;
}
.apt-tour-btn-ghost:hover,
.apt-tour-btn-ghost:focus {
    background: #f1f5f9;
    color: #0a4d3a;
}

.apt-tour-close {
    position: absolute;
    top: 8px;
    inset-inline-end: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}
.apt-tour-close:hover,
.apt-tour-close:focus { background: #f1f5f9; color: #0a4d3a; }

@keyframes apt-tour-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes apt-tour-pop {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; }
}

/* Mobile compaction — tip text shrinks slightly. Sizing/positioning is already
   handled by the flex wrapper above, so this only adjusts type and padding. */
@media (max-width: 720px) {
    .apt-tour-tip   { padding: 18px 18px 14px !important; }
    .apt-tour-title { font-size: 17px !important; }
    .apt-tour-body  { font-size: 13.5px !important; }
}
