/* Public football-field directory. Layered on top of landing.css — reuses its
   .container / .btn / .card primitives and only adds what the listing and
   profile pages need. */

.dir-head { padding: 40px 0 24px; }
.dir-head h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 8px; color: #12351f; }
.dir-head p { color: #5b6b60; margin: 0; }

/* --- Filter bar --- */
.dir-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.dir-filters form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.dir-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #d7e2da;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: #12351f;
}
.dir-input:focus { outline: 2px solid #47CE79; outline-offset: 1px; border-color: #47CE79; }
.dir-select { flex: 0 1 200px; }

.dir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.dir-chip {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid #d7e2da;
    background: #fff;
    color: #3c5647;
    text-decoration: none;
    font-size: 0.875rem;
}
.dir-chip:hover { border-color: #47CE79; color: #1A5C30; }
.dir-chip--active { background: #1A5C30; border-color: #1A5C30; color: #fff; }

/* --- Listing grid --- */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 0 0 40px;
}
.dir-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4ece7;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s ease, transform .18s ease;
}
.dir-card:hover { box-shadow: 0 8px 24px rgba(16, 51, 30, .10); transform: translateY(-2px); }
/* Ratio boxes are padding-based, not `aspect-ratio`: these pages open in the
   Telegram in-app browser and older Android WebViews, which ignore the
   property — the image then falls back to its natural height and the
   thumbnails come out uneven. padding-top works everywhere. */
.dir-card__media { position: relative; height: 0; padding-top: 62.5%; background: #eef4f0; overflow: hidden; }
.dir-card__media img,
.dir-card__placeholder {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.dir-card__media img { object-fit: cover; display: block; }
.dir-card__placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #9db3a6;
}
.dir-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dir-card__name { font-weight: 700; color: #12351f; font-size: 1.0625rem; line-height: 1.35; }
.dir-card__meta { color: #6b7f72; font-size: 0.875rem; }
.dir-card__price { color: #1A5C30; font-weight: 600; font-size: 0.9375rem; margin-top: auto; }

.dir-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700;
    background: rgba(255, 255, 255, .94); color: #3c5647;
    backdrop-filter: blur(2px);
}
.dir-badge--bookable { background: #1A5C30; color: #fff; }

/* --- Profile page --- */
.dir-hero { aspect-ratio: 21 / 9; background: #eef4f0; border-radius: 16px; overflow: hidden; margin: 24px 0 0; }
.dir-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dir-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 0; }
.dir-gallery > a { position: relative; display: block; height: 0; padding-top: 75%;
  border-radius: 10px; overflow: hidden; background: #eef4f0; }
.dir-gallery > a img { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; cursor: zoom-in; transition: transform .15s ease; }
.dir-gallery > a:hover img { transform: scale(1.03); }
.dir-gallery > a:focus-visible { outline: 3px solid #1f9d55; outline-offset: 2px; }

/* CSS-only lightbox: the thumbnail links to #id, :target reveals the overlay.
   No JS, so it works in the Telegram in-app browser too. */
.dir-lightbox { display: none; position: fixed; inset: 0; z-index: 60; padding: 24px;
  background: rgba(6, 20, 12, .9); align-items: center; justify-content: center; }
.dir-lightbox:target { display: flex; }
.dir-lightbox__backdrop { position: absolute; inset: 0; }
.dir-lightbox img { position: relative; max-width: min(1100px, 100%); max-height: 88vh;
  width: auto; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 12px; }
.dir-lightbox__close { position: absolute; top: 12px; right: 18px; z-index: 1;
  color: #fff; font-size: 2.25rem; line-height: 1; text-decoration: none; padding: 4px 12px; }
.dir-lightbox__close:hover { opacity: .8; }

.dir-title { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin: 22px 0 6px; color: #12351f; }
.dir-sub { color: #5b6b60; margin: 0 0 18px; }

.dir-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 0 0 48px; }
@media (min-width: 900px) { .dir-layout { grid-template-columns: minmax(0, 1fr) 320px; } }

.dir-section { margin: 0 0 26px; }
.dir-section h2 { font-size: 1.125rem; margin: 0 0 10px; color: #12351f; }
.dir-section p { color: #45564c; margin: 0; line-height: 1.65; }

.dir-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dir-facts li { display: flex; gap: 10px; color: #45564c; font-size: 0.9375rem; }
.dir-facts span:first-child { flex: 0 0 22px; }

.dir-aside { align-self: start; position: sticky; top: 20px; }
.dir-panel { background: #fff; border: 1px solid #e4ece7; border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.dir-panel h3 { margin: 0 0 6px; font-size: 1rem; color: #12351f; }
.dir-panel p { margin: 0 0 14px; color: #6b7f72; font-size: 0.875rem; line-height: 1.6; }
.dir-panel .btn { width: 100%; text-align: center; margin: 0 0 8px; }
.dir-panel .btn:last-child { margin-bottom: 0; }

.dir-note {
    background: #f6faf7; border: 1px solid #e0ece4; border-radius: 10px;
    padding: 11px 14px; color: #5b6b60; font-size: 0.8125rem; line-height: 1.6;
}
/* The site resets anchors to `color: inherit; text-decoration: none`, which
   left "contact us" — the whole point of the delisting note — looking like
   plain text. */
.dir-note a {
    color: #1A5C30; font-weight: 700;
    text-decoration: underline; text-underline-offset: 2px;
}
.dir-note a:hover { color: #12351f; }

.dir-alert {
    background: #E8F8EE; border: 1px solid #C6EED7; color: #1A5C30;
    border-radius: 10px; padding: 13px 16px; margin: 20px 0 0; font-weight: 500;
}

/* --- Claim form --- */
.dir-claim { border: 1px solid #e4ece7; border-radius: 14px; background: #fff; margin: 0 0 40px; }
.dir-claim > summary {
    padding: 16px 18px; cursor: pointer; font-weight: 600; color: #1A5C30; list-style: none;
}
.dir-claim > summary::-webkit-details-marker { display: none; }
.dir-claim > summary::after { content: ' ▾'; }
.dir-claim[open] > summary::after { content: ' ▴'; }
.dir-claim__body { padding: 0 18px 20px; display: grid; gap: 12px; }
.dir-claim label { display: block; font-size: 0.875rem; font-weight: 600; color: #3c5647; margin: 0 0 5px; }
.dir-claim .dir-input, .dir-claim textarea, .dir-claim select { width: 100%; }
.dir-claim textarea { min-height: 84px; resize: vertical; }
.dir-hint { font-size: 0.8125rem; color: #7b8d82; margin: 5px 0 0; }
.dir-error { color: #b42318; font-size: 0.8125rem; margin: 5px 0 0; }
.dir-removal { font-size: 0.8125rem; color: #6b7f72; }
.dir-removal summary { cursor: pointer; }

.dir-pagination { display: flex; justify-content: center; gap: 6px; margin: 0 0 48px; flex-wrap: wrap; }

/* --- Venue facilities (the venue → facility hierarchy on the profile) --- */
.dir-tag {
    display: inline-block; padding: 2px 9px; margin: 0 4px 0 0;
    border-radius: 999px; background: #E8F8EE; color: #1A5C30;
    font-size: 0.75rem; font-weight: 600; vertical-align: middle;
}
.dir-tag--muted { background: #eef2f0; color: #5b6b60; }
.dir-card__sports { display: block; margin: 2px 0 0; }

.dir-facilities { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dir-facility {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid #e4ece7; border-radius: 12px; background: #fff;
}
.dir-facility__name { font-weight: 600; color: #12351f; margin-right: 6px; }
.dir-facility__price { color: #1A5C30; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }

/* --- Pagination (self-styled; the stock Laravel views assume Tailwind) --- */
.dir-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap; margin: 8px 0 12px;
}
.dir-page {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid #d7e2da; border-radius: 10px;
    background: #fff; color: #3c5647; text-decoration: none;
    font-size: 0.875rem; font-weight: 600; line-height: 1;
}
.dir-page:hover { border-color: #47CE79; color: #1A5C30; }
.dir-page--current { background: #1A5C30; border-color: #1A5C30; color: #fff; }
.dir-page--disabled { opacity: .45; pointer-events: none; }
.dir-page--gap { border: 0; background: none; min-width: 20px; padding: 0; }
.dir-pagination__summary {
    text-align: center; color: #6b7f72; font-size: 0.875rem; margin: 0 0 48px;
}

/* --- Facility detail (inline expansion + its own page) --- */
.dir-facility { display: block; padding: 0; }
.dir-facility > details > summary {
    list-style: none; cursor: pointer; padding: 12px 14px;
}
.dir-facility > details > summary::-webkit-details-marker { display: none; }
.dir-facility__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dir-facility > details > summary::after { content: ' ▾'; color: #6b7f72; }
.dir-facility > details[open] > summary::after { content: ' ▴'; }
.dir-facility__body {
    padding: 0 14px 14px; border-top: 1px solid #eef4f0; margin-top: 4px; padding-top: 12px;
}
.dir-facility__body p { color: #45564c; margin: 0 0 10px; line-height: 1.6; }
.dir-facility__link {
    display: inline-block; margin-top: 10px; color: #1A5C30;
    font-weight: 600; font-size: 0.875rem; text-decoration: none;
}
.dir-facility__link:hover { text-decoration: underline; }

.dir-crumbs { padding: 24px 0 0; color: #6b7f72; font-size: 0.875rem; }
.dir-crumbs a { color: #3c5647; text-decoration: none; }
.dir-crumbs a:hover { color: #1A5C30; text-decoration: underline; }
.dir-crumbs span { margin: 0 6px; }

/* --- "Other venues nearby" ---
   A horizontal scroller, not a grid: on a profile page this is a secondary
   shelf and must not take the vertical space a grid would. No JS, matching the
   CSS-only lightbox above — these pages open inside the Telegram in-app
   browser. Without scroll-snap support it degrades to a plain scroller. */
.dir-nearby { margin: 0 0 40px; }

.dir-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    /* overflow-x forces overflow-y to auto, which would clip the card's hover
       lift and shadow — this gives them room. */
    padding: 6px 2px 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cfded5 transparent;
}
.dir-carousel:focus-visible { outline: 3px solid #1f9d55; outline-offset: 4px; }
.dir-carousel::-webkit-scrollbar { height: 6px; }
.dir-carousel::-webkit-scrollbar-track { background: transparent; }
.dir-carousel::-webkit-scrollbar-thumb { background: #cfded5; border-radius: 999px; }

/* The card has no width of its own (the grid supplies it there, the track
   here). A fixed basis is what makes the next card peek in and signal that the
   row scrolls. */
.dir-carousel > .dir-card { flex: 0 0 264px; min-width: 0; scroll-snap-align: start; }
@media (max-width: 400px) {
    .dir-carousel > .dir-card { flex-basis: 240px; }
}

/* Touch devices have no usable scrollbar anyway; hiding it stops a dead grey
   bar sitting under the row. */
@media (hover: none) and (pointer: coarse) {
    .dir-carousel { scrollbar-width: none; }
    .dir-carousel::-webkit-scrollbar { display: none; }
}

/* --- Availability panel (date strip + slot chips on the profile) ---
   Same palette and radii as the filter chips above. The date row scrolls
   horizontally on a phone the way .dir-carousel does, because a fortnight of
   days never fits, and the slot grid folds after a couple of rows there. */
.dir-avail__list { display: grid; gap: 22px; }
.dir-avail.is-loading .dir-slots { opacity: .5; }

.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;
}

/* --- Date strip + date picker --- */
.dir-dates { display: flex; align-items: stretch; gap: 8px; margin: 0 0 22px; }

.dir-dates__strip {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cfded5 transparent;
}
.dir-dates__strip::-webkit-scrollbar { height: 6px; }
.dir-dates__strip::-webkit-scrollbar-track { background: transparent; }
.dir-dates__strip::-webkit-scrollbar-thumb { background: #cfded5; border-radius: 999px; }
@media (hover: none) and (pointer: coarse) {
    .dir-dates__strip { scrollbar-width: none; }
    .dir-dates__strip::-webkit-scrollbar { display: none; }
}

.dir-date {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 68px;
    padding: 9px 11px;
    border: 1px solid #d7e2da;
    border-radius: 12px;
    background: #fff;
    color: #3c5647;
    font: inherit;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    scroll-snap-align: start;
}
.dir-date:hover { border-color: #47CE79; color: #1A5C30; }
.dir-date:focus-visible { outline: 3px solid #1f9d55; outline-offset: 2px; }
.dir-date.is-active { background: #1A5C30; border-color: #1A5C30; color: #fff; }
.dir-date__day { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dir-date__dow { font-size: 0.6875rem; opacity: .85; white-space: nowrap; }

/* The picker reaches dates the strip does not show — it is a real GET form, so
   it still works with scripting off; the script intercepts it instead. */
.dir-dates__pick { display: flex; align-items: center; flex: 0 0 auto; margin: 2px 0 10px; }
.dir-dates__pick-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 100%;
    padding: 9px 10px;
    border: 1px solid #d7e2da;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.dir-dates__pick-label:hover { border-color: #47CE79; }
.dir-dates__pick-icon { font-size: 1.125rem; line-height: 1; }
/* The native input sits under the icon so the whole control is one tap target
   on a phone, where the date UI is a system sheet anyway. */
.dir-dates__pick input[type="date"] {
    width: 1px; height: 1px; padding: 0; border: 0;
    opacity: 0; pointer-events: none;
}
/* Visible by default: unscripted, picking a date has to be submittable, and a
   touch user cannot reach a focus-only control. The script hides it once it
   takes over the form (see .is-enhanced below). */
.dir-dates__pick-go {
    margin-left: 8px;
    padding: 9px 12px;
    border: 1px solid #d7e2da;
    border-radius: 12px;
    background: #fff;
    color: #1A5C30;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}
.dir-dates__pick-go:hover { border-color: #47CE79; }
.dir-avail.is-enhanced .dir-dates__pick-go { position: absolute; left: -9999px; }
.dir-avail.is-enhanced .dir-dates__pick-go:focus { position: static; left: auto; }

/* --- Slot grid --- */
.dir-avail__head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 10px;
}
.dir-avail__name { font-size: 1.0625rem; font-weight: 600; color: #12351f; margin: 0; }
.dir-avail__price { color: #45564c; font-size: 0.9375rem; font-weight: 600; }
.dir-avail__status { color: #5b6b60; font-size: 0.875rem; margin: 0 0 10px; }

.dir-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.dir-slot {
    display: inline-block;
    min-width: 62px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #47CE79;
    background: #fff;
    color: #1A5C30;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    text-decoration: none;
}
a.dir-slot:hover { background: #1A5C30; border-color: #1A5C30; color: #fff; }
a.dir-slot:focus-visible { outline: 3px solid #1f9d55; outline-offset: 2px; }

/* Taken slots stay visible so a busy day doesn't read as an empty one, but
   they say nothing about why — that is the venue's business, not a visitor's. */
.dir-slot--taken {
    border-color: #e2e8e4;
    background: #f4f6f5;
    color: #a3b0a8;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* --- "Show all times" fold (phones only) ---
   A checkbox rather than a script: the fold has to work on a shared link
   opened in an in-app browser with JS disabled. */
.dir-slots__more { display: none; }
.dir-slots__more-hide { display: none; }

@media (max-width: 640px) {
    .dir-avail__facility.has-overflow .dir-slot.is-folded { display: none; }
    .dir-avail__facility.has-overflow .dir-slots__more {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 12px 0 0;
        color: #1A5C30;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
    }
    .dir-slots__more::after { content: '⌄'; font-size: 1rem; line-height: 1; }
    .dir-slots__toggle:checked ~ .dir-slots .dir-slot.is-folded { display: inline-block; }
    .dir-slots__toggle:checked ~ .dir-slots__more .dir-slots__more-show { display: none; }
    .dir-slots__toggle:checked ~ .dir-slots__more .dir-slots__more-hide { display: inline; }
    .dir-slots__toggle:checked ~ .dir-slots__more::after { content: '⌃'; }
    .dir-slots__toggle:focus-visible ~ .dir-slots__more { outline: 3px solid #1f9d55; outline-offset: 3px; }
}

.dir-avail__note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 18px 0 0;
    padding: 10px 12px;
    border: 1px solid #e3ece6;
    border-radius: 10px;
    background: #f7faf8;
    color: #5b6b60;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* --- "Read more" fold for long descriptions (phones only) ---
   Desktop has the room for the whole description, so the remainder is revealed
   and the control removed there; only a narrow screen folds after the opening
   sentences. The seam is chosen server-side (App\Support\TextPreview).

   A checkbox, not a script: the description is the venue's pitch and must not
   sit half-shown in an in-app browser that blocked JS. The remainder stays in
   the DOM either way, so crawlers and link previews get the whole text. */
.dir-more { color: #45564c; margin: 0; line-height: 1.65; }

/* Desktop and up: the fold does not exist. */
.dir-more__rest { display: inline; }
.dir-more__ellipsis { display: none; }
.dir-more__btn { display: none; }

@media (max-width: 640px) {
    .dir-more__ellipsis { display: inline; }
    .dir-more__rest { display: none; }
    .dir-more__toggle:checked ~ .dir-more .dir-more__rest { display: inline; }
    .dir-more__toggle:checked ~ .dir-more .dir-more__ellipsis { display: none; }

    .dir-more__btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin: 8px 0 0;
        color: #1A5C30;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
    }
    .dir-more__btn::after { content: '⌄'; font-size: 1rem; line-height: 1; }
    .dir-more__btn-hide { display: none; }
    .dir-more__toggle:checked ~ .dir-more__btn .dir-more__btn-show { display: none; }
    .dir-more__toggle:checked ~ .dir-more__btn .dir-more__btn-hide { display: inline; }
    .dir-more__toggle:checked ~ .dir-more__btn::after { content: '⌃'; }
    .dir-more__toggle:focus-visible ~ .dir-more__btn { outline: 3px solid #1f9d55; outline-offset: 3px; }
}
