/* ============================================================
   Restaurant Manager — Frontend Styles
   Compatible with WoodMart 8.4.1+ (non-destructive, all scoped)
   ============================================================ */

/* ── Closed popup overlay ─────────────────────────────────── */
.rm-closed-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    direction: rtl;
}
.rm-closed-overlay.rm-visible {
    display: flex;
}
.rm-closed-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: rm-pop-in 0.3s ease;
}
@keyframes rm-pop-in {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.rm-closed-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    display: block;
}
.rm-closed-box h2 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #1a1a1a;
}
.rm-closed-box p {
    color: #555;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.6;
}
.rm-closed-next {
    display: inline-block;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    margin-bottom: 24px;
}
.rm-closed-dismiss {
    display: inline-block;
    padding: 10px 28px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
}
.rm-closed-dismiss:hover { background: #333; }

/* ── Quick View EPO wrapper ───────────────────────────────── */
.woodmart-quick-view-popup .tc-extra-product-options,
.woodmart-quick-view-popup .wc_tm_epo,
.woodmart-quick-view-popup .tm-extra-product-options {
    display: block !important;
    visibility: visible !important;
}

/* Scrollable summary inside quick view */
.woodmart-quick-view-popup .summary.entry-summary {
    overflow-y: auto;
    max-height: 82vh;
    padding-left: 4px;
    scrollbar-width: thin;
}
.woodmart-quick-view-popup .summary.entry-summary::-webkit-scrollbar {
    width: 4px;
}
.woodmart-quick-view-popup .summary.entry-summary::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Totals box positioning inside popup */
.woodmart-quick-view-popup .tc-extra-product-options-totals,
.woodmart-quick-view-popup .wc_tm_epo_totals {
    position: relative !important;
    float: none !important;
    width: 100% !important;
    margin-top: 12px;
}

/* Z-index fix for EPO dropdowns/date-pickers */
.woodmart-quick-view-popup .tc-extra-product-options .chosen-drop,
.woodmart-quick-view-popup .ui-datepicker,
.woodmart-quick-view-popup .flatpickr-calendar {
    z-index: 1000001 !important;
}

/* ── Schedule field (hidden placeholder) ──────────────────── */
.rm-schedule-wrapper.rm-hidden { display: none; }

/* ── Schedule selector in quick view / product page ──────── */
.rm-schedule-section {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    direction: rtl;
}
.rm-schedule-section h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.rm-delivery-options {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.rm-delivery-option {
    flex: 1;
    min-width: 130px;
}
.rm-delivery-option input[type="radio"] { display: none; }
.rm-delivery-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
}
.rm-delivery-option input:checked + label {
    border-color: var(--woodmart-primary-color, #333);
    background: var(--woodmart-primary-color, #333);
    color: #fff;
}
.rm-time-select-wrapper {
    display: none;
    margin-top: 10px;
}
.rm-time-select-wrapper.rm-visible { display: block; }
.rm-time-select-wrapper select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* ── Admin styles ─────────────────────────────────────────── */
.rm-admin-wrap { direction: rtl; }
.rm-admin-form .rm-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.rm-status-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}
.rm-status-bar.rm-open   { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.rm-status-bar.rm-closed { background: #fee2e2; border: 1px solid #fca5a5; color: #7f1d1d; }
.rm-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: rm-pulse 2s infinite;
}
@keyframes rm-pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.rm-hours-table { margin-top: 10px; }
.rm-hours-table td, .rm-hours-table th { vertical-align: middle !important; }
.rm-save-btn { margin-top: 10px; }
