/* ─── Service Rate Menu (W-080) ────────────────────────────────────────
   A categorized, scannable rate card: rows of "{service} … {price}" on
   dotted-leader lines, grouped under real <h3> category headings, with
   optional per-row badges + a book/quote/call CTA. Category B (no JS) — the
   "what's included" disclosure is a native <details>.

   Token-only: colors/space/radius/shadow all resolve to the design-token
   layer (assets/css/tokens.css). No raw hex/px where a token exists. The
   decorative leader is currentColor + aria-hidden (forced-colors safe); price
   emphasis is weight + font, never color-only.
   Shortcode: rate-menu.php [hzo_rate_menu] + child [hzo_rate_item]. */

.hzo-rate-menu {
    display: block;
}

/* Category heading — clusters the rows below it. First heading hugs the top;
   later ones get breathing room. (Real <h3> inherits the type ramp/color.) */
.hzo-rate-menu__category {
    margin: var(--space-xl) 0 var(--space-md);
}
.hzo-rate-menu__category:first-child {
    margin-top: 0;
}

.hzo-rate-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── The leader row ──────────────────────────────────────────────────────
   grid: name | leader (fills) | price. Extra lines (desc / aside / details)
   span the full width beneath. */
.hzo-rate-row {
    display: grid;
    grid-template-columns: minmax(0, auto) 1fr minmax(0, auto);
    align-items: baseline;
    column-gap: var(--space-sm);
    row-gap: var(--space-xs);
    padding: var(--space-smd) 0;
}

.hzo-rate-row__name {
    grid-column: 1;
    font-weight: var(--fw-600);
    color: var(--text-heading);
    line-height: var(--lh-snug);
}

/* The dotted leader — decorative, currentColor so it survives forced-colors.
   align-self:end + a small nudge drops it onto the text baseline. */
.hzo-rate-row__leader {
    grid-column: 2;
    align-self: end;
    height: 0;
    border-bottom: var(--border-1) dotted currentColor;
    opacity: 0.4;
    transform: translateY(-0.28em);
    transition: opacity var(--dur-2) var(--ease-standard);
}

.hzo-rate-row__price {
    grid-column: 3;
    justify-self: end;
    font-family: var(--font-number);
    font-weight: var(--fw-700);
    color: var(--text-heading);
    white-space: nowrap;
    transition: color var(--dur-2) var(--ease-standard);
}

/* Below-name supporting copy */
.hzo-rate-row__desc {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-100);
    line-height: var(--lh-normal);
}

/* Badges + CTA aside */
.hzo-rate-row__aside {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}
.hzo-rate-row__badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Per-row CTA — composes .hzo-btn .hzo-btn--outline .hzo-btn--sm; only the
   icon size is component-specific. min-height 36px (btn--sm) clears WCAG 2.5.8
   (24px min); comfortable tap target on touch. */
.hzo-rate-row__cta {
    margin-left: auto;
}
.hzo-rate-row__cta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* "What's included" — native <details> Disclosure (APG). */
.hzo-rate-row__details {
    grid-column: 1 / -1;
}
.hzo-rate-row__details-toggle {
    cursor: pointer;
    color: var(--brand-text);
    font-size: var(--fs-100);
    font-weight: var(--fw-500);
    padding: var(--space-xs) 0;
    width: fit-content;
}
.hzo-rate-row__details-toggle:focus-visible {
    outline: var(--border-3) solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-1);
}
.hzo-rate-row__details-body {
    margin: var(--space-xs) 0 0;
    color: var(--text-body);
    font-size: var(--fs-100);
    line-height: var(--lh-normal);
}

/* ── Hover emphasis (has a resting + tap equivalent — G50; never a hover-only
   reveal) ──────────────────────────────────────────────────────────────── */
.hzo-rate-row:hover .hzo-rate-row__leader {
    opacity: 0.65;
}
.hzo-rate-row:hover .hzo-rate-row__price {
    color: var(--brand-text);
}

/* ── Leader-fill variants ──────────────────────────────────────────────── */
.hzo-rate-menu--leader-rule .hzo-rate-row__leader {
    border-bottom-style: solid;
    opacity: 0.25;
}
.hzo-rate-menu--leader-none .hzo-rate-row__leader {
    border-bottom: 0;
}

/* ── Cards layout ──────────────────────────────────────────────────────── */
.hzo-rate-menu--cards .hzo-rate-menu__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
}
.hzo-rate-menu--cards .hzo-rate-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding: var(--space-md);
    background: var(--surface);
    border: var(--border-1) solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}
.hzo-rate-menu--cards .hzo-rate-row__leader {
    display: none;
}
.hzo-rate-menu--cards .hzo-rate-row__name {
    font-size: var(--fs-300);
}
.hzo-rate-menu--cards .hzo-rate-row__price {
    justify-self: start;
    font-size: var(--fs-400);
    margin-top: var(--space-xs);
}

/* ── Print — the rate card is exactly what customers print/PDF (G13). Reveal
   every disclosure, drop the decorative leaders + the interactive CTAs, keep
   all prices/rows. ─────────────────────────────────────────────────────── */
@media print {
    .hzo-rate-row__leader,
    .hzo-rate-row__cta {
        display: none !important;
    }
    /* Force-open closed <details> so nothing below the fold is hidden on paper. */
    .hzo-rate-row__details > *:not(summary) {
        display: block !important;
    }
    .hzo-rate-row__details-toggle {
        font-weight: var(--fw-600);
    }
}

/* ── Forced colors — leader/badge/price must not rely on color alone. ────── */
@media (forced-colors: active) {
    .hzo-rate-row__leader {
        opacity: 1;
        border-bottom-color: currentColor;
    }
    .hzo-rate-row__cta:focus-visible,
    .hzo-rate-row__details-toggle:focus-visible {
        outline: var(--border-2) solid;
    }
}

/* ── Reduced motion — kill this component's transitions (PRESERVE-5). ────── */
@media (prefers-reduced-motion: reduce) {
    .hzo-rate-row__leader,
    .hzo-rate-row__price {
        transition: none;
    }
}
