/* The bucket list (/bucket), an entry's page with its plan (/bucket/{id}), and the "Our plans" start section. */

.bucket-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; margin-bottom: 14px; }
.bucket-form h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.bucket-form__title { font-size: 1rem; }
.bucket-form__row { display: flex; flex-wrap: wrap; gap: 12px; }
.bucket-form__row > .field { flex: 1 1 200px; min-width: 0; }
.bucket-form__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }

.bucket-links-editor { display: flex; flex-direction: column; gap: 6px; }
.bucket-links-editor__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 6px; align-items: center; }
.bucket-links-editor__add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }

.bucket-page__filters { margin-bottom: 12px; }
.bucket-page__filters .icon { width: 14px; height: 14px; vertical-align: -0.15em; }
.bucket-page .tab .icon { width: 15px; height: 15px; vertical-align: -0.15em; }

.bucket-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.bucket-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.bucket-card__main { display: flex; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.bucket-card__main:hover .bucket-card__title { color: var(--accent); }
.bucket-card__icon, .bucket-hero__icon {
    flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.bucket-card__icon .icon { width: 22px; height: 22px; }
.bucket-card__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bucket-card__title { font-size: 1.02rem; overflow-wrap: anywhere; }
.bucket-card__meta { display: flex; flex-wrap: wrap; gap: 5px; }
.bucket-card__meta .icon { width: 13px; height: 13px; vertical-align: -0.12em; }
.bucket-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.bucket-card__by { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 0.8rem; }

.bucket-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.bucket-gallery__tile {
    position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px;
    background: var(--surface-2); color: inherit; text-decoration: none;
}
.bucket-gallery__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.bucket-gallery__tile:hover img { transform: scale(1.04); }
.bucket-gallery__placeholder { display: grid; place-items: center; height: 100%; color: var(--ink-muted); }
.bucket-gallery__placeholder .icon { width: 40px; height: 40px; }
.bucket-gallery__caption {
    position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 26px 12px 10px;
    background: linear-gradient(transparent, rgb(0 0 0 / 0.72)); color: #fff;
}
.bucket-gallery__caption small { opacity: 0.85; }
.bucket-gallery__caption .icon { width: 12px; height: 12px; vertical-align: -0.1em; }

/* An entry's page. */
.bucket-item-page__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.bucket-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.bucket-hero__icon { width: 56px; height: 56px; border-radius: var(--radius-lg); }
.bucket-hero__icon .icon { width: 30px; height: 30px; }
.bucket-hero__text { flex: 1; min-width: 0; }
.bucket-hero__kicker { color: var(--ink-muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.bucket-hero h1 { margin: 2px 0 4px; font-size: clamp(1.4rem, 4vw, 2rem); overflow-wrap: anywhere; }
.bucket-hero__when { margin: 0; color: var(--ink-muted); }
.bucket-hero__when .icon { width: 15px; height: 15px; vertical-align: -0.15em; }
.bucket-hero.is-done .bucket-hero__icon { background: color-mix(in srgb, #3fb950 18%, transparent); color: #3fb950; }

.bucket-countdown {
    flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84px; padding: 8px 12px;
    border-radius: var(--radius-lg); background: var(--accent); color: var(--bg); text-align: center; line-height: 1.1;
}
.bucket-countdown strong { font-size: 2rem; font-variant-numeric: tabular-nums; }
.bucket-countdown strong.is-word { font-size: 1.05rem; }
.bucket-countdown span { font-size: var(--text-xs); }

.bucket-item-page__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.bucket-item-page__tools { display: inline-flex; gap: 4px; margin-left: auto; }
.bucket-item-page__tools .text-button, .bucket-item-page__back { text-decoration: none; }
.bucket-item-page__tools .icon { width: 15px; height: 15px; vertical-align: -0.15em; }
.bucket-item-page__tools .is-danger { color: #e5534b; }
.bucket-item-page__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.bucket-item-page__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.bucket-panel { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; min-width: 0; }
.bucket-panel--wide { grid-column: 1 / -1; }
.bucket-panel h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.bucket-panel h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.bucket-panel h2 small { margin-left: auto; color: var(--ink-muted); font-weight: 400; }
.bucket-panel p { margin: 0; }
.bucket-panel__text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.bucket-panel__big { font-size: 1.6rem; font-weight: 600; }
.bucket-panel__progress { width: 100%; height: 6px; accent-color: var(--accent); }

.bucket-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.bucket-facts dt { color: var(--ink-muted); }
.bucket-facts dd { margin: 0; }
.bucket-facts small { color: var(--ink-muted); }

.bucket-links { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bucket-links a { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: inherit; text-decoration: none; min-width: 0; }
.bucket-links a:hover span { color: var(--accent); }
.bucket-links .icon { flex: none; width: 16px; height: 16px; color: var(--ink-muted); }
.bucket-links span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bucket-links small { margin-left: auto; color: var(--ink-muted); white-space: nowrap; }

.bucket-checklist { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bucket-checklist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.bucket-checklist li:last-child { border-bottom: 0; }
.bucket-checklist label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.bucket-checklist input[type="checkbox"] { flex: none; }
.bucket-checklist li.is-done span { color: var(--ink-muted); text-decoration: line-through; }

.bucket-day { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.bucket-day:first-of-type { border-top: 0; }
.bucket-day h3 { margin: 0; font-size: 0.9rem; color: var(--ink-muted); }
.bucket-day.is-today h3 { color: var(--accent); }
.bucket-day ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bucket-day li { display: flex; align-items: baseline; gap: 10px; }
.bucket-day li > span:not(.bucket-day__time) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bucket-day__time { flex: none; min-width: 3.2em; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }

.bucket-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bucket-photos li { position: relative; }
.bucket-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); }
.bucket-photos.is-editing .icon-button { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.bucket-photos__add {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1;
    border: 1.5px dashed var(--line); border-radius: var(--radius-md); color: var(--ink-muted); cursor: pointer; font-size: 0.8rem; text-align: center;
}
.bucket-photos__add:hover { color: var(--accent); border-color: var(--accent); }
.bucket-photos__add .icon { width: 24px; height: 24px; }
.bucket-photos__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bucket-done__date { max-width: 220px; }

.bucket-weather__days { display: flex; gap: 6px; overflow-x: auto; margin: 0; padding: 0 0 4px; list-style: none; scroll-snap-type: x proximity; }
.bucket-weather__days li {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 8px 6px;
    border-radius: 12px; background: var(--surface-2); scroll-snap-align: start; font-size: 0.82rem;
}
.bucket-weather__days .weather-icon { width: 30px; height: 30px; }
.bucket-weather__days small { color: var(--ink-muted); }
.bucket-weather__days small .icon { width: 11px; height: 11px; }
.bucket-weather__day { color: var(--ink-muted); white-space: nowrap; }

/* "Plan it". */
.bucket-wizard { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; margin-bottom: 14px; }
.bucket-wizard__steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.bucket-wizard__steps li { flex: 1 0 auto; }
.bucket-wizard__steps button {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: var(--radius-md);
    background: var(--surface-2); color: var(--ink-muted); font: inherit; font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.bucket-wizard__steps button:disabled { cursor: default; opacity: 0.5; }
.bucket-wizard__steps .icon { width: 15px; height: 15px; }
.bucket-wizard__steps li.is-done button { color: var(--ink); }
.bucket-wizard__steps li.is-current button { background: var(--accent); color: var(--bg); }
.bucket-wizard__body { display: flex; flex-direction: column; gap: 10px; }
.bucket-wizard__body h2 { margin: 0; font-size: 1.15rem; }
.bucket-wizard__body p { margin: 0; }
.bucket-wizard__place { display: flex; align-items: center; gap: 10px; }
.bucket-wizard__place .icon { width: 20px; height: 20px; color: var(--accent); }
.bucket-wizard__place > span { flex: 1; min-width: 0; }
.bucket-wizard__place small { color: var(--ink-muted); }
.bucket-wizard__budget { max-width: 240px; }
.bucket-wizard__add { display: flex; gap: 6px; align-items: center; }
.bucket-wizard__add input:not([type="time"]) { flex: 1; min-width: 0; }
.bucket-wizard__add .secondary-button { margin-bottom: 0; white-space: nowrap; }
.bucket-wizard__suggestions .chip { font-size: 0.78rem; }
.bucket-day__time-input { flex: none; width: 7.5em; }
.bucket-wizard__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.bucket-wizard__actions .secondary-button { margin-bottom: 0; }

/* Start page. */
.plans-section { display: flex; flex-direction: column; gap: 8px; }
.plans-section__next { display: flex; align-items: center; gap: 14px; padding: 12px 14px; color: inherit; text-decoration: none; }
.plans-section__next:hover strong { color: var(--accent); }
.plans-section__next .bucket-countdown strong { color: var(--bg); }
.plans-section__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plans-section__text > strong { font-size: var(--text-lg); overflow-wrap: anywhere; }
.plans-section__text small { color: var(--ink-muted); }
.plans-section__text .icon { width: 13px; height: 13px; vertical-align: -0.12em; }
.plans-section__later { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plans-section__later a { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 10px; border-radius: var(--radius-pill); background: var(--surface-2); color: inherit; text-decoration: none; font-size: var(--text-sm); }
.plans-section__later small { color: var(--ink-muted); }
.plans-section__empty { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-muted); }
.plans-section__empty .icon { width: 20px; height: 20px; flex: none; }

@media (max-width: 560px) {
    .bucket-list { grid-template-columns: 1fr; }
    .bucket-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bucket-hero { flex-wrap: wrap; }
    .bucket-hero__icon { display: none; }
    .bucket-countdown { min-width: 70px; }
    .bucket-links-editor__row { grid-template-columns: minmax(0, 1fr) auto; }
    .bucket-links-editor__row input:first-child { grid-column: 1 / -1; }
    .bucket-wizard__steps span { display: none; }
    .bucket-wizard__steps li.is-current span { display: inline; }
    .bucket-item-page__tools { width: 100%; margin-left: 0; }
}
