/* ============================================================
   APIARY — directory cards, dashboard, and the public apiary page
   ============================================================ */

/* ── Apiary search form ─────────────────────────────────────────────────────
   Three elements in one row: text input (stretches), search button, near-me
   button. On narrow viewports the row wraps so each element stays usable.
   The label is screen-reader only; the placeholder covers sighted users.
   ------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.apiary-search-form {
    margin-bottom: 2rem;
}

.apiary-search-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.apiary-search-input-wrap {
    flex: 1 1 200px;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: stretch;
}

.apiary-search-input {
    width: 100%;
    height: 100%;
    padding: 12px 16px;
    padding-right: 2.75rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.apiary-search-input:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}

.apiary-search-input::placeholder {
    color: var(--text-subtle);
}

.locate-field__btn {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.locate-field__btn:hover,
.locate-field__btn:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.locate-field__btn:focus-visible {
    box-shadow: var(--focus-ring);
}

.locate-field__btn.is-active {
    color: var(--primary-color);
}

.locate-field__btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.apiary-search-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Radius label + select + "near me" button grouped together so the
   relationship is obvious: the select sets the radius the button uses. */
.apiary-near-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.apiary-near-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.apiary-radius-select {
    padding-block: 0.5rem;
    padding-left: 0.75rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Count line under the search bar when a filter is active. */
.apiary-search-summary {
    margin: -1rem 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Location + distance meta row on each card ── */
.apiary-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.apiary-card-location {
    color: var(--text-muted);
}

.apiary-card-distance {
    color: var(--primary-color);
    font-weight: 600;
}

/* ── Page header (apiaries list) ── */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin-bottom: 0.65rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Apiaries grid (public list + dashboard) ── */
.apiaries-container {
    max-width: 1200px;
    margin: 0 auto;
}

.apiaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 3rem 2.25rem;
}

.apiaries-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.apiaries-toolbar .apiary-search-form {
    flex: 1 1 20rem;
    margin-bottom: 0;
}

.apiaries-toolbar .layout-switch {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* ── Apiary card ── */
.apiary-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--hairline);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.apiary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Public directory: same grammar as product cards — plate + hairline, no lift. */
.apiaries-container .apiary-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    transition: none;
    color: inherit;
    text-decoration: none;
    overflow: visible;
}

.apiaries-container .apiary-card:hover {
    transform: none;
    box-shadow: none;
}

.apiaries-container .apiary-card:hover h2 {
    text-decoration: underline;
}

