/* Restaurant Hours Manager - Frontend Styles */

/* Store status message - Sticky at top */
#rhm-store-status {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    margin: 0;
    padding: 15px;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rhm-slide-down 0.3s ease-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Add padding to body when notification is visible */
body.rhm-notification-active {
        
    }

/* Admin bar adjustment */
body.admin-bar #rhm-store-status {
    top: 32px;
}

body.admin-bar.rhm-notification-active {
    padding-top: 0px !important;
    }

/* Mobile admin bar */
@media screen and (max-width: 782px) {
    body.admin-bar #rhm-store-status {
        top: 46px;
    }
    
    body.admin-bar.rhm-notification-active {
    }
}

#rhm-store-status.rhm-error {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 2px solid #f5c6cb;
}

#rhm-store-status.rhm-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-bottom: 2px solid #bee5eb;
}

@keyframes rhm-slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Disabled buttons */
.rhm-disabled,
.single_add_to_cart_button:disabled,
.add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #ccc !important;
    color: #666 !important;
    border-color: #ccc !important;
}

.rhm-disabled:hover {
    background-color: #ccc !important;
    color: #666 !important;
}

/* Ensure product containers are relative */
.products .product {
    position: relative;
}

/* Notification styles - Sticky and centered */
.rhm-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 500px;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rhm-notification-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rhm-notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Schedule display shortcode */
.rhm-schedule-display {
    box-sizing: border-box;
}

.rhm-schedule-display h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}


/* Schedule list styles */
.rhm-schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rhm-schedule-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.rhm-schedule-list li:last-child {
    border-bottom: none;
}

.rhm-day-name {
    font-weight: 600;
    width: 40%;
}

.rhm-today {
    font-size: 0.9em;
    font-weight: normal;
}


.rhm-closed {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Cart and checkout page adjustments */
.woocommerce-checkout #rhm-store-status,
.woocommerce-cart #rhm-store-status {
    margin-bottom: 30px;
}


/* Countdown styling */
.rhm-countdown {
    font-weight: bold;
    color: #dc3232;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    #rhm-store-status {
        font-size: 14px;
        padding: 12px;
    }
    
    .rhm-notification {
        min-width: 90%;
        max-width: 90%;
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .rhm-schedule-display {
        padding: 15px;
    }
    
    .rhm-schedule-list li {
        font-size: 14px;
        padding: 10px 0;
    }
    
}
