/**
 * Location Hours Widget Styles
 * Loaded only on pages where the Location Hours widget is rendered.
 */

/* -------------------------------------------------------------------------
   Container
   ------------------------------------------------------------------------- */

.pcc-location-hours {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    max-width: 480px;
    min-height: 2.5rem; /* prevents layout shift while loading */
}

/* -------------------------------------------------------------------------
   Skeleton loader
   ------------------------------------------------------------------------- */

.pcc-hours-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pcc-hours-sk-badge,
.pcc-hours-sk-cell {
    background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: pcc-shimmer 1.4s ease-in-out infinite;
}

.pcc-hours-sk-badge {
    height: 1.375rem;
    width: 7rem;
    border-radius: 999px;
    margin-bottom: 0.125rem;
}

.pcc-hours-sk-table {
    display: flex;
    flex-direction: column;
}

.pcc-hours-sk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3125rem 0;
}

.pcc-hours-sk-cell {
    height: 0.8125rem;
    border-radius: 4px;
}

.pcc-hours-sk-cell--day {
    width: 5rem;
}

.pcc-hours-sk-cell--time {
    width: 3.75rem;
}

@keyframes pcc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.pcc-hours-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* -------------------------------------------------------------------------
   Tabs
   ------------------------------------------------------------------------- */

.pcc-hours-tabs {
    display: flex;
    gap: 10px!important;
}

.pcc-hours-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.5rem 1.125rem!important;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280!important;
    border-radius: 20px!important;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.pcc-hours-tab:hover {
    color: #ffffff!important;
    background-color: #e21b42!important;
}

.pcc-hours-tab:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

.pcc-hours-tab--active {
    color: #ffffff!important;
    background-color: #e21b42!important;
    border-bottom-color: #111;
}

/* -------------------------------------------------------------------------
   Panels
   ------------------------------------------------------------------------- */

.pcc-hours-panel {
    display: none;
}

.pcc-hours-panel--active {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* -------------------------------------------------------------------------
   Open / Closed status indicator
   ------------------------------------------------------------------------- */

.pcc-hours-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.1875rem 0.625rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
    width: fit-content;
}

/* Dot indicator */
.pcc-hours-status::before {
    content: '';
    flex-shrink: 0;
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.pcc-hours-status--open {
    color: #15803d;
    background-color: #dcfce7;
}

/* Opens today / tomorrow / on [day] */
.pcc-hours-status--soon {
    color: #92400e;
    background-color: #fef3c7;
}

.pcc-hours-status--closed {
    color: #b91c1c;
    background-color: #fee2e2;
}

/* -------------------------------------------------------------------------
   Hours table
   ------------------------------------------------------------------------- */

.pcc-hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-weight: 500;
}

.pcc-hours-table th,
.pcc-hours-table td {
    padding: 0.3125rem 0;
    text-align: left;
    /* border-bottom: 1px solid #f3f4f6; */
    vertical-align: middle;
}

.pcc-hours-table tr:last-child th,
.pcc-hours-table tr:last-child td {
    border-bottom: none;
}

.pcc-hours-table th {
    font-weight: 600;
    width: 42%;
    padding-right: 0.75rem;
    background-color: unset!important;
    border: none;
}

.pcc-hours-table td {
    color: #4b5563;
    text-align: right;
    background-color: unset!important;
    border: none;
}
.pcc-hours-table .current td, .pcc-hours-table .current th{
    color: #000000!important;
}

/* -------------------------------------------------------------------------
   Error state
   ------------------------------------------------------------------------- */

.pcc-hours-error {
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
}
