/*
 * LEIS-928 — the AI "Traveller impressions" card. Sits inside the reviews
 * section of LEIS-925's "Know your layover" drawer, as the right-hand card
 * beside LEIS-927's rating-breakdown card. Layout matches the MMT reference:
 * the robot icon (leisure_bot.webm — the same animated mascot the homepage's
 * "Ask me anything" launcher uses, so every AI touchpoint in the app reads
 * as the same assistant) + title/subtitle in a self-sized left column
 * (never a fixed width — it sizes to its own content so the title/subtitle
 * never wrap, with a vertical divider matching the reference), the summary
 * and tag rows filling the remaining width — stacks only below a
 * mobile-sheet-width breakpoint.
 *
 * Chip colors are a semantic sentiment pair (green/red), not arbitrary tints
 * — same green/red split a review-platform's own star-rating colors would
 * use, so "positive" and "negative" read as unambiguous at a glance.
 */

.traveller-impressions-card {
    border: 1px solid var(--color-border, #e3e6ea);
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(180deg, #f7fafb 0%, #ffffff 90px, #ffffff 100%);
    display: flex;
    flex-direction: row;
    /* stretch (not flex-start): the divider on __head is a border, which
       only ever paints along its own box — this is what makes that box (and
       so the border) run the full height of the taller content column
       beside it, instead of stopping right after the title/subtitle. */
    align-items: stretch;
}

.traveller-impressions-card__head {
    /* flex: 0 0 auto (not a fixed width) — sizes its WIDTH to its own
       content, so the title/subtitle never wrap unpredictably regardless of
       how long "Powered by leisure.com AI" or a given airport's summary
       run. Height comes from the stretch above; centering the icon/title
       within that height (rather than pinning to the top) splits the
       leftover space evenly above and below instead of stranding it all at
       the bottom, which is what actually made it look unused. */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding-right: 18px;
    border-right: 1px solid var(--color-border, #e3e6ea);
}

.traveller-impressions-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-first, #2f6271);
    box-shadow: 0 0 0 3px rgba(47, 98, 113, 0.1);
}

.traveller-impressions-card__icon video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.traveller-impressions-card__title {
    font-family: var(--font-family-inter);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-first, #2f6271);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
}

.traveller-impressions-card__subtitle {
    font-family: var(--font-family-inter);
    font-size: 0.75rem;
    color: var(--color-text-muted, #6b7280);
    margin: 0;
    white-space: nowrap;
}

.traveller-impressions-card__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 18px;
}

.traveller-impressions-card__summary {
    font-family: var(--font-family-inter);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-dark, #262b36);
    margin: 0;
}

.traveller-impressions-card__tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.traveller-impressions-card__tag-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.traveller-impressions-card__tag-label {
    font-family: var(--font-family-inter);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted, #6b7280);
}

.traveller-impressions-card__tag {
    font-family: var(--font-family-inter);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.traveller-impressions-card__tag--positive {
    background: #ecfdf3;
    color: #15803d;
    border-color: #bbf0cf;
}

.traveller-impressions-card__tag--negative {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fbcaca;
}

/* Below this, a side-by-side layout leaves the summary column too narrow to
   read comfortably (matches the mobile full-screen sheet's own width). */
@media (max-width: 560px) {
    .traveller-impressions-card {
        flex-direction: column;
    }

    .traveller-impressions-card__head {
        flex: 0 0 auto;
        width: 100%;
        padding-right: 0;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--color-border, #e3e6ea);
    }

    .traveller-impressions-card__content {
        padding-left: 0;
    }
}

.traveller-impressions-card--loading {
    flex-direction: column;
    gap: 10px;
}

.traveller-impressions-card__skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef0f2 25%, #e4e7ea 37%, #eef0f2 63%);
    background-size: 400% 100%;
    animation: traveller-impressions-shimmer 1.4s ease infinite;
}

@keyframes traveller-impressions-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .traveller-impressions-card__skeleton-line {
        animation: none;
    }
}
