/*
 * Golfklubb – gemensamt designspråk.
 * Alla färger, avstånd och former styrs av variablerna nedan. Tema eller klubb kan åsidosätta dem,
 * till exempel:  .gk-block { --gp-accent: #0a5c36; --gp-radius: 0; }
 * Färger hämtas i första hand från temats paletter (theme.json: primary och base).
 */
.gk-block {
    /* Färger */
    --gp-accent: var(--wp--preset--color--primary, #1f5130);
    --gp-on-accent: var(--wp--preset--color--base, #fff);
    --gp-open: #1e7a38;
    --gp-partial: #8a5a00;
    --gp-closed: #b42626;
    --gp-border: color-mix(in srgb, currentColor 18%, transparent);
    --gp-border-strong: color-mix(in srgb, currentColor 25%, transparent);
    --gp-muted: color-mix(in srgb, currentColor 68%, transparent);
    /* Form och avstånd */
    --gp-radius: 6px;
    --gp-gap: var(--wp--preset--spacing--40, 1.5rem);
    --gk-gap: var(--gp-gap); /* äldre namn, behålls för teman som använder det */
    overflow-wrap: anywhere;
}
.gk-block [hidden] { display: none !important; }
.gk-block .screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; }

/* Gemensamt */
.gk-block .gk-heading { margin-block: 0 var(--gp-gap); }
.gk-block .gk-items { display: grid; gap: var(--gp-gap); }
.gk-block .gk-item { min-width: 0; margin: 0; }
.gk-block .gk-title { margin-block: 0 .65em; }
.gk-block .gk-item > p { margin-block: .5em; }
.gk-block .gk-item > p:last-child { margin-bottom: 0; }
.gk-block .gk-updated, .gk-block .gk-period, .gk-block .gk-rate-note { font-size: .875em; }
.gk-block .gk-description > :first-child { margin-top: 0; }
.gk-block .gk-description > :last-child { margin-bottom: 0; }
.gk-block .gk-live-warning { border-inline-start: 3px solid currentColor; padding-inline-start: .75em; font-size: .875em; }
.gk-block summary { cursor: pointer; font-weight: 600; }
.gk-block details > .gk-description { padding-block: 1em; }

/* Banstatus */
.gk-block .gk-status-label { display: flex; align-items: center; gap: .5em; font-weight: 600; }
.gk-block .gk-dot { width: .65em; height: .65em; flex: none; border-radius: 50%; background: currentColor; }
.gk-block .gk-state-open .gk-dot { background: var(--gp-open); }
.gk-block .gk-state-partial .gk-dot { background: var(--gp-partial); }
.gk-block .gk-state-closed .gk-dot { background: var(--gp-closed); }

/* Tabeller (öppettider, greenfee) */
.gk-block .gk-table-scroll { max-width: 100%; overflow-x: auto; }
.gk-block table { width: 100%; border-collapse: collapse; font-size: inherit; margin-block: 1em; }
.gk-block th, .gk-block td { padding: .6em .8em; text-align: start; border-bottom: 1px solid var(--gp-border-strong); vertical-align: top; }
.gk-block th:first-child, .gk-block td:first-child { padding-inline-start: 0; }
.gk-block thead th { font-weight: 600; }
.gk-block tbody th { font-weight: 400; }
.gk-block .gk-rate-note { display: block; margin-top: .3em; }
.gk-block .gk-exceptions { padding-block: 1em; }
.gk-block .gk-exceptions ul { padding-inline-start: 1.25em; }

/* Öppettider, en tabell med flera delar */
.gk-block th.gk-nowrap { white-space: nowrap; padding-inline-end: 1.5em; }
/* Dag och tid i samma cell. Hängande indrag gör att en rad som bryts fortsätter i linje med tiden ovanför. */
.gk-block .gk-hours-line { display: block; padding-inline-start: var(--gp-days-width, 5.75em); text-indent: calc(-1 * var(--gp-days-width, 5.75em)); }
.gk-block .gk-hours-line + .gk-hours-line { margin-top: .25em; }
.gk-block .gk-hours-days { display: inline-block; box-sizing: border-box; width: var(--gp-days-width, 5.75em); padding-inline-end: .5em; font-weight: 600; text-indent: 0; white-space: nowrap; }
.gk-block .gk-hours-time { white-space: nowrap; }
.gk-block .gk-hours .gk-table-scroll tbody th { font-weight: 600; }

/* Menyer */
.gk-block .gk-dishes { list-style: none; margin: 0; padding: 0; }
.gk-block .gk-dishes > li { padding-block: 1em; border-bottom: 1px solid var(--gp-border); }
.gk-block .gk-dishes p { margin-block: .4em; }
.gk-block .gk-dish-line { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.gk-block .gk-dish-line > span { white-space: nowrap; }
.gk-block .gk-dish-day, .gk-block .gk-dish-section { display: block; font-size: .85em; margin-bottom: .4em; }
.gk-block .gk-diets { display: inline-flex; flex-wrap: wrap; gap: .3em; margin-inline-start: .4em; vertical-align: middle; }
.gk-block .gk-diet { display: inline-block; padding: .05em .5em; font-size: .7em; font-weight: 600; letter-spacing: .03em; border: 1px solid var(--gp-border-strong); border-radius: 999px; }
.gk-block .gk-diet-legend { margin-top: .75em; font-size: .8em; color: var(--gp-muted); }

/* Partners och personal */
.gk-block.gk-partner .gk-items, .gk-block.gk-staff .gk-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.gk-block.gk-partner.gk-layout-compact .gk-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); align-items: center; }
.gk-block .gk-logo { display: block; width: auto; max-width: 100%; height: auto; max-height: 110px; object-fit: contain; margin-block: 0 1em; }
.gk-block .gk-portrait { display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 1em; border-radius: var(--gp-radius); }

