/* ============================================
   SIPO dynamic component styles
   Status strip · branch picker · hours tables
   Palette follows css/base.css tokens.
   ============================================ */

:root {
    --sipo-green: #1f7a4d;
    --sipo-amber: #8a6d1f;
    --sipo-red:   #8c2f2f;
    --sipo-grey:  #2a2e30;
}

/* ---------- Status strip ---------- */
.status-strip {
    position: sticky; top: 0; z-index: 110;
    background: var(--sipo-grey);
    color: #fff;
    font-family: var(--f-sans);
    font-size: 12.5px;
    line-height: 1.4;
    padding: 7px 16px;
    transition: background .3s ease;
}
.status-strip.open    { background: var(--sipo-green); }
.status-strip.partial { background: var(--sipo-amber); }
.status-strip.closed  { background: var(--sipo-red); }

.status-strip-inner {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 6px 14px;
    max-width: 1200px; margin: 0 auto;
}
.status-strip-loading { opacity: .85; }

.status-branch { display: inline-flex; align-items: center; gap: 7px; }
.status-branch-name { font-weight: 700; letter-spacing: .02em; }
.status-branch-text { opacity: .92; }

.status-strip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; flex: none;
}
.is-open    .status-strip-dot { background: #4ade80; }
.is-limited .status-strip-dot { background: #fbbf24; }
.is-closed  .status-strip-dot { background: #f87171; }

.status-sep { width: 1px; height: 14px; background: currentColor; opacity: .3; }

/* The nav sits directly below the strip. */
body.has-status-strip .site-nav { top: var(--strip-height, 0px); }

/* ---------- Modal shell ---------- */
.sipo-modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
.sipo-modal-overlay.active { opacity: 1; visibility: visible; }
body.modal-open { overflow: hidden; }

.sipo-modal {
    position: relative;
    width: 100%; max-width: 460px;
    max-height: calc(100vh - 48px); overflow-y: auto;
    background: var(--butter);
    color: var(--grey-dark);
    border-radius: 14px;
    padding: 34px 30px 30px;
    text-align: center;
    transform: translateY(14px);
    transition: transform .28s cubic-bezier(.34, 1.3, .64, 1);
}
.sipo-modal-overlay.active .sipo-modal { transform: translateY(0); }

.sipo-modal-close {
    position: absolute; top: 10px; right: 14px;
    width: 34px; height: 34px;
    border: 0; background: none; cursor: pointer;
    font-size: 26px; line-height: 1;
    color: var(--grey-text);
}
.sipo-modal-close:hover { color: var(--brown); }

.sipo-modal-title {
    margin: 0 0 6px;
    font-family: var(--f-poster); font-weight: 900;
    font-size: 25px; line-height: 1.2;
    color: var(--brown);
}
.sipo-modal-text {
    margin: 0 0 20px;
    font-size: 14px; line-height: 1.5;
    color: var(--grey-text);
}

/* ---------- Branch options ---------- */
.branch-options { display: flex; flex-direction: column; gap: 12px; }

.branch-option {
    display: block; text-align: left;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
    border-left: 4px solid var(--grey-text);
    border-radius: 10px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.branch-option:hover,
.branch-option:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    border-left-color: var(--brown);
    outline: none;
}
.branch-option.is-open    { border-left-color: var(--sipo-green); }
.branch-option.is-limited { border-left-color: var(--sipo-amber); }
.branch-option.is-closed  { border-left-color: var(--sipo-red); }

.branch-option-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
}
.branch-option-name {
    font-family: var(--f-poster); font-weight: 900;
    font-size: 19px; color: var(--grey-dark);
}
.branch-option-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 700;
    color: var(--grey-text);
}
.branch-option.is-open    .branch-option-badge { color: var(--sipo-green); }
.branch-option.is-open    .status-strip-dot    { background: #22c55e; }
.branch-option.is-limited .branch-option-badge { color: var(--sipo-amber); }
.branch-option.is-limited .status-strip-dot    { background: #d97706; }
.branch-option.is-closed  .branch-option-badge { color: var(--sipo-red); }
.branch-option.is-closed  .status-strip-dot    { background: #ef4444; }

.branch-option-address {
    display: block; margin-top: 5px;
    font-size: 13px; line-height: 1.45;
    color: var(--grey-text);
}
.branch-option-notice {
    display: block; margin-top: 9px;
    padding: 8px 10px;
    background: rgba(140, 109, 31, .1);
    border-radius: 6px;
    font-size: 12px; line-height: 1.45;
    color: var(--sipo-amber);
    white-space: pre-line;
}
.branch-option.is-closed .branch-option-notice {
    background: rgba(140, 47, 47, .08);
    color: var(--sipo-red);
}
.branch-option-go {
    display: block; margin-top: 11px;
    font-size: 13px; font-weight: 700;
    color: var(--brown);
}

/* ---------- Hours tables ---------- */
.hours-table { width: 100%; }

.hours-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    font-size: 14px; line-height: 1.5;
}
.hours-row:last-child { border-bottom: 0; }
.hours-row .day  { font-weight: 700; }
.hours-row .time { text-align: right; }
.hours-row .closed-day { opacity: .6; }
.hours-row.today { color: var(--cream); }

/* Compact <ul> variant */
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; padding: 5px 0;
    font-size: 13px; line-height: 1.45;
}
.hours-list .day  { font-weight: 700; }
.hours-list .time { text-align: right; }
.hours-list .closed-day { opacity: .6; }
.hours-list li.today { color: var(--cream); }

@media (max-width: 760px) {
    .status-strip { font-size: 11.5px; padding: 6px 12px; }
    .status-strip-inner { gap: 3px 10px; }
    .status-sep { display: none; }
    .status-branch { width: 100%; justify-content: center; }
    .sipo-modal { padding: 30px 20px 24px; }
    .sipo-modal-title { font-size: 22px; }
}
