/* ============================================================================
   Rejseønsker — the app's own layout. Requires tokens.css → shell.css.
   Class prefix `rj-`. Colours come only from tokens.css; the travel-type
   tiles reuse the map fills, like the hub's app-card icons do.
   ========================================================================= */

.rj-body { padding: 36px 40px 44px; display: flex; flex-direction: column; gap: var(--gap-hero); }
.rj-view { display: flex; flex-direction: column; gap: 32px; }
.rj-intro { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.rj-intro h1 { font-size: clamp(30px, 5vw, var(--text-hero)); text-wrap: balance; }
.rj-intro h1 em { font-style: normal; color: var(--green-600); }
.rj-intro p { color: var(--green-600); font-size: var(--text-body-lg); }
.rj-h2 { font-size: var(--text-panel); }
.rj-h3 { font-size: var(--text-card); }
.rj-small { font-size: var(--text-small); }
.rj-muted { color: var(--green-600); }

/* ── Add a link ────────────────────────────────────────────────────────── */
.rj-add {
    display: flex; flex-direction: column; gap: 14px;
    padding: 22px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card);
    background: var(--sand-100);
}
.rj-add__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rj-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rj-add__row .rj-field { flex: 1 1 320px; }
.rj-field label { font-size: var(--text-small); font-weight: 500; color: var(--green-600); }
.rj-input {
    width: 100%; min-height: var(--hit); padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-input); background: var(--surface);
}
.rj-input:focus { border-color: var(--yellow); outline: none; box-shadow: 0 0 0 3px var(--yellow-tint); }
textarea.rj-input { resize: vertical; min-height: 96px; }
.rj-add details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-size: var(--text-row); font-weight: 500; }
.rj-status { font-size: var(--text-row); min-height: 22px; }
.rj-status.is-error { color: var(--orange); }
.rj-thinking { display: inline-flex; align-items: center; gap: 10px; }
.rj-thinking::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow);
    animation: rj-pulse 1.1s ease-in-out infinite;
}
@keyframes rj-pulse { 50% { opacity: .25; } }
.kg-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.rj-btn-sm { min-height: 36px; padding: 6px 12px; font-size: var(--text-small); }
.rj-btn-quiet { border-color: transparent; background: transparent; }
.rj-btn-quiet:hover { background: var(--sand-100); box-shadow: none; }

/* ── List ──────────────────────────────────────────────────────────────── */
.rj-listhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--gap-cards); }
.rj-card {
    display: flex; flex-direction: column; width: 100%; padding: 0; text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.rj-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.rj-card__body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex-grow: 1; }
.rj-card__title { font-family: var(--font-heading); font-size: var(--text-card); font-weight: 600; line-height: 1.25; }
.rj-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rj-kv > span { display: flex; flex-direction: column; min-width: 0; padding: 7px 10px; border-radius: var(--radius-chip); background: var(--sand-100); }
.rj-kv b { font-weight: 500; font-size: var(--text-row); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rj-empty { display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-card); }
.rj-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rj-steps > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-card-sm); background: var(--sand-100); }

/* Travel-type tile */
.rj-tile { position: relative; display: flex; align-items: center; justify-content: center; height: 116px; color: var(--green-900); }
.rj-tile[data-type="By"]          { background: var(--yellow-tint); }
.rj-tile[data-type="Strand"]      { background: var(--map-sea-3); }
.rj-tile[data-type="Vandring"]    { background: var(--map-green-2); }
.rj-tile[data-type="Roadtrip"]    { background: var(--map-fill-3); }
.rj-tile[data-type="Bikepacking"] { background: var(--map-green-1); }
.rj-tile[data-type="Krydstogt"]   { background: var(--map-sea-1); }
.rj-tile[data-type="Whisttur"]    { background: var(--map-grey-1); }
.rj-tile__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rj-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-pill);
    background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 600;
}
.rj-badge--ai { background: var(--yellow-tint); border-color: var(--yellow); }
.rj-badge--ai::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* ── One wish ──────────────────────────────────────────────────────────── */
.rj-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rj-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.rj-hero .rj-tile { flex: 0 1 250px; height: auto; min-height: 168px; border-radius: var(--radius-card); }
.rj-hero__info { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rj-title {
    width: 100%; margin-left: -7px; padding: 2px 6px; border: 1px solid transparent; border-radius: var(--radius-chip); background: transparent;
    font-family: var(--font-heading); font-size: clamp(26px, 4vw, var(--text-screen)); font-weight: 600; line-height: 1.12; letter-spacing: -.015em;
}
.rj-title:hover { border-color: var(--border); }
.rj-src { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: var(--text-data); letter-spacing: .04em; color: var(--green-600); }
.rj-src:hover { color: var(--orange); }
.rj-summary { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius-card-sm); background: var(--sand-100); }
.rj-summary__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.rj-note { padding: 10px 12px; border-radius: var(--radius-chip); background: var(--yellow-tint); font-size: var(--text-small); }

.rj-section { display: flex; flex-direction: column; gap: 12px; }
.rj-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.rj-fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-chip); background: var(--sand-100); }
.rj-fact input { width: 100%; margin-left: -5px; padding: 2px 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-weight: 600; }
.rj-fact input:hover, .rj-fact input:focus { border-color: var(--border-strong); background: var(--surface); outline: none; }
.rj-from { font-size: 12px; color: var(--green-600); }
.rj-from--ai { color: var(--orange); }
.rj-route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--text-small); }
.rj-route span.rj-stop { padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-weight: 500; }

.rj-cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.rj-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.rj-budget {
    flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: var(--space-panel);
    border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--sand-100);
}
.rj-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.rj-m {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 52px;
    border: 1px solid transparent; border-radius: var(--radius-chip); background: var(--sand-100);
    font-family: var(--font-mono); font-size: var(--text-data); font-weight: 500;
}
.rj-m.is-closed { border: 1px dashed var(--border-strong); background: transparent; color: var(--faint); }
.rj-m.is-picked { background: var(--yellow); color: var(--green-900); }
.rj-m.is-picked.is-closed { background: var(--yellow-tint); }
.rj-m i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.rj-m.is-best i { background: var(--green-600); }
.rj-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--green-600); }
.rj-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rj-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.rj-advice { padding: 12px 14px; border-radius: var(--radius-card-sm); background: var(--map-green-2); font-size: var(--text-row); }
.rj-advice.is-bad { background: var(--yellow-tint); color: var(--orange); }

.rj-line { display: flex; flex-direction: column; gap: 4px; }
.rj-line__top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--text-small); }
.rj-line__top span { color: var(--green-600); font-variant-numeric: tabular-nums; }
.rj-line__top span.is-edited { color: var(--orange); }
.rj-line input { text-align: right; font-variant-numeric: tabular-nums; }
.rj-stepper { display: flex; align-items: center; gap: 4px; }
.rj-stepper button {
    width: var(--hit); height: var(--hit); border: 1px solid var(--border-strong); border-radius: var(--radius-chip);
    background: var(--surface); font-size: 18px; cursor: pointer;
}
.rj-stepper span { min-width: 64px; text-align: center; font-size: var(--text-row); font-weight: 500; }
.rj-total { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border-strong); }
.rj-total__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rj-total__sum b { font-family: var(--font-heading); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rj-total__sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: var(--text-small); color: var(--green-600); }
.rj-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rj-danger { color: var(--orange); }

/* Visually hidden, still read aloud. */
.rj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

html.embedded .embedded-hide { display: none !important; }

@media (max-width: 760px) {
    .rj-body { padding: 24px 16px 32px; }
    .rj-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