/* FAQ */
.gk-block .gk-question { border-bottom: 1px solid var(--gp-border-strong); padding-bottom: 1em; }

@media (min-width: 700px) {
    .gk-block.gk-status.gk-layout-compact .gk-items, .gk-block.gk-hours.gk-layout-compact .gk-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

/* Filer */
.gk-block .gk-file-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75em 1em; margin-block: 0 1.25em; }
.gk-block .gk-file-search { flex: 1 1 240px; min-width: 0; padding: .6em .85em; font: inherit; color: inherit; background: transparent; border: 1px solid var(--gp-border); border-radius: var(--gp-radius); }
.gk-block .gk-file-chips { display: flex; flex-wrap: wrap; gap: .4em; }
.gk-block .gk-chip { padding: .35em .95em; font: inherit; font-size: .9em; color: inherit; background: transparent; border: 1px solid var(--gp-border); border-radius: 999px; cursor: pointer; }
.gk-block .gk-chip[aria-pressed="true"] { color: var(--gp-on-accent); background: var(--gp-accent); border-color: var(--gp-accent); }
.gk-block .gk-file-group + .gk-file-group { margin-top: 2em; }
.gk-block .gk-file-group-title { margin: 0 0 .4em; padding-bottom: .4em; border-bottom: 2px solid var(--gp-accent); }
.gk-block .gk-file-list { list-style: none; margin: 0; padding: 0; }
.gk-block .gk-file-item { display: flex; gap: 1em; align-items: flex-start; padding-block: .9em; border-bottom: 1px solid var(--gp-border); }
.gk-block .gk-file-type { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; font-size: .7rem; font-weight: 700; letter-spacing: .04em; border: 1px solid var(--gp-border); border-radius: var(--gp-radius); }
.gk-block .gk-file-main { flex: 1; min-width: 0; }
.gk-block .gk-file-link { font-weight: 600; }
.gk-block .gk-badge { display: inline-block; margin-inline-start: .6em; padding: .1em .6em; font-size: .75em; vertical-align: middle; border: 1px solid var(--gp-border); border-radius: 999px; }
.gk-block .gk-file-meta { margin: .2em 0 0; font-size: .875em; color: var(--gp-muted); }
.gk-block .gk-file-summary { margin: .45em 0 0; }
.gk-block .gk-file-history { margin-top: .5em; font-size: .875em; }
.gk-block .gk-file-history ul { margin: .4em 0 0; padding-inline-start: 1.25em; }
.gk-block .gk-file-replaced { color: var(--gp-muted); }
.gk-block .gk-file-login { margin-top: 1.25em; padding: .8em 1em; border: 1px solid var(--gp-border); border-radius: var(--gp-radius); }
.gk-block.gk-file.gk-layout-compact .gk-file-item { padding-block: .5em; }
.gk-block.gk-file.gk-layout-compact .gk-file-type { width: 2.4rem; height: 2.4rem; }
