/* css/boats.css — area B (My Boats: boats.html, boat.html). Owned by area B during
   the build; every class carries the prefix .boats-. Shared components come only
   from css/sas.css; the lead folds this file into its AREA B section in phase (c).
   sassrv-api.md §5.7–§5.10. */

/* ----- the list (boats.html) ----------------------------------------------- */

.boats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 20px;
}

.boats-head > div { min-width: 0; }

.boats-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 15px;
  margin: 0 0 15px;
}

.boats-filter { min-width: 0; }

.boats-filter > label {
  display: block;
  padding: 0 0 4px;
  font-weight: 700;
}

.boats-filter-q { flex: 1 1 320px; }
.boats-filter select { min-width: 210px; }

/* the buttons line up with the inputs, under the labels' line */
.boats-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 25px;
}

.boats-count {
  margin: 0 0 10px;
  color: var(--sas-muted);
  font-size: 14px;
}

.boats-count:empty { display: none; }

.boats-name { font-weight: 700; overflow-wrap: anywhere; }

.boats-cert { white-space: nowrap; }

.boats-empty {
  padding: 20px;
  background: var(--orc-tint);
}

.boats-empty p { margin: 0; }
.boats-empty p + p { margin-top: 15px; }

@media (max-width: 767.98px) {
  .boats-filter { flex: 1 1 100%; }
  .boats-filter select { min-width: 0; }
  .boats-filter-actions { padding-top: 0; }
}

/* ----- the boat page (boat.html) ------------------------------------------- */

.boats-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.boats-title-row h1 {
  min-width: 0;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.boats-rename-btn { flex: none; margin-top: 4px; }

@media (min-width: 768px) {
  .boats-rename-btn { margin-top: 6px; }
}

.boats-rename {
  max-width: 640px;
  margin: 10px 0 0;
  padding: 15px;
  background: var(--orc-tint);
}

.boats-rename > label {
  display: block;
  padding: 0 0 4px;
  font-weight: 700;
}

.boats-rename-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.boats-rename-row .input { flex: 1 1 240px; width: auto; }

.boats-rename .msg { margin: 10px 0 0; }

.boats-chips { margin: 10px 0 0; }

.boats-cols { align-items: start; }

/* The first steps of a boat never run: three numbered steps on one line. */
.boats-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin: 0;
  padding: 10px 15px;
  list-style: none;
  counter-reset: boats-step;
  border-left: 4px solid var(--orc-navy);
  background: var(--orc-tint);
}

.boats-steps li {
  counter-increment: boats-step;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.boats-steps li::before {
  content: counter(boats-step);
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  background: var(--orc-navy);
  color: var(--orc-white);
  font-family: var(--orc-font-display);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
}

.boats-guide-host:empty { display: none; }

/* boat.html#products (the editor's "Buy the speed guide first") lands here */
.boats-products { scroll-margin-top: 16px; }

.boats-facts { margin-bottom: 15px; }
.boats-facts dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

@media (max-width: 479.98px) {
  .boats-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .boats-facts dd { margin-bottom: 8px; }
}

.boats-checks:empty { display: none; }
.boats-checks .msg { margin: 0; }

.boats-errors {
  margin: 5px 0;
  padding-left: 20px;
}

.boats-errors li + li { margin-top: 3px; }

.boats-offline { margin: 15px 0 0; }

.boats-files-msg:empty { display: none; }
.boats-files-msg { margin-top: 15px; }
.boats-files-msg .msg { margin: 0; }

.boats-plan-frame { min-height: 60px; }

.boats-plan-btn {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--orc-tint);
  background: var(--orc-white);
  cursor: zoom-in;
}

.boats-plan-btn:hover { border-color: var(--orc-navy); }

.boats-plan-img {
  display: block;
  width: 100%;
  height: auto;
}

.boats-plan-frame .help { text-align: center; }

.boats-manage {
  margin-top: 60px;
  padding-top: 15px;
  border-top: var(--orc-rule);
}

.boats-manage h2 { font-size: 20px; line-height: 24px; }

.boats-manage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.boats-manage-item { flex: 0 1 320px; min-width: 0; }
.boats-manage-item .help,
.boats-manage-item .disabled-reason { margin: 6px 0 0; }

.boats-dialog-msg:empty { display: none; }
.boats-dialog-msg .msg { margin: 10px 0 0; }

.boats-discard { font-weight: 700; }

/* a chip with a long text wraps on a phone instead of running out of its cell */
.boats-chip-long { white-space: normal; }
