/* Site-wide: the redesign drops the cream/beige backgrounds and the serif headings everywhere, not just on trips. */
:root { --gg-cream: #ffffff; --gg-sand: #f4f5f3; --gg-line: #e7e9e6; }
html, body { background: #fff !important; }
body, button, input, select, textarea { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: 800; letter-spacing: -.02em;
}
.desktop-nav { background: rgba(255, 255, 255, .95); border-bottom: 1px solid #e7e9e6; }
.navbar.app-nav.bg-light { background: transparent !important; }

/* Website trip page, matching the app's redesign: white surfaces, one typeface, forest for actions,
   coral for highlights, each day its own block and each item its own card. Loaded after app.css. */
.trip-detail-page {
    --rd-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --rd-bg: #ffffff;
    --rd-sunken: #f4f5f3;
    --rd-ink: #111a16;
    --rd-muted: #6b746f;
    --rd-line: #e7e9e6;
    --rd-forest: #1f4d3f;
    --rd-forest-tint: #e7f0eb;
    --rd-coral: #e2674a;
    --pl-primary: #1f4d3f;
    --pl-border: #e7e9e6;
    --pl-surface: #ffffff;
    --pl-text: #111a16;
    font-family: var(--rd-font);
    color: var(--rd-ink);
}
body:has(.trip-detail-page) { background: #fff !important; }
/* One typeface: the older styles set serif headings with high specificity. */
.trip-detail-page :is(h1, h2, h3, h4, summary, .trip-step-title, .trip-hero-title) { font-family: var(--rd-font) !important; letter-spacing: -.01em; }

/* Compact header instead of the photo banner */
.trip-detail-page .trip-web-header { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; }
.trip-detail-page .trip-web-back, .trip-detail-page .trip-web-icon {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: var(--rd-sunken); color: var(--rd-ink); text-decoration: none;
}
.trip-detail-page .trip-web-thumb { width: 56px; height: 56px; flex: none; border-radius: 14px; object-fit: cover; }
.trip-detail-page .trip-web-title { flex: 1; min-width: 0; }
.trip-detail-page .trip-web-title h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.7rem; font-weight: 800; color: var(--rd-ink); }
.trip-detail-page .trip-web-title p { margin: 2px 0 0; color: var(--rd-muted); font-size: .92rem; font-weight: 600; }
.trip-detail-page .trip-web-undecided { color: var(--rd-coral); }
.trip-detail-page .trip-web-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.trip-detail-page .trip-web-actions .trip-hero-people {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--rd-line); border-radius: 999px;
    background: #fff; color: var(--rd-ink); font-size: .88rem; font-weight: 700;
}
.trip-detail-page .trip-web-actions .trip-hero-avatars { display: flex; }
.trip-detail-page .trip-web-actions .trip-hero-avatars > * {
    display: grid; place-items: center; width: 28px; height: 28px; margin-left: -8px; border: 2px solid #fff; border-radius: 50%;
    background: var(--rd-forest); color: #fff; font-size: 10px; font-weight: 700; object-fit: cover;
}
.trip-detail-page .trip-web-actions .trip-hero-avatars > :first-child { margin-left: 0; }
.trip-detail-page .trip-web-actions .trip-hero-going { min-height: 40px; background: var(--rd-forest-tint); color: var(--rd-forest); }
.trip-detail-page .trip-web-actions .trip-hero-rsvp { min-height: 40px; background: var(--rd-forest); color: #fff; }
.trip-detail-page .trip-web-actions .trip-hero-unrsvp { min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--rd-muted); font-weight: 600; }
.trip-detail-page .trip-web-desc { max-width: 70ch; margin: -4px 0 10px 54px; color: var(--rd-muted); font-size: .92rem; }
.trip-detail-page .trip-web-desc :last-child { margin-bottom: 0; }

/* Tabs: plain words with a coral underline */
.trip-detail-page .trip-web-tabs {
    display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--rd-line);
    background: none; overflow-x: auto;
}
.trip-detail-page .trip-web-tabs button {
    flex: none; min-height: 46px; padding: 0; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none;
    color: var(--rd-muted); font-size: .95rem; font-weight: 700;
}
.trip-detail-page .trip-web-tabs button.active { color: var(--rd-ink); border-bottom-color: var(--rd-coral); }
.trip-detail-page .trip-web-tabs .trip-web-tab-end { margin-left: auto; color: var(--rd-forest); }

/* Two columns: the plan, and a side column (map, assistant, members) that stays in view */
.trip-detail-page .trip-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; margin-top: 18px; }
@media (min-width: 992px) {
    .trip-detail-page .trip-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-bottom: 8px; }
}
.trip-detail-page .trip-step, .trip-detail-page .date-planner-toggle, .trip-detail-page .trip-side-card {
    border: 1px solid var(--rd-line); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(17,26,22,.04);
}