.apiaries-container .apiary-image {
    height: auto;
    aspect-ratio: 4 / 3;
    background: var(--plate-bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.apiaries-container .apiary-image .no-profile-image {
    color: var(--text-subtle);
    opacity: 0.55;
}

.apiaries-container .apiary-info {
    padding: 1rem 0.15rem 0;
}

.apiaries-container .apiary-info h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    color: var(--text-color);
}

.apiaries-container .apiary-info h2 a {
    color: var(--text-color);
}

.apiaries-container .apiary-info h2 a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.apiaries-container .apiary-stats {
    color: var(--text-muted);
    font-weight: 500;
}

.apiaries-container .apiary-search-btn.btn-primary {
    border-radius: 999px;
}

.apiaries-container .apiary-info .description {
    min-height: 0;
    margin-bottom: 0.75rem;
}

/* List / row layout for public apiary directory */
.apiaries-container[data-layout="list"] .apiaries-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.apiaries-container[data-layout="list"] .apiary-card {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 1.15rem 0.25rem;
    border-bottom: 1px solid var(--hairline);
}

.apiaries-container[data-layout="list"] .apiary-image {
    width: 8.5rem;
    flex-shrink: 0;
    aspect-ratio: 1;
    height: auto;
}

.apiaries-container[data-layout="list"] .apiary-info {
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.apiaries-container[data-layout="list"] .apiary-info .description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

@media (max-width: 640px) {
    .apiaries-container[data-layout="list"] .apiary-image {
        width: 5.5rem;
    }
}

.apiary-image {
    height: 180px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.apiary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apiary-image .no-profile-image {
    /* No font-size: the mark is an SVG now and is sized at the call site. */
    color: var(--secondary-color);
}

.apiary-info {
    padding: 1.5rem;
}

.apiary-info h2 {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.apiary-info h2 a {
    color: var(--secondary-color);
}

.apiary-info h2 a:hover {
    color: var(--primary-color);
}

.founded {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.location {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.location-missing a {
    color: var(--secondary-color);
    font-weight: 600;
}

.description {
    line-height: 1.6;
    color: var(--gray-800);
    margin-bottom: 1rem;
    min-height: 3em;
}

.description.empty {
    color: var(--text-subtle);
    font-style: italic;
}

.apiary-stats {
    display: flex;
    gap: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* ── Dashboard header (shared: dashboard.html & dashboard_apiary.html) ── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--hairline);
}

.dashboard-header h1 {
    font-family: var(--font-display);
    color: var(--secondary-color);
    margin-bottom: 0.2rem;
    font-size: clamp(1.6rem, 3vw, 2rem);
}

.header-content p {
    color: var(--text-muted);
    font-family: var(--font-ui);
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb {
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.apiary-location {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-stats {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .apiaries-grid {
        gap: 2rem 1.25rem;
    }
}

/* ── Dashboard stats (apiary detail dashboard) ── */
.dashboard-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--hairline);
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-ui);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.1;
}

.stat-label {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-weight: 500;
}

/* ── Gallery section (owner's photo manager on the edit form) ── */
.gallery-section {
    padding: 0;
    overflow: hidden;
}

.gallery-section > h2 {
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 0;
}

/* ── The apiary page ───────────────────────────────────────────────────────
   A page about a place. No cards, no shadows: a rail of plain rows beside a
   column of photos, with hairlines as the only divider and one pill as the only
   loud element. Amber appears on the row icons and nowhere else.
   Markup: app/templates/apiary.html
   Content: app.presenters.apiary_page
   ------------------------------------------------------------------------- */
.apiary-page {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.apiary-page__top {
    display: grid;
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.apiary-intelligence {
    padding: 2.5rem 0 0.25rem;
    border-bottom: none;
    gap: 2rem;
}

.apiary-page__about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apiary-page__about .trade-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    margin: 0;
}

/* ── Left rail: what this place is ── */
.apiary-rail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.apiary-rail__name {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* One badge per measured metric — never one for the place (ADR-0001). */
.apiary-rail__verification {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.apiary-rail__badge {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--badge-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.apiary-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 1rem 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    list-style: none;
}

.apiary-counts__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.apiary-counts__value {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.apiary-counts__label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* The one loud thing on the page. */
.apiary-rail__cta {
    align-self: flex-start;
}

/* The link through to the beekeeper. Same quiet treatment as the beekeeper
   page's link back to the place, so the pair reads as one relationship. */
.apiary-rail__link {
    align-self: flex-start;
    margin-top: -0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.apiary-rail__link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* ── Rail boxes: plain rows, hairlines, no surface of their own ── */
.apiary-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.apiary-box__heading,
.apiary-section__heading {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apiary-box__rows {
    margin: 0;
}

.apiary-box__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--hairline);
}

.apiary-box__row:first-child {
    border-top: 1px solid var(--hairline);
}

.apiary-box__label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.apiary-box__icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--primary-color);
}

.apiary-box__value {
    margin: 0;
    min-width: 0;
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.apiary-box__link {
    color: inherit;
    text-decoration: none;
}

.apiary-box__link:hover {
    text-decoration: underline;
}

/* ── Right column: what the place looks like and says ── */
.apiary-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.apiary-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

/* The first photo is the lead and gets the width to be one. */
.apiary-photos__figure {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.apiary-photos__figure:first-child {
    grid-column: 1 / -1;
}

.apiary-photos__trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: inherit;
    color: inherit;
    border-radius: var(--radius);
}

.apiary-photos__trigger:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.apiary-photos__trigger:hover .apiary-photos__plate {
    outline: 1px solid var(--hairline);
}

.apiary-photos__plate {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 1rem;
    background-color: var(--plate-bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.apiary-photos__figure:first-child .apiary-photos__plate {
    aspect-ratio: 16 / 9;
    padding: 1.5rem;
}

.apiary-photos__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.apiary-photos__caption {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.apiary-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.apiary-section__text {
    margin: 0;
    color: var(--text-color);
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ── The map, and what the page says about it ── */
.apiary-map__canvas {
    height: 22rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.apiary-map__note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── The harvests this place offers ── */
.apiary-listings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hairline);
}

.apiary-listings__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.apiary-sort {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.apiary-sort__label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.apiary-sort__select {
    padding-block: 0.4rem;
    padding-left: 0.6rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    /* background-color, not the `background` shorthand: the shorthand also
       resets background-image, which is where the chevron lives (controls.css). */
    background-color: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.apiary-listings__grid {
    margin-top: 0;
}

.apiary-listings__empty {
    margin: 0;
    padding: 2.5rem 0;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .apiary-page__top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .apiary-page {
        gap: 2rem;
    }

    .apiary-rail__name {
        font-size: 1.7rem;
    }

    .apiary-rail__cta {
        align-self: stretch;
        text-align: center;
    }

    .apiary-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apiary-map__canvas {
        height: 16rem;
    }

    .apiary-page__about .trade-info {
        grid-template-columns: 1fr;
    }
}

/* ── Import from Apisense ───────────────────────────────────────────────────
   The template referenced `.badge`, `.badge--muted`, `.badge--success` and
   `.apiary-actions`; none of them existed in any stylesheet, so the card's
   status read as an unstyled string flush against the card edge. */
.apiary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    /* Matches .apiary-info's padding so the two blocks share one left edge. */
    padding: 0 1.5rem 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge--success {
    background: color-mix(in srgb, var(--verified-color) 14%, var(--surface-color));
    color: var(--verified-color);
}

/* Not an error state — the beekeeper has done nothing wrong, so this is quiet
   rather than red. The explanation above the grid carries the reason. */
.badge--muted {
    background: var(--plate-bg);
    color: var(--text-muted);
    border: 1px solid var(--hairline);
}

/* The reason behind the number in the header. Sits above the grid because it
   applies to every card, not to one. */
.quota-note {
    align-items: flex-start;
    gap: 0.6rem;
    max-width: 68ch;
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    line-height: 1.55;
}

.quota-note .icon {
    /* Optical alignment with the first line rather than the text box. */
    margin-top: 0.2em;
}

.quota-note--blocked {
    padding: 0.9rem 1.1rem;
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius);
    background: var(--plate-bg);
    border-top: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    color: var(--text-color);
}

/* ── Photo lightbox ─────────────────────────────────────────────────────────
   Native <dialog> overlay for the public apiary gallery. Hairline chrome,
   quiet scrim, no card shadows. Keyboard: Esc (built-in), ← → between photos.
   ------------------------------------------------------------------------- */
.photo-lightbox {
    padding: 0;
    border: 0;
    background: transparent;
    /* Explicit centering: UA default can leave the dialog top-biased. */
    position: fixed;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    max-width: min(96vw, 72rem);
    max-height: 96vh;
    color: var(--text-color);
}

.photo-lightbox::backdrop {
    background: rgba(18, 16, 12, 0.72);
    backdrop-filter: blur(2px);
}

.photo-lightbox__chrome {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "close close close"
        "prev  figure next"
        ".     counter .";
    align-items: center;
    gap: 0.75rem 0.5rem;
    padding: 1rem;
}

.photo-lightbox__close {
    grid-area: close;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
}

.photo-lightbox__close:hover {
    background: var(--plate-bg);
}

.photo-lightbox__close:focus-visible,
.photo-lightbox__nav:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.photo-lightbox__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
}

.photo-lightbox__nav:hover {
    background: var(--plate-bg);
}

.photo-lightbox__nav--prev {
    grid-area: prev;
}

.photo-lightbox__nav--next {
    grid-area: next;
}

.photo-lightbox__figure {
    grid-area: figure;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.photo-lightbox__plate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(70vh, 36rem);
    max-height: 78vh;
    padding: 1.25rem;
    background: var(--plate-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    overflow: hidden;
}

.photo-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: min(70vh, 36rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.photo-lightbox__caption {
    margin: 0;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.5;
}

.photo-lightbox__counter {
    grid-area: counter;
    margin: 0;
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .photo-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.82);
}

[data-theme="high-contrast"] .photo-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.92);
}

[data-theme="high-contrast"] .photo-lightbox__plate,
[data-theme="high-contrast"] .photo-lightbox__close,
[data-theme="high-contrast"] .photo-lightbox__nav {
    border-width: 2px;
    border-color: var(--white);
}

@media (max-width: 700px) {
    .photo-lightbox__chrome {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "close close"
            "figure figure"
            "prev next"
            "counter counter";
        padding: 0.75rem;
    }

    .photo-lightbox__plate {
        min-height: 40vh;
        max-height: 62vh;
        padding: 0.75rem;
    }

    .photo-lightbox__image {
        max-height: 58vh;
    }

    .photo-lightbox__nav {
        justify-self: center;
    }
}

/* Direct message to the beekeeper — same grammar as the cart buyer box. */
.contact-form {
    scroll-margin-top: 5rem;
    padding: 1.25rem 1.2rem 1.4rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface-color);
}

.contact-form__heading {
    margin: 0 0 0.35rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-form__hint {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.contact-form__form {
    display: grid;
    gap: 0.85rem;
    max-width: 32rem;
}

.contact-form__actions {
    margin: 0;
}
