/* Section: مستلزمات رحلة البر (docs/TRIP-SPEC.md). Only the :root tokens from app.css; every class starts with "trip-". */

/* ------------------------------------------------------------ the top */

.trip-summary {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.trip-summary-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.trip-summary-n {
  font-weight: 900;
}

.trip-bar {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.trip-bar-big {
  height: 10px;
}

.trip-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.trip-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.trip-name-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.trip-name .input {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------------ the map: 12 columns, the first on the right */

.trip-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soon-soft);
}

.trip-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 84px;
  padding: 8px 6px;
  border: 2px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.trip-zone-name {
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.trip-zone-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.trip-zone-car {
  grid-column: 1 / -1;
  min-height: 72px;
}

.trip-zone-tent,
.trip-zone-eat {
  grid-column: span 5;
}

.trip-zone-majlis {
  grid-column: span 7;
  min-height: 112px;
}

.trip-zone-tent {
  min-height: 112px;
}

.trip-zone-kitchen,
.trip-zone-pantry {
  grid-column: span 4;
}

/* One empty column keeps it apart: the far corner from the sleeping tent. */
.trip-zone-wash {
  grid-column: 10 / span 3;
}

/* The fire: a circle whose ring is its progress. --trip-ring is set from JS. */
.trip-zone-fire {
  grid-column: span 7;
  justify-self: center;
  width: 124px;
  height: 124px;
  min-height: 0;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--brand) var(--trip-ring, 0%), var(--line) 0);
}

.trip-fire-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 6px;
  border-radius: 50%;
  background: var(--surface);
}

.trip-zone-complete {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.trip-zone-complete .trip-bar-fill {
  background: var(--ok);
}

.trip-zone-complete .trip-zone-count {
  color: var(--ok);
}

.trip-zone-fire.trip-zone-complete {
  background: conic-gradient(var(--ok) var(--trip-ring, 0%), var(--line) 0);
}

.trip-zone-fire.trip-zone-complete .trip-fire-inner {
  background: var(--ok-soft);
}

.trip-zone-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}

/* The ring is progress, so the fire's selected mark stands apart from it. */
.trip-zone-fire.trip-zone-selected {
  box-shadow: 0 0 0 3px var(--soon-soft), 0 0 0 6px var(--brand);
}

.trip-wind {
  margin: 8px 2px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ------------------------------------------------------------ the tools and the filters */

.trip-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trip-filters {
  margin-bottom: 10px;
}

/* All four stay in view on a 360px phone. */
.trip-filters .chips {
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ the items */

/* Clears the sticky top bar (and the staging bar) when the list scrolls into view. */
.trip-list {
  scroll-margin-top: 104px;
}

.trip-note {
  margin: 12px 2px;
  color: var(--muted);
  font-size: 15px;
}

.trip-block {
  margin-bottom: 18px;
}

.trip-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 6px;
  font-size: 18px;
  font-weight: 800;
}

.trip-block-count {
  color: var(--muted);
  font-size: 15px;
}

.trip-items {
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.trip-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.trip-item:last-child {
  border-bottom: 0;
}

.trip-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  cursor: pointer;
}

.trip-check {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--brand);
}

.trip-item-text {
  min-width: 0;
  padding-top: 8px;
}

.trip-item-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.trip-item-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.trip-item-done .trip-item-name {
  color: var(--muted);
  font-weight: 500;
  text-decoration: line-through;
}

.trip-item-done .trip-item-note,
.trip-item-done .trip-detail,
.trip-item-done .trip-who {
  opacity: 0.6;
}

/* The owner's own details, such as how many: a slim box under the name and note. */
.trip-detail {
  display: block;
  min-height: 40px;
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 16px;
}

.trip-who {
  max-width: 100%;
  min-height: 36px;
  margin-top: 6px;
  padding: 3px 12px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.trip-who-set {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.trip-del {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 52px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.trip-del .icon svg {
  width: 22px;
  height: 22px;
}

.trip-del-armed {
  background: var(--late-soft);
  color: var(--late);
}

/* «مين يجيبها؟» and «إخفاء» side by side, wrapping on a narrow phone. */
.trip-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.trip-item-actions .trip-who {
  margin-top: 0;
}

.trip-hide,
.trip-show {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.trip-show {
  border-color: var(--brand);
  color: var(--brand-ink);
}

.trip-hide .icon svg,
.trip-show .icon svg {
  width: 18px;
  height: 18px;
}

.trip-item-done .trip-hide {
  opacity: 0.6;
}

/* «مخفية (n)» at the end of a zone, and its faded rows. */
.trip-hidden-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.trip-hidden-toggle .icon svg {
  width: 18px;
  height: 18px;
}

/* The chevron points down while closed and up while open. */
.trip-hidden-toggle .icon-back {
  transform: rotate(90deg);
}

.trip-hidden-open .icon-back {
  transform: rotate(-90deg);
}

.trip-hidden-items {
  margin-top: 4px;
}

.trip-item-hidden .trip-item-name {
  color: var(--muted);
  font-weight: 500;
}

.trip-hidden-mark {
  color: var(--muted);
  cursor: default;
}

.trip-hidden-mark .icon svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------------ sheets */

.trip-who-item {
  margin: 0 0 12px;
  font-weight: 700;
}

.trip-who-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.trip-who-new {
  display: flex;
  gap: 8px;
}

.trip-who-new .input {
  flex: 1;
  min-width: 0;
}

.trip-copy-hint {
  margin: 0 0 10px;
  color: var(--muted);
}

.trip-copy-box {
  width: 100%;
  font-size: 15px;
}
