/* ==========================================================================
   TravelSpy embeddable advisor widget
   Standalone: rendered inside an iframe on customer sites.
   ========================================================================== */

.ts-advisor-body { background: transparent; }

.ts-advisor {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ts-white);
    font-size: 15px;
}

.ts-advisor__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--ts-forest);
    color: rgba(255, 255, 255, .7);
}

.ts-advisor__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--ts-bright);
    color: var(--ts-forest);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .85rem;
    flex: 0 0 auto;
}

.ts-advisor__head strong { display: block; color: var(--ts-white); font-size: .98rem; font-weight: 600; }
.ts-advisor__head span { font-size: .78rem; }

.ts-advisor__badge {
    margin-left: auto;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    background: rgba(159, 232, 112, .2);
    color: var(--ts-bright);
    border-radius: var(--ts-radius-pill);
    padding: 5px 11px;
    white-space: nowrap;
}
.ts-advisor__progress { height: 4px; background: var(--ts-sand); }
.ts-advisor__progress span { display: block; height: 100%; background: var(--ts-bright); transition: width .3s ease; }

.ts-advisor__body { flex: 1 1 auto; padding: 24px 20px; }

.ts-advisor__step { display: none; }
.ts-advisor__step.is-active { display: block; }

.ts-advisor__q {
    font-family: var(--ts-font-display);
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--ts-forest);
    margin: 0 0 20px;
}

.ts-advisor__q--tight { margin-bottom: 14px; }
.ts-advisor__q strong { font-weight: 700; }

.ts-advisor__options { display: grid; gap: 10px; }

.ts-advisor__option {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-white);
    font-family: var(--ts-font);
    font-size: .95rem;
    font-weight: 500;
    color: var(--ts-forest);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.ts-advisor__option:hover { background: var(--ts-mint); border-color: var(--ts-bright); }
.ts-advisor__option:focus-visible { outline: 3px solid var(--ts-forest); outline-offset: 2px; }

.ts-advisor__pack { list-style: none; margin: 0 0 16px; padding: 0; }

.ts-advisor__pack li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--ts-line);
}

.ts-advisor__pack span { font-size: .82rem; color: var(--ts-muted); flex: 0 0 auto; }
.ts-advisor__pack strong { font-size: .9rem; color: var(--ts-forest); font-weight: 600; text-align: right; }

.ts-advisor__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    background: var(--ts-mint);
    border-radius: var(--ts-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.ts-advisor__total span { font-size: .85rem; color: var(--ts-forest); }
.ts-advisor__total strong { font-family: var(--ts-font-display); font-size: 1.5rem; color: var(--ts-forest); }

.ts-advisor__note { font-size: .78rem; color: var(--ts-muted); margin: 12px 0 0; text-align: center; }

.ts-advisor__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--ts-line);
    font-size: .75rem;
    color: var(--ts-muted);
}

.ts-advisor__back {
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--ts-font);
    font-size: .8rem;
    font-weight: 600;
    color: var(--ts-forest);
    cursor: pointer;
}

.ts-advisor__back[hidden] { display: none; }

/* ==========================================================================
   Live insight surface (the real-time feedback variant of the widget)
   ========================================================================== */

.ts-live { display: flex; flex-direction: column; min-height: 100vh; background: var(--ts-white); }

.ts-live__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--ts-forest);
    color: rgba(255, 255, 255, .7);
}

.ts-live__head strong { display: block; color: var(--ts-white); font-size: .95rem; font-weight: 600; }
.ts-live__head span { font-size: .76rem; }
.ts-live__head b { color: var(--ts-bright); font-weight: 700; }

.ts-advisor__badge--team { background: rgba(255, 255, 255, .16); color: var(--ts-white); }

.ts-live__dot {
    margin-left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ts-bright);
    flex: 0 0 auto;
    animation: ts-live-pulse 1.8s ease-in-out infinite;
}

@keyframes ts-live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(159, 232, 112, .5); }
    50% { opacity: .65; box-shadow: 0 0 0 6px rgba(159, 232, 112, 0); }
}

.ts-live__body { flex: 1 1 auto; padding: 14px 16px; }

.ts-live__empty { font-size: .86rem; color: var(--ts-muted); margin: 0; }

.ts-live__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.ts-live__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-white);
}

.ts-live__row[hidden] { display: none; }
.ts-live__row.is-changed { animation: ts-live-flash .9s ease; }
.ts-live__row.is-low { border-style: dashed; }

@keyframes ts-live-flash {
    0% { background: var(--ts-mint); border-color: var(--ts-bright); }
    100% { background: var(--ts-white); border-color: var(--ts-line); }
}

.ts-live__label {
    grid-column: 1 / -1;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ts-muted);
}

.ts-live__value {
    font-family: var(--ts-font-display);
    font-size: .95rem;
    font-weight: 700;
    color: var(--ts-forest);
    margin: 1px 0 6px;
    grid-column: 1;
    min-width: 0;
}

.ts-live__meter { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--ts-sand); overflow: hidden; }
.ts-live__meter span { display: block; height: 100%; background: var(--ts-bright); border-radius: 3px; transition: width .45s ease; }
.ts-live__row.is-low .ts-live__meter span { background: var(--ts-line); }

.ts-live__conf { grid-column: 2; grid-row: 2; font-size: .7rem; color: var(--ts-muted); white-space: nowrap; align-self: center; padding-bottom: 5px; }
.ts-live__conf span { font-weight: 700; color: var(--ts-forest); }
.ts-live__why { grid-column: 1 / -1; font-size: .72rem; color: var(--ts-muted); margin-top: 5px; }

.ts-live__next {
    margin-top: 10px;
    background: var(--ts-mint);
    border-radius: var(--ts-radius);
    padding: 10px 12px;
}

.ts-live__next[hidden] { display: none; }
.ts-live__next.is-sent { background: var(--ts-sand); }
.ts-live__next span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-forest); opacity: .65; }
.ts-live__next strong { display: block; font-size: .86rem; color: var(--ts-forest); margin-top: 4px; }

.ts-live__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-top: 1px solid var(--ts-line);
    background: var(--ts-cream);
    font-size: .74rem;
    color: var(--ts-muted);
}

.ts-live__signal { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-live__brand { font-weight: 700; color: var(--ts-forest); flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
    .ts-live__dot, .ts-live__row.is-changed { animation: none; }
}
