/* =============================================================================
   GBP Hours Widget — front-end styles v1.3.0
   ============================================================================= */

/* ── Shared ──────────────────────────────────────────────────────────────────── */

.gbp-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gbp-dot.gbp-open   { background-color: #27ae60; }
.gbp-dot.gbp-closed { background-color: #c0392b; }

.gbp-directions {
    display: inline-block !important;
    margin-top: 16px !important;
    padding: 10px 22px !important;
    background-color: #1a3a5c !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: none !important;
    transition: opacity 0.15s ease;
}
.gbp-directions:hover,
.gbp-directions:focus { opacity: 0.82; color: #ffffff !important; }

.gbp-hw-editor-notice {
    padding: 12px 16px;
    background: #fff8e1;
    border-left: 3px solid #ffc107;
    font-size: 13px;
}

/* ── Status Badge ────────────────────────────────────────────────────────────── */

.gbp-badge-wrap {
    position: relative;
    display: inline-block;
}

/* Inner flex column — sizes to badge width so after-hours centres correctly */
.gbp-badge-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.gbp-badge {
    display: inline-flex !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit !important;
    line-height: 1.4;
    text-decoration: none !important;
}

/* Inline layout — single row */
.gbp-badge.gbp-badge-inline {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Stacked layout — two rows */
.gbp-badge.gbp-badge-stacked {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
}
.gbp-badge:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 3px;
}

.gbp-badge-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.5;
    flex-shrink: 0;
    background: transparent !important;
    color: inherit;
}

.gbp-status-text                      { font-weight: 600; }
.gbp-status-text.gbp-open-text        { color: #27ae60 !important; }
.gbp-status-text.gbp-closed-text      { color: #c0392b !important; }

.gbp-badge-next  { font-size: 0.9em; color: #666 !important; font-weight: 400; }
.gbp-store-name  { font-weight: 400; opacity: 0.75; }
.gbp-separator   { opacity: 0.35; }

.gbp-chevron {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
    opacity: 0.45;
    transition: transform 0.2s ease;
}

/* ── Popup ───────────────────────────────────────────────────────────────────── */

.gbp-popup {
    position: absolute !important;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99999 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 14px !important;
    padding: 20px 24px !important;
    min-width: 280px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    box-shadow: 0 6px 28px rgba(0,0,0,0.13), 0 1px 4px rgba(0,0,0,0.06) !important;
    border: none !important;
    animation: gbp-fade-in 0.15s ease;
}
.gbp-popup[hidden]         { display: none !important; }
.gbp-popup.gbp-popup-right { left: auto; right: 0; }

@keyframes gbp-fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile: full-width bottom sheet */
@media ( max-width: 600px ) {
    .gbp-popup {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 20px 20px 28px !important;
        animation: gbp-slide-up 0.22s ease !important;
        max-height: 85vh;
        overflow-y: auto;
    }
    .gbp-popup.gbp-popup-right {
        left: 0 !important;
        right: 0 !important;
    }
    .gbp-popup.gbp-popup-above {
        top: auto !important;
        bottom: 0 !important;
    }
    /* Two-col stacks to single col on mobile */
    .gbp-popup-two-col {
        flex-direction: column !important;
        min-width: 0 !important;
    }
    .gbp-popup-hours-col {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 1px solid #efefef;
        padding-bottom: 14px;
        margin-bottom: 14px;
    }
}

@keyframes gbp-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Table — aggressively override any theme zebra/border styles */
.gbp-popup .gbp-hours-table,
.gbp-popup .gbp-hours-table tbody,
.gbp-popup .gbp-hours-table tr,
.gbp-popup .gbp-hours-table td {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

.gbp-popup .gbp-hours-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 15px !important;
    margin: 0 !important;
}

.gbp-popup .gbp-hours-table td {
    padding: 7px 0 !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}

.gbp-popup .gbp-hours-table .gbp-day {
    padding-right: 32px !important;
    white-space: nowrap;
    font-weight: 400 !important;
    text-align: left !important;
    width: 50%;
}
.gbp-popup .gbp-hours-table .gbp-hrs {
    text-align: right !important;
    white-space: nowrap;
    font-weight: 400 !important;
    width: 50%;
}
.gbp-popup .gbp-hours-table .gbp-hrs-closed { color: #aaa !important; }

/* Today — no background, colour varies by open/closed state */
.gbp-popup .gbp-hours-table tr.gbp-today,
.gbp-popup .gbp-hours-table tr.gbp-today td {
    background: transparent !important;
    background-color: transparent !important;
}
.gbp-popup .gbp-hours-table tr.gbp-today .gbp-day { font-weight: 700 !important; }
.gbp-popup .gbp-hours-table tr.gbp-today .gbp-hrs { font-weight: 700 !important; }

/* Open state — green */
.gbp-popup .gbp-hours-table tr.gbp-today.gbp-today-open .gbp-day { color: #27ae60 !important; }
.gbp-popup .gbp-hours-table tr.gbp-today.gbp-today-open .gbp-hrs { color: #27ae60 !important; }

/* Closed/closing-soon state — red */
.gbp-popup .gbp-hours-table tr.gbp-today.gbp-today-closed .gbp-day { color: #c0392b !important; }
.gbp-popup .gbp-hours-table tr.gbp-today.gbp-today-closed .gbp-hrs { color: #c0392b !important; }

/* ── Hours List Widget ───────────────────────────────────────────────────────── */

.gbp-hours-list-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gbp-list-heading { margin: 0 0 12px; }

.gbp-list-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    font-size: 14px;
}
.gbp-list-status-text.gbp-open-text   { color: #27ae60 !important; font-weight: 600; }
.gbp-list-status-text.gbp-closed-text { color: #c0392b !important; font-weight: 600; }
.gbp-list-next { color: #888; }

.gbp-list-table,
.gbp-list-table tbody,
.gbp-list-table tr,
.gbp-list-table td {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.gbp-list-table {
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.gbp-list-table td {
    padding: 7px 0 !important;
    vertical-align: middle;
    font-size: 15px;
    line-height: 1.4 !important;
}

.gbp-list-table .gbp-day   { padding-right: 32px !important; white-space: nowrap; text-align: left !important; width: 50%; }
.gbp-list-table .gbp-hours { text-align: right !important; width: 50%; }

.gbp-list-table tr.gbp-today,
.gbp-list-table tr.gbp-today td {
    background: transparent !important;
    background-color: transparent !important;
}
.gbp-list-table tr.gbp-today .gbp-day   { font-weight: 700 !important; }
.gbp-list-table tr.gbp-today .gbp-hours { font-weight: 700 !important; }

/* Open — green */
.gbp-list-table tr.gbp-today.gbp-today-open .gbp-day   { color: #27ae60 !important; }
.gbp-list-table tr.gbp-today.gbp-today-open .gbp-hours { color: #27ae60 !important; }

/* Closed — red */
.gbp-list-table tr.gbp-today.gbp-today-closed .gbp-day   { color: #c0392b !important; }
.gbp-list-table tr.gbp-today.gbp-today-closed .gbp-hours { color: #c0392b !important; }

.gbp-list-table .gbp-closed-day { color: #aaa !important; }

.gbp-list-directions { align-self: flex-start; }

/* ── After-hours block (below badge, closed state only) ──────────────────────── */
.gbp-after-hours {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid #e0e0e0;
    width: fit-content;
}
.gbp-after-hours-label {
    color: #888888;
    white-space: nowrap;
    flex-shrink: 0;
}
.gbp-after-hours-number {
    color: #222222 !important;
    text-decoration: none !important;
    font-weight: 500;
}
.gbp-after-hours-number:hover {
    text-decoration: underline !important;
}

/* ── Popup above badge ───────────────────────────────────────────────────────── */
.gbp-popup.gbp-popup-above {
    top: auto;
    bottom: calc(100% + 10px);
}

/* ── Closing soon status ─────────────────────────────────────────────────────── */
.gbp-status-text.gbp-closing-soon-text   { color: #d68910 !important; }
.gbp-list-status-text.gbp-closing-soon-text { color: #d68910 !important; font-weight: 600; }
.gbp-dot.gbp-closing-soon { background-color: #d68910; }

/* ── After-hours in hours list widget ───────────────────────────────────────── */
.gbp-list-after-hours {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
    width: 100%;
}

/* ── Two-column popup layout ─────────────────────────────────────────────────── */
.gbp-popup-two-col {
    display: flex !important;
    gap: 20px;
    align-items: flex-start;
    min-width: 420px;
}

.gbp-popup-hours-col {
    flex: 0 0 auto;
    border-right: 1px solid #efefef;
    padding-right: 20px;
}

.gbp-popup-contact-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 140px;
}

.gbp-popup-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}

.gbp-contact-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gbp-contact-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #888888 !important;
}

.gbp-contact-value {
    font-size: 13px !important;
    color: #222222 !important;
    line-height: 1.4 !important;
}

.gbp-contact-phone {
    text-decoration: none !important;
    font-weight: 500 !important;
}
.gbp-contact-phone:hover { text-decoration: underline !important; }

.gbp-contact-address {
    font-style: normal !important;
}

/* Directions button flush in right col */
.gbp-popup-contact-col .gbp-directions {
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* ── Stacked badge layout ─────────────────────────────────────────────────────── */

/* Each row inside the stacked badge */
.gbp-badge-stacked .gbp-badge-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Row 1: icon + status — slightly larger/bolder */
.gbp-badge-stacked .gbp-badge-row-1 {
    font-weight: 600;
}

/* Row 2: next label + chevron — smaller/muted */
.gbp-badge-stacked .gbp-badge-row-2 {
    font-size: 0.82em;
    opacity: 0.75;
    gap: 4px;
}

/* When there's no next label, just show the chevron on row 2 */
.gbp-badge-stacked .gbp-chevron-alone {
    opacity: 0.4;
    margin-top: 1px;
}

/* Chevron rotation works in both layouts */
.gbp-badge[aria-expanded="true"] .gbp-chevron {
    transform: rotate(180deg);
}

/* ── Holiday / special hours label ───────────────────────────────────────────── */
.gbp-holiday-label {
    display: block;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #d68910 !important;
    margin-top: 1px;
    line-height: 1.4;
}

/* Keep today row colour intact on holiday rows */
.gbp-today-open  .gbp-holiday-label { color: #d68910 !important; }
.gbp-today-closed .gbp-holiday-label { color: #d68910 !important; }
