/* C&K Locations — the Locations page ([cak_locations]). Kadence palette only; brand pink never re-shaded. */

.cakd {
    --cakd-pink: var(--global-palette1, #cb4288);
    --cakd-ink: var(--global-palette3, #402c23);
    --cakd-soft: var(--global-palette8, #fdf2f7);
    --cakd-line: #ead7df;
    max-width: var(--global-content-width, 1290px);
    margin: 0 auto;
    padding: 1.75rem var(--global-content-edge-padding, 1.5rem) 3.5rem;
    color: var(--cakd-ink);
}
.cakd .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.cakd-intro { text-align: center; max-width: 640px; margin: 0 auto 1.5rem; }
.cakd-title { margin: 0 0 0.4rem; color: var(--cakd-ink); font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cakd-lead { margin: 0; font-size: 1.05rem; }
.cakd-error { padding: 14px 16px; border-left: 4px solid #b42318; background: #fef3f2; }

/* search */
.cakd-search { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; margin: 0 auto; }
.cakd-search__row { display: flex; gap: 8px; flex: 1 1 420px; }
.cakd-search__input {
    flex: 1; min-width: 0; min-height: 50px; padding: 10px 16px;
    border: 1px solid #8a7a72; border-radius: 999px; font-size: 1.05rem; background: #fff;
}
.cakd-locate {
    display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 8px 20px;
    border: 2px solid var(--cakd-pink); border-radius: 999px; background: #fff; color: var(--cakd-ink);
    font-weight: 700; font-size: 1rem; cursor: pointer;
}
.cakd-locate svg { color: var(--cakd-pink); }
.cakd-locate:hover { background: var(--cakd-soft); }
.cakd-status { min-height: 1.5em; margin: 10px auto 18px; text-align: center; font-weight: 600; }

/* buttons — white on the brand pink is 4.49:1, so pink buttons use large (19px bold) text */
.cakd-btn, .cakd-btn:visited {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
    border: 1px solid #cdb5c0; border-radius: 10px; background: #fff; color: var(--cakd-ink);
    font-weight: 700; font-size: 0.95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.cakd-btn:hover { background: var(--cakd-soft); color: var(--cakd-ink); }
.cakd-btn--primary, .cakd-btn--primary:visited { background: var(--cakd-pink); border-color: var(--cakd-pink); color: #fff; font-size: 1.2rem; }
.cakd-btn--primary:hover { background: var(--cakd-pink); color: #fff; filter: brightness(0.92); }
.cakd-btn--ghost { border-style: dashed; }
.cakd-btn--small { min-height: 36px; padding: 4px 12px; font-size: 0.9rem; }
.cakd-btn--small.cakd-btn--primary { font-size: 1.2rem; }
.cakd-search .cakd-btn--primary { min-height: 50px; border-radius: 999px; padding: 8px 26px; }
.cakd-link { padding: 0; border: 0; background: none; color: var(--cakd-ink); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* map + details panel */
.cakd-main { display: grid; gap: 20px; margin-bottom: 2.5rem; }
.cakd-map { height: 380px; border-radius: 16px; background: #efe9e6; box-shadow: 0 2px 10px rgba(64, 44, 35, 0.12); z-index: 0; }
.cakd-detail:focus { outline: none; }
.cakd-detail:focus-visible { outline: 3px solid var(--cakd-pink); outline-offset: 4px; border-radius: 16px; }
@media (min-width: 900px) {
    .cakd-main.has-detail { grid-template-columns: minmax(340px, 5fr) 7fr; align-items: stretch; }
    .cakd-main.has-detail .cakd-map { height: auto; min-height: 520px; }
    .cakd-map { height: 420px; }
}

/* grid of stores */
.cakd-heading { margin: 0 0 1rem; color: var(--cakd-ink); font-size: 1.6rem; }
.cakd-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cakd-item { display: flex; }
.cakd-empty { margin-top: 1rem; text-align: center; }

.cakd-card {
    position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%;
    padding: 20px 22px; border: 1px solid var(--cakd-line); border-radius: 16px; background: #fff;
    box-shadow: 0 1px 4px rgba(64, 44, 35, 0.06);
}
.cakd-item.is-shown .cakd-card { border-color: var(--cakd-pink); }
.cakd-card.is-current { border: 2px solid var(--cakd-pink); }
.cakd-item.is-nearest .cakd-card { box-shadow: 0 0 0 3px var(--global-palette2, #f0cddc), 0 4px 14px rgba(64, 44, 35, 0.12); }
.cakd-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.cakd-card__name { margin: 0; font-size: 1.45rem; line-height: 1.15; color: var(--cakd-ink); }
.cakd-card__dist { font-weight: 700; color: #5c4b44; }
.cakd-card__dist:empty { display: none; }
.cakd-tag { margin-left: auto; padding: 2px 10px; border: 1px solid var(--cakd-pink); border-radius: 999px; background: var(--cakd-soft); font-size: 0.8rem; font-weight: 700; }
.cakd-item.is-nearest .cakd-card__head::after {
    content: "Nearest"; margin-left: auto; padding: 2px 10px; border: 1px solid var(--cakd-pink); border-radius: 999px;
    background: var(--cakd-soft); font-size: 0.8rem; font-weight: 700;
}
.cakd-card__status { margin: 0; align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 0.9rem; font-weight: 700; }
.cakd-card__status:empty { display: none; }
.cakd-card__status.is-open { background: #e6f4ea; color: #14532d; }
.cakd-card__status.is-closed { background: #f3eeec; color: #5c4b44; }
.cakd-card__addr { margin: 0; font-style: normal; line-height: 1.45; }
.cakd-card__phone { margin: 0; }
.cakd-card__phone a { color: var(--cakd-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.cakd-hours { width: 100%; margin: 4px 0 0; border-collapse: collapse; font-size: 0.95rem; border: 0; }
.cakd-hours caption { caption-side: top; text-align: left; padding: 0 0 4px; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #5c4b44; }
.cakd-hours th, .cakd-hours td { padding: 4px 8px; border: 0; border-bottom: 1px solid #f2e6eb; background: none; font-weight: 400; }
.cakd-hours th { text-align: left; }
.cakd-hours td { text-align: right; white-space: nowrap; }
.cakd-hours tr.is-today th, .cakd-hours tr.is-today td { background: var(--cakd-soft); font-weight: 700; }
.cakd-hours tr.is-today th::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--cakd-pink); }

.cakd-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.cakd-card__actions .cakd-btn--primary { flex: 1 1 100%; }
.cakd-review, .cakd-review:visited { display: inline-flex; align-items: center; gap: 8px; color: var(--cakd-ink); font-weight: 600; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 2px; }

/* the details panel version of a card */
.cakd-card--detail { height: 100%; padding: 26px 28px; border: 2px solid var(--cakd-pink); }
.cakd-card--detail .cakd-card__name { font-size: 2rem; }
.cakd-card--detail .cakd-card__name::before { content: "Cupcakes and Kisses"; display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #5c4b44; margin-bottom: 4px; }
.cakd-card--detail .cakd-hours { font-size: 1rem; }

.cakd-pop { display: flex; gap: 6px; margin-top: 8px; }
.cakl-pin--current span { background: var(--global-palette3, #402c23); }

@media (max-width: 600px) {
    .cakd { padding-top: 1rem; }
    .cakd-search__row { flex-basis: 100%; }
    .cakd-locate { width: 100%; justify-content: center; }
    .cakd-map { height: 280px; }
    .cakd-card--detail { padding: 20px; }
    .cakd-card--detail .cakd-card__name { font-size: 1.6rem; }
}

/* Get to the stores sooner: no reserved gap for an empty status line, a shorter map until a store is opened. */
.cakd-status:empty { min-height: 0; margin: 14px 0 0; }
.cakd-intro { margin-bottom: 1.1rem; }
.cakd-main { margin-bottom: 2rem; }
@media (min-width: 900px) {
    .cakd-main:not(.has-detail) .cakd-map { height: 320px; }
}
@media (max-width: 600px) {
    .cakd-main:not(.has-detail) .cakd-map { height: 220px; }
    .cakd-lead { font-size: 0.95rem; }
}
/* The theme indents lists in page content; the store grid is a list. */
.cakd ul.cakd-grid, .entry-content .cakd ul.cakd-grid { margin: 0; padding: 0; }