/* Itinerary card head */
.trip-detail-page .trip-itinerary { overflow: visible; }
.trip-detail-page .trip-itinerary .trip-step-title { font-size: 1.35rem; font-weight: 800; color: var(--rd-ink); }
.trip-detail-page .trip-segment { border-radius: 10px; background: var(--rd-sunken); }
.trip-detail-page .trip-pill-primary { background: var(--rd-forest); border-color: var(--rd-forest); }

/* Day chips: jump to a day; they stay at the top while the list scrolls */
.trip-detail-page .trip-day-chips {
    position: sticky; top: 0; z-index: 3; display: flex; gap: 8px; padding: 10px 22px; overflow-x: auto;
    border-bottom: 1px solid var(--rd-line); background: #fff; scrollbar-width: thin;
}
.trip-detail-page .trip-day-chips button {
    display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
    background: var(--rd-sunken); color: var(--rd-ink); font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.trip-detail-page .trip-day-chips button:hover { background: #e9ece9; }
.trip-detail-page .day-dot { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 50%; }

/* The site's top bar is sticky on wider screens (about 77px tall), so the chips stop just below it. */
@media (min-width: 768px) { .trip-detail-page .trip-day-chips { top: 77px; } .trip-detail-page .trip-itinerary .trip-day-header { scroll-margin-top: 140px; } }
@media (min-width: 992px) { .trip-detail-page .trip-side { top: 93px; max-height: calc(100vh - 109px); } }

/* Item cards: no beige action strip or details band */
.trip-detail-page .itinerary-item .item-actions { border-top: 1px solid var(--rd-line); background: #fff; }
.trip-detail-page .itinerary-item .item-details { border-top: 1px solid var(--rd-line); background: #fff; }
.trip-detail-page .itinerary-item .item-details > summary { color: var(--rd-muted); }
.trip-detail-page .itinerary-item .utility-button, .trip-detail-page .itinerary-item .vote-actions button {
    border: 0; background: var(--rd-sunken); color: var(--rd-ink);
}
.trip-detail-page .itinerary-item .utility-button:hover, .trip-detail-page .itinerary-item .vote-actions button:hover { background: #e9ece9; color: var(--rd-ink); }
.trip-detail-page .itinerary-item .utility-button.is-active { background: var(--rd-forest-tint); color: var(--rd-forest); }
.trip-detail-page .itinerary-item .item-summary:hover { background: #fafbfa; }
.trip-detail-page .itinerary-item .itinerary-files { border: 0; border-top: 1px solid var(--rd-line); border-radius: 0; margin: 0; background: #fff; }

/* Days: each day is its own block with a grey band between days */
.trip-detail-page .trip-itinerary .list-group { padding-bottom: 12px; }
.trip-detail-page .trip-itinerary .trip-day-header {
    display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 22px 22px 10px; border: 0;
    scroll-margin-top: 64px; color: var(--rd-ink); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; text-transform: none;
}
.trip-detail-page .trip-itinerary .trip-day-header ~ .trip-day-header { border-top: 10px solid var(--rd-sunken); margin-top: 14px; }
.trip-detail-page .trip-itinerary .trip-day-header .day-dot { align-self: center; width: 12px; height: 12px; }
.trip-detail-page .trip-day-header span { margin-left: 0; }
.trip-detail-page .trip-day-number { margin-left: auto !important; }
.trip-detail-page .trip-day-number, .trip-detail-page .trip-day-count { color: var(--rd-muted); font-size: .85rem; font-weight: 600; letter-spacing: 0; }
.trip-detail-page .trip-day-count::before { content: "· "; }
.trip-detail-page .trip-day-header > strong + .trip-day-count { margin-left: auto !important; }
.trip-detail-page .trip-day-header > strong + .trip-day-count::before { content: ""; }

/* Items: each one is its own card */
.trip-detail-page .trip-itinerary .itinerary-item {
    margin: 0 22px 10px; padding: 0; border: 1px solid var(--rd-line) !important; border-radius: 16px; background: #fff;
    box-shadow: 0 1px 2px rgba(17,26,22,.05); overflow: hidden;
}
.trip-detail-page .trip-itinerary .itinerary-item .item-summary:hover { background: #fafbfa; }
.trip-detail-page .trip-itinerary .itinerary-item .type-icon { border-radius: 50%; background: var(--rd-sunken); color: var(--rd-ink); }
.trip-detail-page .trip-itinerary .itinerary-item .item-title { font-family: var(--rd-font); font-weight: 800; color: var(--rd-ink); }
.trip-detail-page .item-map-number { width: 24px; height: 24px; font-size: 11.5px; font-weight: 800; }
.trip-detail-page .trip-itinerary .text-warning { margin: 0 22px 8px; border: 0; border-radius: 12px; background: #fff4dc; color: #8a5a00 !important; font-size: .88rem; }

/* Side column */
.trip-detail-page .trip-side-card h2, .trip-detail-page .trip-side-head h2 { font-size: 1.1rem; font-weight: 800; color: var(--rd-ink); }
.trip-detail-page .trip-map-canvas { border-radius: 14px; }

/* Trip assistant on the website: the same look as the app's sheet */
.trip-detail-page .trip-side .trip-planning-aside { margin: 0; padding: 16px; border: 1px solid var(--rd-line); border-radius: 18px; background: #fff; }
.trip-detail-page .trip-side .planning-chat { padding: 0; border: 0; }
.trip-detail-page .trip-side .planning-chat .planning-question p { color: #fff; }
.trip-detail-page .trip-side .planning-chat .assistant-composer { background: #fff; }

@media (max-width: 991px) {
    .trip-detail-page .trip-web-header { flex-wrap: wrap; }
    .trip-detail-page .trip-web-actions { width: 100%; justify-content: flex-start; }
    .trip-detail-page .trip-web-title h1 { font-size: 1.35rem; }
    .trip-detail-page .trip-web-desc { margin-left: 0; }
    .trip-detail-page .trip-itinerary .itinerary-item { margin: 0 12px 10px; }
    .trip-detail-page .trip-itinerary .trip-day-header { padding: 18px 14px 8px; font-size: 1.25rem; }
    .trip-detail-page .trip-day-chips { padding: 10px 14px; }
}

/* Form fields everywhere on the site: white, not cream */
.form-control, .form-select, .modal-content :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select) { background-color: #fff; }

/* Tickets and files sits inside the item card as a plain row; an older rule gave every planning button a pill border. */
.trip-detail-page .itinerary-item .itinerary-files { margin: 0; border: 0; border-top: 1px solid var(--rd-line); border-radius: 0; background: #fff; }
.trip-detail-page .itinerary-item .itinerary-files .itinerary-files-toggle {
    min-height: 42px; margin: 0; padding: 0 1rem; border: 0; border-radius: 0; background: none; box-shadow: none;
    color: var(--rd-muted); font-size: .82rem; font-weight: 650;
}
.trip-detail-page .itinerary-item .itinerary-files .itinerary-files-toggle:hover:not(:disabled) { border: 0; background: #fafbfa; }

/* Selected votes: white icon on the dark green, never black */
.trip-detail-page .vote-actions button.is-selected, .trip-detail-page .vote-actions button.is-selected:first-child { color: #fff; }
.trip-detail-page .vote-actions button.is-selected :is(svg, i, path) { color: #fff; stroke: currentColor; }
.trip-detail-page .vote-actions button.is-selected:not(:first-child) { background: #a3402a; border-color: #a3402a; }

/* Photo thumbnail on the item card */
.trip-detail-page .itinerary-item .item-thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; background: var(--rd-sunken); }
.trip-detail-page .itinerary-item .item-summary:has(.item-thumb) { grid-template-columns: 2.75rem minmax(0, 1fr) auto auto; }

/* "Who can do what?" reads as an info note, not a disclosure arrow */
.trip-detail-page .trip-side-note > summary { display: flex; align-items: center; gap: 6px; list-style: none; color: var(--rd-muted); font-weight: 650; }
.trip-detail-page .trip-side-note > summary::-webkit-details-marker { display: none; }
.trip-detail-page .trip-side-note > summary .bi { color: var(--rd-forest); font-size: 1rem; }

/* Cards, menus and account pages: white instead of cream across the site */
.account-layout > div:last-child, .account-utility-shell, .bg-light-subtle, .feature-card, .gg-card, .journal-editor-card,
.mobile-more-menu, .trip-user-card, .auth-card, .web-chat-picker, .web-chat-language select, .journal-action-secondary,
.trip-detail-page .itinerary-filter-menu > div, .trip-detail-page .trip-tabs { background: #fff !important; }
.list-group-item-action:hover { background: #f4f5f3; }

/* Half-page map on the trip page: the expand button gives the map and the plan half the width each */
.trip-detail-page .trip-map-card .trip-side-head { display: flex; align-items: center; gap: 8px; }
.trip-detail-page .trip-map-card .trip-map-count { margin-left: auto; }
.trip-map-expand {
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
    background: var(--rd-sunken, #f4f5f3); color: var(--rd-ink, #111a16);
}
.trip-map-expand:hover { background: #e9ece9; }
@media (min-width: 992px) {
    .trip-detail-page .trip-layout.map-expanded { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .trip-detail-page .trip-layout.map-expanded .trip-map-canvas { height: calc(100vh - 190px); min-height: 420px; }
}

/* Messages and journal pages: the content and the trip map side by side, half and half */
.trip-split { display: grid; gap: 24px; align-items: start; max-width: 1500px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 24px); }
.trip-split-main { min-width: 0; }
.trip-split-main > .gg-page { max-width: none; margin: 0; padding-left: 0; padding-right: 0; }
.trip-split-map .trip-map-card { margin: 0; padding: 14px; border: 1px solid #e7e9e6; border-radius: 18px; background: #fff; }
.trip-split-map .trip-side-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.trip-split-map .trip-side-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.trip-split-map .trip-map-count { color: #6b746f; font-size: .85rem; font-weight: 600; }
.trip-split-map .trip-map-canvas { height: 320px; overflow: hidden; border-radius: 12px; background: #e9efe8; }
.trip-split-map .trip-map-empty { margin: 0; padding: 4px; color: #6b746f; }
@media (min-width: 992px) {
    .trip-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .trip-split-map { position: sticky; top: 93px; }
    .trip-split-map .trip-map-canvas { height: calc(100vh - 180px); min-height: 420px; }
}

/* Messages: the other members' bubbles were cream; light grey matches the rest of the redesign */
.chat-row.other .chat-bubble { background-color: #f4f5f3; color: #111a16; }
.chat-row.me .chat-bubble { color: #fff; }
.chat-bubble { box-shadow: none; }

/* The half-page layout only exists on wide screens, so the expand button only shows there */
@media (max-width: 991px) { .trip-map-expand { display: none; } }

/* The side column never grows past its track: long chat titles and labels shrink instead of being cut off */
.trip-detail-page .trip-side { overflow-x: hidden; }
.trip-detail-page .trip-side > *, .trip-detail-page .trip-side .trip-planning-aside, .trip-detail-page .trip-side .planning-chat { min-width: 0; max-width: 100%; }
.trip-detail-page .trip-side .planning-chat-controls select { width: 0; flex: 1 1 auto; text-overflow: ellipsis; }
.trip-detail-page .trip-side .trip-side-head { min-width: 0; }
.trip-detail-page .trip-side .trip-map-count { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tapped Google place: add it to the trip */
.trip-map-hint { margin: 8px 4px 0; color: #6b746f; font-size: .82rem; }
.trip-map-place { display: grid; gap: 4px; margin-top: 10px; padding: 12px; border: 1px solid #e7e9e6; border-radius: 14px; background: #fff; }
.trip-map-place-head { display: flex; align-items: center; gap: 8px; }
.trip-map-place-head strong { flex: 1; min-width: 0; font-size: 1rem; font-weight: 800; }
.trip-map-place small { color: #6b746f; font-weight: 600; }
.trip-map-place-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #f4f5f3; color: #111a16; }
.trip-map-place-add { display: flex; gap: 8px; margin-top: 6px; }
.trip-map-place-add select { flex: 1; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid #e7e9e6; border-radius: 10px; background: #fff; font: inherit; font-size: .88rem; }
.trip-map-place-button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: #1f4d3f; color: #fff; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.trip-map-place-button:disabled { opacity: .6; }
.trip-map-place-done { margin: 6px 0 0; color: #1f4d3f; font-weight: 700; }
.trip-map-place-error { margin: 4px 0 0; color: #b42318; font-weight: 600; font-size: .85rem; }

/* Item details: an address block and icon rows instead of a list of labelled fields */
.itinerary-item .item-details-content { gap: .6rem; }
.itinerary-item .item-address-block, .itinerary-item .item-detail-row { display: flex; align-items: flex-start; gap: .6rem; color: #111a16; }
.itinerary-item .item-address-block > i, .itinerary-item .item-detail-row > i { flex: none; width: 1rem; margin-top: .1rem; color: #1f4d3f; }
.itinerary-item .item-address-block address { display: grid; gap: 1px; margin: 0; font-style: normal; line-height: 1.45; }
.itinerary-item .item-address-block strong { color: #111a16; font-weight: 800; }
.itinerary-item .item-detail-row a { color: #1f4d3f; text-decoration: underline; text-underline-offset: 2px; }
.itinerary-item .item-address-map { justify-self: start; margin: 4px 0 0; padding: 4px 11px; border: 0; border-radius: 999px; background: #e7f0eb; color: #1f4d3f; font-size: .78rem; font-weight: 700; }
.itinerary-item .item-detail-notes { margin: 0; padding: .5rem .7rem; border-radius: .6rem; background: #f4f5f3; color: #111a16; }

/* Item type icons: the same line icons as the app */
.itinerary-item .type-icon .travel-type-icon { width: 20px; height: 20px; }

/* The tapped place's card and status sit on the map itself, where people are looking */
.trip-map-stage { position: relative; }
.trip-map-stage .trip-map-place { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 5; margin: 0; box-shadow: 0 10px 28px rgba(17,26,22,.22); }
.trip-map-toast { position: absolute; left: 50%; top: 10px; z-index: 5; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 999px;
    background: rgba(17,26,22,.86); color: #fff; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.trip-map-toast.is-error { background: #b42318; }
.trip-map-toast button { margin-left: 8px; padding: 0 8px; border: 0; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; font-weight: 800; }

/* Item card heading, like the app: left slot (map number or type icon) aligned with the title, title wraps cleanly,
   status as a small tag, then the meta line; photo top right, chevron centred */
.trip-detail-page .itinerary-item .item-summary { grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: start; gap: .8rem; padding: 14px 16px 12px; }
.trip-detail-page .itinerary-item .item-summary:has(.item-thumb) { grid-template-columns: 2.25rem minmax(0, 1fr) 64px auto; }
.trip-detail-page .itinerary-item .type-icon { width: 2.25rem; height: 2.25rem; margin-top: 1px; }
.trip-detail-page .itinerary-item .item-map-slot { display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: .9rem; font-weight: 800; }
.trip-detail-page .itinerary-item .item-copy { display: grid; gap: 4px; min-width: 0; }
.trip-detail-page .itinerary-item .item-heading { display: block; }
.trip-detail-page .itinerary-item .item-title { font-size: 1.02rem; line-height: 1.3; }
.trip-detail-page .itinerary-item .item-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trip-detail-page .itinerary-item .planning-status {
    display: inline-block; margin: 0; padding: 2px 9px; border-radius: 999px; background: #fff4dc; color: #8a5a00; font-size: .72rem; font-weight: 700;
}
.trip-detail-page .itinerary-item .planning-status-confirmed, .trip-detail-page .itinerary-item .planning-status-approved { background: #e7f0eb; color: #1f4d3f; }
.trip-detail-page .itinerary-item .item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: #6b746f; font-size: .82rem; }
.trip-detail-page .itinerary-item .item-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.trip-detail-page .itinerary-item .item-type-label .travel-type-icon { width: 14px; height: 14px; }
.trip-detail-page .itinerary-item .item-thumb { align-self: start; }
.trip-detail-page .itinerary-item .summary-chevron { align-self: center; color: #b5bcb8; }

/* Walking routes toggle in the map header */
.trip-map-walks.is-on { background: #1f4d3f; color: #fff; }
.trip-map-walks:disabled { opacity: .6; }

/* Day tools: Suggest for this day, Optimize order */
.trip-detail-page .trip-itinerary .trip-day-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 8px; padding: 0 22px; border: 0; }
.trip-detail-page .trip-itinerary .trip-day-tools button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; margin: 0; padding: 0; border: 0; background: none; color: #1f4d3f; font-size: .85rem; font-weight: 700; }
.trip-detail-page .trip-itinerary .trip-day-tools button:disabled { opacity: .6; }
.trip-detail-page .trip-itinerary .trip-day-optimize { display: grid; gap: 6px; margin: 0 22px 12px; padding: 12px 14px; border: 1px solid #e7e9e6 !important; border-radius: 14px; background: #f4f5f3; }
.trip-detail-page .trip-day-optimize p { margin: 0; }
.trip-detail-page .trip-day-optimize ol { margin: 0; padding-left: 1.2rem; }
.trip-detail-page .trip-day-optimize small { color: #6b746f; }
.trip-detail-page .trip-day-optimize button { justify-self: start; margin: 4px 0 0; }
.trip-detail-page .trip-day-optimize .trip-day-optimize-close { border: 0; background: none; color: #6b746f; padding: 0; font-weight: 600; }
@media (max-width: 991px) { .trip-detail-page .trip-itinerary .trip-day-tools { padding: 0 14px; } .trip-detail-page .trip-itinerary .trip-day-optimize { margin: 0 12px 12px; } }

/* Every item carries its day's colour on its left edge, as in the app. */
.trip-detail-page .trip-itinerary .itinerary-item {
    box-shadow: inset 3px 0 0 var(--day-color, var(--rd-line)), 0 1px 2px rgba(17,26,22,.05);
}

/* Share with family panel on the trip page */
.trip-detail-page .trip-family-panel { display: grid; gap: 12px; margin: 0 22px 16px; padding: 16px 18px; border: 1px solid var(--rd-line); border-radius: 16px; background: #fff; }
.trip-detail-page .trip-family-panel h2 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.trip-detail-page .trip-family-panel p { margin: 0; color: var(--rd-muted); font-size: .9rem; }
.trip-detail-page .trip-family-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trip-detail-page .trip-family-link input { flex: 1 1 260px; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--rd-line); border-radius: 999px; background: var(--rd-sunken); font: 600 .88rem var(--rd-font); }
.trip-detail-page .trip-family-open { color: var(--rd-forest); font-weight: 700; }
.trip-detail-page .trip-family-off { justify-self: start; padding: 0; border: 0; background: none; color: #b42318; font-weight: 700; }
.trip-detail-page .trip-family-keep { padding: 0; border: 0; background: none; color: var(--rd-forest); font-weight: 700; margin-left: 10px; }
.trip-detail-page .trip-family-error { color: #b42318 !important; font-weight: 600; }

/* "Open in the app" banner for iPhone and iPad visitors */
.trip-detail-page .trip-app-banner { display: flex; align-items: center; gap: 10px; margin: 0 22px 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--rd-forest-tint); color: var(--rd-ink); font-weight: 600; font-size: .9rem; }
.trip-detail-page .trip-app-banner span { flex: 1; min-width: 0; }
.trip-detail-page .trip-app-banner a { flex: none; text-decoration: none; }

/* Money: balances, suggested payments and the payments list, a peer of the itinerary under the tabs */
.trip-detail-page .trip-money { display: grid; gap: 16px; max-width: 860px; margin-top: 18px; }
.trip-detail-page .trip-money-card { padding: 20px 22px; border: 1px solid var(--rd-line); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(17,26,22,.04); }
.trip-detail-page .trip-money-card > :last-child { margin-bottom: 0; }
.trip-detail-page .trip-money-loading { display: flex; align-items: center; gap: 10px; color: var(--rd-muted); font-weight: 600; }
.trip-detail-page .trip-money-message { margin: 0; }
.trip-detail-page .trip-money-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.trip-detail-page .trip-money-eyebrow { color: var(--rd-muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.trip-detail-page .trip-money-headline { margin: 2px 0 0; font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rd-ink); overflow-wrap: anywhere; }
.trip-detail-page .trip-money-sub, .trip-detail-page .trip-money-muted { margin: 2px 0 0; color: var(--rd-muted); font-size: .9rem; }
.trip-detail-page .trip-money-title { margin: 0 0 12px; font-size: 1.2rem; font-weight: 800; }
.trip-detail-page .trip-money-subtitle { margin: 18px 0 8px; font-size: 1rem; font-weight: 800; }
.trip-detail-page .is-owed { color: var(--rd-forest) !important; }
.trip-detail-page .is-owing { color: var(--rd-coral) !important; }
.trip-detail-page .trip-money-balances { width: 100%; border-collapse: collapse; font-size: .92rem; }
.trip-detail-page .trip-money-balances th, .trip-detail-page .trip-money-balances td { padding: 9px 8px; border-bottom: 1px solid var(--rd-line); }
.trip-detail-page .trip-money-balances thead th { color: var(--rd-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.trip-detail-page .trip-money-balances tbody tr:last-child > * { border-bottom: 0; }
.trip-detail-page .trip-money-balances .num, .trip-detail-page .trip-money .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-detail-page .trip-money-balances td.num { font-weight: 700; }
.trip-detail-page .trip-money-name { max-width: 0; width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.trip-detail-page .trip-money-balances tr.is-me .trip-money-name { color: var(--rd-forest); }
.trip-detail-page .trip-money-transfers { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.trip-detail-page .trip-money-transfers li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rd-sunken); overflow-wrap: anywhere; }
.trip-detail-page .trip-money-transfers i { color: var(--rd-forest); }
.trip-detail-page .trip-money-note { display: flex; gap: 8px; margin: 12px 0 0; color: var(--rd-muted); font-size: .86rem; }
.trip-detail-page .trip-money-empty { margin: 0; color: var(--rd-muted); }
.trip-detail-page .trip-money-payments { margin: 0; padding: 0; list-style: none; }
.trip-detail-page .trip-money-payment { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rd-line); }
.trip-detail-page .trip-money-payment:first-child { border-top: 0; padding-top: 0; }
.trip-detail-page .trip-money-payment-main { min-width: 0; }
.trip-detail-page .trip-money-payment-main p { margin: 0; overflow-wrap: anywhere; }
.trip-detail-page .trip-money-payment-title { font-weight: 800; }
.trip-detail-page .trip-money-payment-item, .trip-detail-page .trip-money-payment-meta { color: var(--rd-muted); font-size: .86rem; }
.trip-detail-page .trip-money-payment-line { font-variant-numeric: tabular-nums; font-weight: 600; }
.trip-detail-page .trip-money-payment-actions { display: flex; gap: 6px; flex: none; }
.trip-detail-page .trip-money-action, .trip-detail-page .trip-money-more {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px;
    background: var(--rd-sunken); color: var(--rd-ink); font-size: .85rem; font-weight: 700;
}
.trip-detail-page .trip-money-action:hover, .trip-detail-page .trip-money-more:hover { background: #e9ece9; }
.trip-detail-page .trip-money-action.is-danger { color: #b42318; }
.trip-detail-page .trip-money-more { margin-top: 12px; }
@media (max-width: 575.98px) {
    .trip-detail-page .trip-money-card { padding: 16px; }
    .trip-detail-page .trip-money-payment { flex-direction: column; }
    .trip-detail-page .trip-money-headline { font-size: 1.4rem; }
}

/* The payment form */
.trip-detail-page .payment-form { border-radius: 18px; background: #fff; }
.trip-detail-page .payment-form .modal-body { display: grid; gap: 14px; }
.trip-detail-page .payment-field { display: grid; gap: 4px; margin: 0; }
.trip-detail-page .payment-field > span, .trip-detail-page .payment-group legend { color: var(--rd-ink); font-size: .88rem; font-weight: 700; }
.trip-detail-page .payment-field small { color: var(--rd-muted); }
.trip-detail-page .payment-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.1fr); gap: 10px; }
@media (max-width: 575.98px) { .trip-detail-page .payment-row { grid-template-columns: 1fr 1fr; } .trip-detail-page .payment-date { grid-column: 1 / -1; } }
.trip-detail-page .payment-number { font-variant-numeric: tabular-nums; }
.trip-detail-page .payment-group { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.trip-detail-page .payment-group legend { float: none; margin: 0 0 2px; }
.trip-detail-page .payment-person-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trip-detail-page .payment-person-row select { flex: 1; min-width: 0; }
.trip-detail-page .payment-person-row input.payment-number { width: 8rem; flex: none; }
.trip-detail-page .payment-person-row input.payment-shares { width: 5rem; }
.trip-detail-page .payment-sharer-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; min-height: 36px; }
.trip-detail-page .payment-sharer-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-detail-page .payment-part { flex: none; min-width: 6rem; text-align: right; color: var(--rd-muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.trip-detail-page .payment-preview { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--rd-forest-tint); color: var(--rd-forest); font-weight: 700; font-variant-numeric: tabular-nums; }
.trip-detail-page .payment-hint { margin: 0; font-size: .86rem; font-weight: 700; }
.trip-detail-page .payment-hint.is-ok { color: var(--rd-forest); }
.trip-detail-page .payment-hint.is-off { color: var(--rd-coral); }
.trip-detail-page .payment-link-button { justify-self: start; min-height: 36px; padding: 0; border: 0; background: none; color: var(--rd-forest); font-weight: 700; }
.trip-detail-page .payment-icon-button { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--rd-sunken); color: var(--rd-ink); }
.trip-detail-page .payment-form-item { margin: 0; color: var(--rd-muted); overflow-wrap: anywhere; }
.trip-detail-page .payment-form-problems ul { margin: 4px 0 0; padding-left: 18px; }
.trip-detail-page .payment-split { justify-self: start; }

/* Item editor: who's in on the item's cost, one traveler per line (locked-in first), each with a $, % or shares field. */
.trip-detail-page .item-cost-split { display: grid; gap: 10px; margin: 6px 0 12px; padding: 14px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; min-width: 0; }
.trip-detail-page .item-cost-split-title { margin: 0; font-weight: 800; color: var(--rd-ink); }
.trip-detail-page .item-cost-split-note, .trip-detail-page .item-cost-split-hint { margin: 0; color: var(--rd-muted); font-size: .86rem; overflow-wrap: anywhere; }
.trip-detail-page .item-cost-split-note.is-off { color: #b42318; font-weight: 700; }
.trip-detail-page .item-cost-split-payer { display: grid; gap: 4px; margin: 0; }
.trip-detail-page .item-cost-split-payer > span { font-size: .88rem; font-weight: 700; color: var(--rd-ink); }
.trip-detail-page .item-cost-split-paid { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.trip-detail-page .item-cost-split-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.trip-detail-page .item-cost-split-even { min-height: 36px; padding: 0 14px; border: 1px solid var(--rd-forest); border-radius: 999px; background: var(--rd-forest); color: #fff; font-weight: 700; }
.trip-detail-page .item-cost-split-even:hover, .trip-detail-page .item-cost-split-even:focus-visible { background: #173b30; }
.trip-detail-page .item-cost-split-modes { display: inline-flex; gap: 2px; padding: 3px; }
.trip-detail-page .item-cost-split-modes button { min-width: 44px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--rd-muted); font-weight: 700; }
.trip-detail-page .item-cost-split-modes button.selected { background: #fff; color: var(--rd-forest); box-shadow: 0 1px 2px rgba(17,26,22,.12); }
.trip-detail-page .item-cost-split-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.trip-detail-page .item-cost-split-row { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 2px 0; border-bottom: 1px solid var(--rd-line); }
.trip-detail-page .item-cost-split-row:last-child { border-bottom: 0; }
.trip-detail-page .item-cost-split-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; padding-left: 0; font-weight: 600; }
.trip-detail-page .item-cost-split-name .form-check-input { flex: none; margin: 0; }
.trip-detail-page .item-cost-split-name span, .trip-detail-page .is-readonly .item-cost-split-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-detail-page .item-cost-split-row:not(.is-in) .item-cost-split-name { color: var(--rd-muted); }
.trip-detail-page .item-cost-split-input { width: 7rem; flex: none; font-variant-numeric: tabular-nums; text-align: right; }
.trip-detail-page .item-cost-split-input.is-shares { width: 5rem; }
.trip-detail-page .item-cost-split-suffixed { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--rd-muted); font-weight: 700; }
.trip-detail-page .item-cost-split-suffixed .item-cost-split-input { width: 5.5rem; }
.trip-detail-page .item-cost-split-value { flex: none; color: var(--rd-muted); font-variant-numeric: tabular-nums; }
.trip-detail-page .item-cost-split-amount { flex: none; min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.trip-detail-page .item-cost-split-add { justify-self: start; width: auto; max-width: 100%; border-style: dashed; color: var(--rd-forest); font-weight: 700; }
.trip-detail-page .item-cost-split-total { margin: 0; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trip-detail-page .item-cost-split-total.is-ok { background: var(--rd-forest-tint); color: var(--rd-forest); }
.trip-detail-page .item-cost-split-total.is-off { background: #fdeee9; color: #a4402a; }
.trip-detail-page .item-cost-split-problems { padding: 8px 12px; border-radius: 10px; background: #fdeee9; color: #a4402a; font-size: .9rem; }
.trip-detail-page .item-cost-split-problems ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 575.98px) {
    .trip-detail-page .item-cost-split { padding: 12px; }
    .trip-detail-page .item-cost-split-input { width: 5.5rem; }
    .trip-detail-page .item-cost-split-amount { min-width: 4.5rem; }
}

/* Money: planned (not paid yet) item cost splits. */
.trip-detail-page .trip-money-planned { margin: 6px 0 0; font-weight: 700; color: var(--rd-ink); }
.trip-detail-page .trip-money-planned .num { font-variant-numeric: tabular-nums; }
.trip-detail-page .trip-money-balances td.trip-money-planned-cell { color: var(--rd-muted); font-weight: 600; }
.trip-detail-page .trip-money-payment-hint { color: var(--rd-muted); font-size: .86rem; white-space: nowrap; }
.trip-detail-page .payment-percent { color: var(--rd-muted); font-weight: 700; }
/* The item editor's photo: a preview, "Choose photo" (a file picker styled as a button) and "Remove photo". */
.item-photo-field .item-photo-preview { display: block; width: 100%; max-height: 200px; margin: 4px 0 8px; object-fit: cover; border-radius: 12px; background: var(--rd-sunken); }
.item-photo-field .item-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.item-photo-field .item-photo-choose { position: relative; margin: 0; cursor: pointer; }
.item-photo-field .item-photo-choose.disabled { pointer-events: none; opacity: .6; }
/* Trip members on the map (website): share my location, who is sharing, a tapped member. */
.trip-map-share { display: grid; gap: 8px; margin-top: 10px; font-size: .85rem; }
.trip-map-share button { min-height: 32px; padding: 3px 12px; border: 1px solid var(--rd-line, #dfe3e0); border-radius: 999px; background: #fff; color: #1f4d3f; font-weight: 700; font-size: .8rem; cursor: pointer; }
.trip-map-share button:disabled { opacity: .6; cursor: default; }
.trip-map-share-off { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trip-map-share-off > span { color: var(--rd-muted, #6b746f); font-weight: 600; }
.trip-map-share-on { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.trip-map-share-on > span:nth-child(2) { flex: 1; min-width: 0; }
.trip-map-share-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #2fa864; }
.trip-map-sharers { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.trip-map-sharers button { display: inline-flex; align-items: center; gap: 6px; color: #111a16; }
.trip-map-sharers small { color: var(--rd-muted, #6b746f); font-weight: 600; }
.trip-map-sharers small.stale { color: #b45309; }
.trip-map-sharer-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2f6fde; color: #fff; font-size: .62rem; font-weight: 800; }
.trip-map-member { display: flex; align-items: center; gap: 6px; margin: 0; }
.trip-map-member button { min-height: 0; padding: 0 6px; border: 0; background: none; }
