/**
 * WP Opening Hours Pro - Frontend Styles
 *
 * Minimal, prefixed CSS that won't conflict with themes.
 * Colors are injected via CSS custom properties from plugin settings.
 *
 * @package WP_Opening_Hours_Pro
 */

/* ============================================
   Status Display [opening_hours]
   ============================================ */
.wpohr-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.wpohr-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

.wpohr-status.wpohr-open {
    color: var(--wpohr-color-open, #16a34a);
}

.wpohr-status.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
}

.wpohr-no-hours {
    color: #6b7280;
    font-style: italic;
}

/* ============================================
   Table Display [opening_hours type="table"]
   ============================================ */
.wpohr-table {
    font-size: 14px;
    line-height: 1.5;
    max-width: 450px;
}

.wpohr-table .wpohr-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 8px;
    border-bottom: 1px solid #f0f0f1;
}

.wpohr-table .wpohr-row:last-child {
    border-bottom: none;
}

.wpohr-table .wpohr-row--active {
    border-radius: 4px;
    border-bottom-color: transparent;
    color: #2271b1;
}

.wpohr-table .wpohr-day {
    font-weight: 400;
}

.wpohr-table .wpohr-time {
    color: #64748b;
}

.wpohr-table .wpohr-time.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
}

.wpohr-table .wpohr-day.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
}

.wpohr-table--no-border .wpohr-row {
    border-bottom: none;
}

/* ============================================
   Page Display [opening_hours type="page"]
   ============================================ */
.wpohr-page {
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
}

/* Page Header */
.wpohr-page-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 20px;
}

.wpohr-page-title {
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 5px;
    color: #1d2327;
}

.wpohr-page-address {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 15px;
}

.wpohr-status-hero {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpohr-status-hero.wpohr-open {
    color: var(--wpohr-color-open, #16a34a);
}

.wpohr-status-hero.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
}

.wpohr-status-hero .wpohr-dot {
    width: 12px;
    height: 12px;
}

/* Page Grid */
.wpohr-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* Section Titles */
.wpohr-section-title {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 5px;
    font-weight: 400;
}

/* Rows in page view */
.wpohr-page .wpohr-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.wpohr-page .wpohr-row:last-child {
    border-bottom: none;
}

.wpohr-page .wpohr-row--active {
    background: #f0f7ff;
    border-radius: 4px;
    border-bottom-color: transparent;
}

.wpohr-page .wpohr-row--closed {
    color: inherit;
}

.wpohr-page .wpohr-time {
    color: #64748b;
}

.wpohr-page .wpohr-time.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
    font-weight: 400;
}

.wpohr-page .wpohr-day.wpohr-closed {
    color: var(--wpohr-color-closed, #d63638);
}

/* Interval rows — no visual styling, class kept as JS/CSS hook */

/* Season rows — subtle left border indicates season override */
.wpohr-table .wpohr-row--season,
.wpohr-page .wpohr-row--season {
    border-left: 3px solid var(--wpohr-color-season, #94a3b8);
    padding-left: 5px;
}

/* Tag Groups */
.wpohr-tag-group {
    margin-bottom: 25px;
}

.wpohr-tag-header {
    font-size: 15px;
    color: #1d2327;
    margin: 0 0 10px;
    padding-left: 8px;
    font-weight: 400;
}

/* Extended Info */
.wpohr-extended-info {
    margin-top: 40px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

.wpohr-extended-info p {
    margin: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media screen and (max-width: 768px) {
    .wpohr-page-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .wpohr-page {
        /* No wrapper padding — theme controls spacing. */
    }

    .wpohr-page-title {
        font-size: 22px;
    }
}
