/* File: App/Main/Apps/Trip/assets/app.css */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    background: #fafafa;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.trip-header { background: #fff; border-bottom: 1px solid #e5e5e5; position: sticky; top: 0; z-index: 50; }
.trip-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.trip-logo { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.trip-logo:hover { text-decoration: none; color: #2563eb; }
.trip-nav { display: flex; gap: 20px; flex: 1; }
.trip-nav a { color: #555; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.trip-nav a.is-active { color: #1a1a1a; border-bottom-color: #2563eb; }
.trip-nav a:hover { text-decoration: none; color: #1a1a1a; }
.trip-header-actions { display: flex; align-items: center; gap: 8px; }
.trip-header-actions .trip-lang-switch,
.trip-header-actions .trip-btn {
    /* Shared baseline so all three header controls have the same height */
    height: 36px;
    box-sizing: border-box;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 6px;
    border: 1px solid #d4d4d4;
    display: inline-flex;
    align-items: center;
}
.trip-lang-switch {
    /* Kill native select styling on every engine */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* IE/old-Edge specific — hide native arrow */
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding: 0 32px 0 14px;
    min-width: 70px;        /* enough room for "EN" + gap + chevron */
    color: #555;
    cursor: pointer;
    transition: background-color .12s, border-color .12s, color .12s;
}
.trip-lang-switch::-ms-expand { display: none; }   /* IE / legacy Edge */
.trip-lang-switch:hover { background-color: #f5f5f5; color: #1a1a1a; }
.trip-lang-switch:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* Buttons */
.trip-btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.4; transition: background .15s, border-color .15s; }
.trip-btn:hover { text-decoration: none; }
.trip-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.trip-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.trip-btn-ghost { background: #fff; color: #1a1a1a; border-color: #d4d4d4; }
.trip-btn-ghost:hover { background: #f5f5f5; color: #1a1a1a; }
.trip-btn-block { display: block; width: 100%; padding: 12px 16px; font-size: 15px; height: auto; }

/* Layout */
.trip-main { flex: 1 0 auto; }
.trip-container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.trip-narrow { max-width: 480px; }
.trip-section { margin-bottom: 32px; }

/* Hero */
.trip-hero { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); color: #fff; padding: 64px 20px; text-align: center; }
.trip-hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 12px; font-weight: 700; }
.trip-hero-sub { font-size: 17px; opacity: .92; max-width: 560px; margin: 0 auto 24px; }
.trip-hero-search input { width: 100%; max-width: 560px; padding: 14px 18px; border: none; border-radius: 8px; font-size: 15px; background: #fff; }

/* Cards / forms */
.trip-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 28px; }
.trip-card h1 { margin: 0 0 12px; font-size: 22px; }
.trip-card p { margin: 0 0 16px; color: #444; }
.trip-success { border-left: 4px solid #16a34a; }
.trip-error   { border-left: 4px solid #dc2626; }
.trip-alert { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 14px; }
.trip-alert-error { background: #fee; color: #991b1b; border: 1px solid #fcc; }
.trip-form { margin-top: 16px; }
.trip-label { display: block; margin-bottom: 16px; }
.trip-label > span { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
.trip-input { width: 100%; padding: 10px 12px; border: 1px solid #d4d4d4; border-radius: 6px; font-size: 15px; font-family: inherit; background: #fff; }
.trip-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.trip-input:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; }
.trip-btn:disabled, .trip-btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Misc */
.trip-muted { color: #666; }
.trip-empty { padding: 40px 20px; text-align: center; color: #666; }
.trip-data { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0; }
.trip-data dt { color: #666; font-size: 14px; }
.trip-data dd { margin: 0; color: #1a1a1a; }

/* Footer */
.trip-footer { background: #fff; border-top: 1px solid #e5e5e5; padding: 20px 0; margin-top: 40px; }
.trip-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; color: #666; font-size: 13px; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- */
/* Phase 4 — home, browse, trip detail, supplier */
/* ---------------------------------------------------------------- */

.trip-section-title { font-size: 22px; margin: 0 0 16px; font-weight: 600; }
.trip-section-cta   { text-align: center; margin-top: 24px; }
.trip-small         { font-size: 13px; }

/* Hero search */
.trip-hero-search {
    display: flex; gap: 8px; max-width: 600px; margin: 0 auto;
    flex-wrap: wrap; justify-content: center;
}
.trip-hero-search input[type="text"] {
    flex: 1 1 320px;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #1a1a1a;
}
.trip-hero-search button { flex: 0 0 auto; }

/* Categories grid */
.trip-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.trip-cat-tile {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    transition: border-color .12s, box-shadow .12s;
    gap: 8px;
}
.trip-cat-tile:hover { border-color: #2563eb; box-shadow: 0 2px 6px rgba(0,0,0,.05); text-decoration: none; }
.trip-cat-label { font-weight: 500; font-size: 14px; }
.trip-cat-count {
    background: #f1f5f9; color: #64748b;
    padding: 1px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
}

/* Card grid */
.trip-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.trip-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #1a1a1a;
    transition: transform .15s, box-shadow .15s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); text-decoration: none; }
.trip-card-image {
    aspect-ratio: 16 / 10;
    background-size: cover; background-position: center;
    background-color: #f0f0f0;
}
.trip-card-image-empty {
    background-image: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}
.trip-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.trip-card-title { font-size: 16px; margin: 0; font-weight: 600; line-height: 1.3; }
.trip-card-loc { color: #666; font-size: 13px; }
.trip-card-supplier { color: #888; font-size: 12px; margin-bottom: 4px; }
.trip-card-footer { margin-top: auto; padding-top: 8px; }
.trip-card-price { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.trip-card-price-suffix { color: #666; font-size: 12px; font-weight: normal; }
.trip-card-price-quote { font-size: 14px; font-weight: 600; color: #2563eb; }

/* Browse filter bar */
.trip-filter-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.trip-filter-bar .trip-input { flex: 1 1 160px; max-width: 240px; }
.trip-result-count { margin: 0 0 16px; font-size: 14px; }

/* Pagination */
.trip-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.trip-pagination a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid #d4d4d4; border-radius: 6px;
    background: #fff; color: #555; text-decoration: none;
    font-size: 14px;
}
.trip-pagination a:hover { background: #f5f5f5; text-decoration: none; }
.trip-pagination a.is-current { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Trip detail */
.trip-detail-title { font-size: 30px; margin: 16px 0 8px; }
.trip-detail-meta { color: #64748b; font-size: 15px; margin: 0 0 24px; }

.trip-detail-langs {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px; margin: 0 0 16px;
}
.trip-detail-langs-label { color: #64748b; font-size: 13px; margin-right: 4px; }
.trip-detail-lang-pill {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #555;
    font-size: 12px;
    text-decoration: none;
}
.trip-detail-lang-pill:hover { background: #f1f5f9; text-decoration: none; }
.trip-detail-lang-pill.is-active {
    background: #2563eb; color: #fff; border-color: #2563eb;
}

.trip-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}
.trip-detail-main > .trip-detail-section,
.trip-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
}
.trip-detail-main > .trip-detail-section { margin-bottom: 16px; padding: 20px 24px; }
.trip-detail-main > .trip-detail-section h2 { margin: 0 0 12px; font-size: 18px; }
.trip-detail-prose { line-height: 1.6; color: #333; white-space: pre-wrap; }
.trip-detail-summary { margin: 0; font-size: 16px; line-height: 1.55; color: #333; }
.trip-detail-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.trip-cat-chip {
    display: inline-block;
    padding: 4px 12px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
}
.trip-cat-chip:hover { background: #dbeafe; text-decoration: none; }

.trip-detail-map {
    width: 100%; height: 180px; border-radius: 8px;
    background: #f0f0f0;
}
.trip-detail-loc-title {
    font-size: 16px; margin: 0 0 10px;
}
.trip-detail-coords {
    margin: 8px 0 0; font-size: 12px; color: #64748b;
}

.trip-detail-aside { position: sticky; top: 80px; align-self: start; }
.trip-detail-card { padding: 24px; }
.trip-detail-price { font-size: 28px; font-weight: 700; }
.trip-detail-price-suffix { color: #64748b; font-size: 13px; margin-bottom: 14px; }
.trip-detail-pay-modes { list-style: none; padding: 0; margin: 14px 0; font-size: 13px; color: #444; }
.trip-detail-pay-modes li {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 13px;
    margin: 2px 4px 2px 0;
}
.trip-detail-dates { margin: 18px 0; }
.trip-detail-dates h4 { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.trip-detail-dates ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.trip-detail-dates li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.trip-detail-dates li:last-child { border-bottom: none; }
.trip-date-when { color: #1e293b; font-weight: 500; }
.trip-detail-seats { color: #16a34a; font-size: 12px; font-weight: 600; }
.trip-detail-sep { border: none; border-top: 1px solid #e2e8f0; margin: 18px 0; }
.trip-detail-supplier { display: flex; gap: 12px; align-items: center; text-decoration: none; color: #1a1a1a; }
.trip-detail-supplier:hover { text-decoration: none; }
.trip-detail-supplier-avatar {
    width: 48px; height: 48px; border-radius: 999px;
    background-size: cover; background-position: center;
    background-color: #e5e7eb;
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; font-weight: 700; font-size: 18px;
}
.trip-detail-supplier-meta { display: flex; flex-direction: column; }
.trip-detail-supplier-label { font-size: 12px; color: #94a3b8; }

/* Carousel */
.trip-carousel { margin-bottom: 16px; }
.trip-carousel-main {
    width: 100%; height: 480px;
    border-radius: 12px; overflow: hidden;
    background: #e2e8f0;
    position: relative;
}
.trip-carousel-slide {
    width: 100%; height: 100%; object-fit: cover;
    display: none;
    position: absolute; inset: 0;
}
.trip-carousel-slide.is-active { display: block; }
.trip-carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5); color: #fff;
    border: none;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; font-size: 22px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    z-index: 2;
}
.trip-carousel-nav:hover { background: rgba(0, 0, 0, 0.75); }
.trip-carousel-nav.prev { left: 12px; }
.trip-carousel-nav.next { right: 12px; }
.trip-carousel-counter {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0, 0, 0, 0.6); color: #fff;
    padding: 4px 10px; border-radius: 6px; font-size: 13px;
    z-index: 2;
}
.trip-carousel-thumbs {
    display: flex; gap: 6px; margin-top: 8px;
    overflow-x: auto; padding-bottom: 4px;
}
.trip-carousel-thumb {
    flex: 0 0 auto;
    width: 92px; height: 64px;
    border: 2px solid transparent;
    border-radius: 6px; padding: 0;
    cursor: pointer; overflow: hidden;
    background: #e2e8f0;
    transition: border-color .15s;
}
.trip-carousel-thumb.is-active { border-color: #2563eb; }
.trip-carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-carousel-empty {
    width: 100%; height: 280px;
    background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 36px;
    border-radius: 12px; margin-bottom: 16px;
}

/* Supplier page */
.trip-supplier-cover {
    height: 220px;
    background-size: cover; background-position: center;
    background-color: #1a1a1a;
}
.trip-supplier-head {
    display: flex; gap: 20px; align-items: flex-end;
    margin: -50px 0 24px;
    padding: 0;
}
.trip-supplier.has-no-cover .trip-supplier-head {
    margin-top: 32px;
    align-items: center;
}
.trip-supplier.has-no-cover .trip-supplier-avatar {
    border: none; box-shadow: none;
}
.trip-supplier-head h1 { font-size: 26px; margin: 0; }
.trip-supplier-head-meta { flex: 1 1 auto; min-width: 0; padding-bottom: 8px; }
.trip-supplier-head .trip-bookmark-form { padding-bottom: 8px; }
.trip-supplier-avatar {
    width: 100px; height: 100px; border-radius: 999px;
    background-size: cover; background-position: center;
    background-color: #e5e7eb;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: #555; font-weight: 700; font-size: 36px;
}
/* Bookmark buttons */
.trip-bookmark-form, .trip-bookmark-form-inline { margin: 0; }
.trip-bookmark-star {
    background: transparent;
    border: none;
    padding: 4px 8px;
    font-size: 28px;
    line-height: 1;
    color: #cbd5e1;
    cursor: pointer;
    transition: color .12s, transform .12s;
}
.trip-bookmark-star:hover { color: #f59e0b; transform: scale(1.1); }
.trip-bookmark-star.is-on { color: #f59e0b; }
.trip-bookmark-star.is-on:hover { color: #d97706; }

/* Trip title row — H1 left, star right */
.trip-detail-title-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 16px 0 8px;
}
.trip-detail-title-row .trip-detail-title { margin: 0; }

/* Saved suppliers grid */
.trip-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.trip-supplier-card {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
}
.trip-supplier-card:hover { border-color: #2563eb; text-decoration: none; }
.trip-supplier-card-avatar {
    width: 44px; height: 44px; border-radius: 999px;
    background-size: cover; background-position: center;
    background-color: #e5e7eb;
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: #555; font-weight: 700; font-size: 16px;
}
.trip-supplier-card-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip-supplier-card-meta strong { font-size: 14px; }

/* Adjust supplier head to make room for the bookmark button */

@media (max-width: 900px) {
    .trip-detail-layout { grid-template-columns: 1fr; }
    .trip-detail-aside { position: static; }
    .trip-carousel-main { height: 320px; }
}

@media (max-width: 720px) {
    .trip-header-inner { gap: 12px; }
    .trip-nav { order: 3; flex: 1 0 100%; gap: 16px; }
    .trip-nav a { font-size: 14px; }
    .trip-supplier-head { flex-direction: column; align-items: flex-start; text-align: left; margin-top: -40px; }
    .trip-filter-bar .trip-input { max-width: none; }
}

/* ---------------------------------------------------------------- */
/* Advanced search modal */
/* ---------------------------------------------------------------- */
.trip-modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    align-items: flex-start; justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.trip-modal.is-open { display: flex; }
.trip-modal-box {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.trip-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid #e5e5e5;
}
.trip-modal-head h2 { margin: 0; font-size: 18px; }
.trip-modal-close {
    background: transparent; border: none; font-size: 28px; line-height: 1;
    color: #555; cursor: pointer; padding: 0 8px;
}
.trip-modal-close:hover { color: #1a1a1a; }
.trip-modal-body { padding: 22px 24px; }
.trip-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.trip-modal-fullrow { grid-column: 1 / -1; }
.trip-modal-foot {
    display: flex; gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    align-items: center;
}

/* Filter icon button (used in hero search and browse filter bar) */
.trip-filter-iconbtn,
.trip-filter-iconbtn-relative {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    padding: 0;
    flex: 0 0 auto;
}
.trip-filter-iconbtn.trip-btn-ghost,
.trip-filter-iconbtn-relative.trip-btn-ghost { color: #1a1a1a; }
.trip-filter-iconbtn.trip-btn-primary,
.trip-filter-iconbtn-relative.trip-btn-primary { color: #fff; }
.trip-filter-iconbtn-relative { position: relative; }
.trip-filter-iconbtn.trip-btn-ghost:hover,
.trip-filter-iconbtn-relative.trip-btn-ghost:hover { background: #f5f5f5; }
.trip-filter-iconbtn-relative .trip-filter-badge {
    position: absolute; top: -4px; right: -4px;
    margin: 0;
}
.trip-filter-iconbtn svg,
.trip-filter-iconbtn-relative svg { display: block; }

/* Filter "more filters" badge (count of active advanced filters) */
.trip-filter-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #2563eb; color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; text-align: center;
}

/* Leaflet — sit nicely inside our card layouts */
.trip-detail-map.leaflet-container { background: #f0f0f0; }

@media (max-width: 600px) {
    .trip-modal-grid { grid-template-columns: 1fr; }
    .trip-modal { padding: 16px 8px; }
    .trip-modal-head, .trip-modal-body, .trip-modal-foot { padding-left: 16px; padding-right: 16px; }
}
/* ====================================================================
 * Phase 5 — Reservations / inquiries / me page
 * ==================================================================== */

/* Form labels paired with .trip-input siblings (modal forms). */
.trip-form-label {
    display: block;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin: 14px 0 6px;
}
.trip-form-label:first-child { margin-top: 0; }

/* Flash banners shown above the main content area. */
.trip-flash {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.trip-flash-ok  { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.trip-flash-err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Small / danger button variants. */
.trip-btn-sm     { padding: 6px 12px; font-size: 13px; height: auto; }
.trip-btn-danger { color: #b91c1c; }
.trip-btn-danger:hover { background: #fef2f2; }

/* Request cards on the consumer "me" page. */
.trip-request-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.trip-request-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.trip-request-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.trip-request-card-body { display: flex; flex-direction: column; gap: 6px; }
.trip-request-card-title { margin: 0; font-size: 15px; }
.trip-request-msg {
    margin: 4px 0 0;
    padding: 10px 12px;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    color: #334155;
}
.trip-request-response {
    margin: 4px 0 0;
    padding: 10px 12px;
    background: #f0fdf4;
    border-left: 3px solid #86efac;
    border-radius: 4px;
    font-size: 14px;
    color: #166534;
}
.trip-request-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.trip-request-card-actions form { margin: 0; }

/* Status pill on request cards. */
.trip-request-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
}
.trip-request-status-pending   { background: #ca8a04; }
.trip-request-status-accepted  { background: #16a34a; }
.trip-request-status-paid      { background: #2563eb; }
.trip-request-status-completed { background: #6b7280; }
.trip-request-status-declined  { background: #dc2626; }
.trip-request-status-cancelled { background: #6b7280; }
.trip-request-status-inquiry   { background: #7c3aed; }

/* Tighten textareas inside modals. */
.trip-modal-body textarea.trip-input { min-height: 88px; resize: vertical; }

/* Phase 5c.1 — request thread on me page */
.trip-request-thread { margin-top: 0.5rem; }
.trip-request-thread summary { cursor: pointer; font-size: 13px; color: #555; }
.trip-request-thread-body { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 6px; }
.trip-thread-msg { padding: 8px 10px; border-radius: 6px; max-width: 85%; }
.trip-thread-meta { font-size: 11px; color: #666; margin-bottom: 2px; }
.trip-thread-body { font-size: 14px; white-space: pre-wrap; }
.trip-thread-msg-supplier { background: #f3f4f6; align-self: flex-start; }
.trip-thread-msg-consumer { background: #dbeafe; align-self: flex-end; }
.trip-thread-msg-system   { background: #fef3c7; align-self: center; font-style: italic; max-width: 100%; text-align: center; }

/* Phase 5c.2 — icon button rows + videos */
.trip-btn-icon { padding: 8px 10px; }
.trip-btn-icon-row { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.trip-detail-videos { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.trip-detail-video { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; border-radius: 12px; background: #000; }
.trip-detail-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.trip-detail-video-link { font-size: 14px; }

/* Phase 5c.3 — icon-only action buttons + smaller embedded video */
.trip-detail-actions { display: flex; gap: 8px; margin-top: 4px; }
.trip-btn-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    flex: 1;
    height: 48px;
}
.trip-btn-icon-only svg { display: block; }
.trip-detail-videos-section .trip-detail-video {
    max-width: 480px;
    padding-top: min(56.25%, 270px);
}

/* Phase 5c.4 — cancel_pending status */
.trip-request-status-cancel_pending {
    background: #dc2626;
    animation: trip-pulse 1.6s ease-in-out infinite;
}
@keyframes trip-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }

/* ======================================================================
 * REVIEWS — Phase 5d-2 (consumer side)
 * ====================================================================== */

/* The review page itself: same width vibes as other content sections */
.trip-review-page { max-width: 720px; }
.trip-review-page h1 { margin-bottom: 8px; }
.trip-review-form { margin-top: 8px; }

/* --- STAR INPUT (radio-driven, no JS) ---------------------------------- *
 * Implementation: 5 radios are emitted in REVERSE order (5..1). They sit
 * in a flex container with `flex-direction: row-reverse`, which renders
 * them visually 1..5 left-to-right. The CSS sibling combinator (~) only
 * looks RIGHT in the DOM, but since the DOM order is 5..1, "to the right
 * of star N" in the DOM is "to the left of star N" visually — exactly
 * the cascade we want for fill-on-hover and fill-on-check.
 * --------------------------------------------------------------------- */
.trip-review-stars-fs {
    border: 0;
    padding: 0;
    margin: 0;
}
.trip-review-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
}
.trip-review-star-radio {
    /* Hide visually but keep accessible to keyboard + screen readers */
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.trip-review-star-label {
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    color: #e5e7eb;
    transition: color 0.12s ease, transform 0.12s ease;
    user-select: none;
    padding: 4px;
}
/* Default fill cascade: when a radio is checked, fill IT and every star
   visually to the LEFT of it (which is everything to the RIGHT in DOM). */
.trip-review-star-radio:checked ~ .trip-review-star-label,
.trip-review-star-radio:checked + .trip-review-star-label {
    color: #f59e0b;
}
/* Hover cascade: same idea, takes precedence while pointer is over the row. */
.trip-review-stars-input:hover .trip-review-star-label { color: #e5e7eb; }
.trip-review-star-label:hover,
.trip-review-star-label:hover ~ .trip-review-star-label {
    color: #fbbf24;
    transform: scale(1.05);
}
/* Keyboard focus ring on whichever star the radio currently has focus on */
.trip-review-star-radio:focus-visible + .trip-review-star-label {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- STAR DISPLAY (read-only, on the thanks page) ---------------------- */
.trip-review-readonly {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
}
.trip-review-stars-readonly {
    display: inline-flex;
    gap: 2px;
    font-size: 28px;
    line-height: 1;
    margin: 6px 0 12px;
}
.trip-review-star-readonly { color: #e5e7eb; }
.trip-review-star-readonly.is-on { color: #f59e0b; }
.trip-review-body-readonly {
    margin: 8px 0 0;
    padding: 8px 14px;
    border-left: 3px solid #cbd5e1;
    color: #374151;
    background: #fff;
    font-style: normal;
}

/* --- PILL on /me cards -------------------------------------------------- *
 * Compact "you reviewed this 4★" indicator that sits in the card actions
 * row alongside the other buttons. Looks like a chip, not a button.
 * --------------------------------------------------------------------- */
.trip-review-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #78350f;
    font-size: 0.85rem;
    line-height: 1;
}
.trip-review-pill-star { color: #e5e7eb; font-size: 0.95rem; }
.trip-review-pill-star.is-on { color: #f59e0b; }
.trip-review-pill-label { margin-left: 6px; font-weight: 500; }

/* Mobile: stars stay roomy enough to tap; the pill shrinks gracefully */
@media (max-width: 480px) {
    .trip-review-star-label { font-size: 32px; padding: 6px; }
    .trip-review-stars-readonly { font-size: 24px; }
    .trip-review-pill-label { display: none; }
}

/* /me card: collapsible review summary block ---------------------------- */
.trip-request-review-collapse,
.trip-request-review-summary-static {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}
.trip-request-review-collapse[open] {
    padding-bottom: 14px;
}
.trip-request-review-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
/* Collapse the default disclosure triangle */
.trip-request-review-summary::-webkit-details-marker { display: none; }
.trip-request-review-summary-static {
    cursor: default;
}
.trip-request-review-collapse > summary::after {
    content: "▾";
    margin-left: auto;
    color: #b45309;
    font-size: 0.9rem;
    transition: transform 0.15s ease;
}
.trip-request-review-collapse[open] > summary::after {
    transform: rotate(180deg);
}
.trip-request-review-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 18px;
    line-height: 1;
}
.trip-request-review-star { color: #e5e7eb; }
.trip-request-review-star.is-on { color: #f59e0b; }
.trip-request-review-body-wrap {
    margin-top: 10px;
}
.trip-request-review-body {
    margin: 0;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}
.trip-request-review-response {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fff;
    border-left: 2px solid #cbd5e1;
    font-size: 0.92rem;
    color: #374151;
}
.trip-request-review-response p { margin: 4px 0 0; line-height: 1.5; }


/* ======================================================================
 * REVIEWS — Phase 5d-3 (public display: cards, trip detail, supplier)
 * ====================================================================== */

/* Inline rating chip on trip detail meta + supplier head -------------- */
.trip-rating-summary {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #374151;
}
.trip-rating-summary strong { color: #111827; }
.trip-rating-star {
    color: #f59e0b;
    font-size: 1em;
    line-height: 1;
}
.trip-supplier-rating-line {
    margin: 4px 0 6px;
    font-size: 0.95rem;
}

/* Card rating line ------------------------------------------------------ */
.trip-card-rating {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.trip-card-rating-star {
    color: #f59e0b;
    font-size: 1em;
}
.trip-card-rating strong { color: #111827; font-weight: 600; }

/* Review list block ----------------------------------------------------- */
.trip-public-review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}
.trip-public-review {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 18px;
}
.trip-public-review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.trip-public-review-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 18px;
    line-height: 1;
}
.trip-public-review-star { color: #e5e7eb; }
.trip-public-review-star.is-on { color: #f59e0b; }
.trip-public-review-meta {
    color: #6b7280;
    font-size: 0.88rem;
}
.trip-public-review-pending {
    background: #fef3c7;
    color: #78350f;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: help;
    border: 1px solid #fcd34d;
}
.trip-public-review-trip {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #6b7280;
}
.trip-public-review-trip a {
    color: #2563eb;
    text-decoration: none;
}
.trip-public-review-trip a:hover { text-decoration: underline; }
.trip-public-review-body {
    margin: 6px 0 0;
    color: #374151;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* Supplier response (shown inline under the original review) ----------- */
.trip-public-review-response {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    border-left: 3px solid #6b7280;
    border-radius: 4px;
}
.trip-public-review-response-head {
    font-size: 0.9rem;
    color: #374151;
}
.trip-public-review-response p {
    margin: 4px 0 0;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Mobile breakpoint adjustments ---------------------------------------- */
@media (max-width: 480px) {
    .trip-public-review { padding: 12px 14px; }
    .trip-public-review-stars { font-size: 16px; }
    .trip-public-review-meta { font-size: 0.82rem; }
}

/* Links — icon tiles in the right aside card + supplier page ------------- */
.trip-detail-aside-title {
    margin: 0 0 10px;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.trip-aside-link-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trip-aside-link-grid li { margin: 0; padding: 0; }

.trip-aside-link-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--trip-accent, #2563eb);
    text-decoration: none;
    transition: background-color .15s, border-color .15s, transform .1s;
}

.trip-aside-link-tile:hover {
    background: #e0ecff;
    border-color: #bfdbfe;
    text-decoration: none;
}

.trip-aside-link-tile:active { transform: scale(0.96); }

.trip-supplier-links { margin-top: 16px; }
.trip-supplier-link-grid { /* slightly larger gap on supplier page */ gap: 10px; }