/* Stays: app-style cards for /hotels and the live price box on stay pages (27 Nov 2026).
   Same look as the Templeisure app's Stays list. Prices and guest scores come from
   /api/v1/hotel-prices through js/stay-cards.js. */

.tl-stay-results,
.tl-hotel-booking-card {
    --ts-accent: #4A3AE0;
    --ts-ink: #14103A;
    --ts-ink2: #3E3960;
    --ts-muted: #5D5878;
    --ts-light: #8A85A3;
    --ts-soft: #F1EFFC;
    --ts-line: #ECE9F5;
    --ts-border: #E2DEEF;
    --ts-gold: #F5A524;
    --ts-warm: #B26F00;
    --ts-warm-bg: #FFF4E0;
}

/* Budget chips above the results */
.tl-stay-budgets {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 18px;
    padding: 2px 0 4px;
    scrollbar-width: none;
}
.tl-stay-budgets::-webkit-scrollbar { display: none; }
.tl-stay-budget {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--ts-border);
    border-radius: 19px;
    background: #fff;
    color: var(--ts-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}
.tl-stay-budget:hover,
.tl-stay-budget:focus-visible { border-color: var(--ts-accent); color: var(--ts-accent); }
.tl-stay-budget b { color: var(--ts-warm); font-weight: 600; }
.tl-stay-budget.is-active,
.tl-stay-budget.is-active:hover { background: var(--ts-accent); border-color: var(--ts-accent); color: #fff; }
.tl-stay-budget.is-active b { color: rgba(255, 255, 255, .8); }

/* Card grid */
.tl-stay-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.tl-stay-grid__wide { grid-column: 1 / -1; }
@media (max-width: 767.98px) {
    .tl-stay-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* Card */
.tl-stay-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--ts-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(138, 133, 163, .12);
    transition: box-shadow .2s, transform .2s;
}
.tl-stay-card:hover { box-shadow: 0 14px 28px rgba(74, 58, 224, .14); transform: translateY(-2px); }
.tl-stay-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden; /* 28 Nov: tall photos can no longer stretch the box */
    background: var(--ts-soft);
}
.tl-stay-card__photo { position: absolute; inset: 0; display: block; }
.tl-stay-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tl-stay-card__place {
    position: absolute;
    left: 12px;
    top: 12px;
    max-width: 62%;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(20, 16, 58, .72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.tl-stay-card__media .tl-favorite-toggle { position: absolute; top: 10px; right: 10px; z-index: 2; }
.tl-stay-card__stars {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 16px;
    background: #fff;
    color: var(--ts-ink);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(20, 16, 58, .18);
    pointer-events: none;
}
.tl-stay-stars { color: var(--ts-gold); font-size: 13px; letter-spacing: 1px; line-height: 1; }
.tl-stay-stars .is-half {
    background: linear-gradient(90deg, var(--ts-gold) 50%, #D9D6E6 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tl-stay-card__body { flex: 1 1 auto; padding: 16px 18px 0; }
.tl-stay-card__title { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.tl-stay-card__title a { color: var(--ts-ink); text-decoration: none; }
.tl-stay-card__title a:hover { color: var(--ts-accent); }
.tl-stay-card__loc {
    margin: 0;
    color: var(--ts-muted);
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-stay-card__loc i { color: var(--ts-accent); margin-right: 4px; }
.tl-stay-card__score,
.tl-stay-pricebox__score {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--ts-ink);
    font-size: 13px;
    font-weight: 500;
}
.tl-stay-card__score[hidden] { display: none; }
.tl-stay-score {
    display: inline-block;
    min-width: 32px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--ts-accent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
}
.tl-stay-card__desc {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--ts-ink2);
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tl-stay-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tl-stay-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 16px;
    background: var(--ts-soft);
    color: var(--ts-accent);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
}
.tl-stay-chip--budget { background: var(--ts-warm-bg); color: var(--ts-warm); }
.tl-stay-chip--budget .tl-stay-tier-off { opacity: .3; }
.tl-stay-card__foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px 12px 18px;
    border-top: 1px solid var(--ts-line);
    color: var(--ts-accent);
    text-decoration: none;
}
.tl-stay-card__foot:hover { background: #FAF9FF; color: var(--ts-accent); }
.tl-stay-card__foot > i { font-size: 15px; }
.tl-stay-card__price {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}
.tl-stay-card__price small,
.tl-stay-pricebox__price small { color: var(--ts-muted); font-size: 12.5px; font-weight: 500; }
.tl-stay-card__price s,
.tl-stay-pricebox__price s { color: var(--ts-light); font-size: 12.5px; font-weight: 500; }
.tl-stay-card__price strong { color: var(--ts-ink); font-size: 19px; font-weight: 700; }
.tl-stay-card__go {
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ts-soft);
    color: var(--ts-accent);
    font-size: 17px;
    line-height: 1;
}

/* Stay page: live price box inside the booking card */
.tl-stay-pricebox {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ts-soft);
    color: var(--ts-ink);
}
.tl-stay-pricebox[hidden] { display: none; }
.tl-stay-pricebox__price { margin: 0; line-height: 1.3; }
.tl-stay-pricebox__price strong { color: var(--ts-ink); font-size: 26px; font-weight: 700; }
.tl-stay-pricebox__price em { margin-left: 6px; color: var(--ts-warm); font-size: 13px; font-style: normal; font-weight: 700; }
.tl-stay-pricebox__note { margin: 4px 0 0; color: var(--ts-muted); font-size: 12.5px; line-height: 1.45; }
.tl-stay-pricebox .tl-stay-card__chips { margin-top: 10px; }
.tl-stay-pricebox .tl-stay-chip { background: #fff; }
.tl-hotel-booking-card.has-live-price .tl-hotel-booking-meta .price { display: none; }
