/* ------------------------------------------------------------------
   GLOBAL VARIABLES & DEFAULTS
   ------------------------------------------------------------------ */
:root {
    /* Static Defaults (Standard Colors) */
    --ns-primary: #007AFF;
    --ns-success: #34C759;
    --ns-warning: #FF9500;
    --ns-danger: #FF3B30;
    
    /* Dynamic Defaults (These are overridden by wp_add_inline_style from PHP) */
    --ns-dyn-bg: #121212;
    --ns-dyn-title: #ffffff;
    --ns-dyn-text: #ffffff;

    /* Typography */
    --ns-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------------
   1. CLIENT VIEW STYLES (Menu)
   ------------------------------------------------------------------ */

.ns-app-wrapper {
    background-color: var(--ns-dyn-bg); /* Dynamic Background */
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
    font-family: var(--ns-font);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
.ns-app-header { 
    text-align: center; 
    margin-bottom: 40px; 
    width: 100%; 
    max-width: 420px; 
}

.ns-app-logo { 
    width: 90px; 
    height: 90px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    border: 3px solid rgba(255,255,255,0.1); 
}

.ns-app-title { 
    font-size: 26px; 
    font-weight: 700; 
    margin: 0 0 8px; 
    color: var(--ns-dyn-title) !important; /* Dynamic Title Color */
}

.ns-app-location { 
    font-size: 13px; 
    color: var(--ns-dyn-title); /* Dynamic Title Color */
    opacity: 0.7; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-weight: 600; 
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 6px 16px; 
    border-radius: 50px; 
    display: inline-block; 
}

/* Grid Layout */
.ns-app-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    width: 100%; 
    max-width: 420px; 
}

/* Glassmorphism Cards/Buttons */
.ns-card-btn { 
    background: rgba(255, 255, 255, 0.08); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 20px; 
    padding: 25px 15px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
    transition: transform 0.2s, background 0.2s; 
    cursor: pointer; 
    height: 130px; 
    text-decoration: none; 
    color: var(--ns-dyn-text) !important; /* Dynamic Text Color */
    backdrop-filter: blur(10px);
}

.ns-card-btn:active { 
    transform: scale(0.95); 
    background: rgba(255, 255, 255, 0.15); 
}

.ns-icon { 
    font-size: 36px; 
    margin-bottom: 12px; 
    display: block; 
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); 
}

.ns-label { 
    font-size: 15px; 
    font-weight: 600; 
    line-height: 1.3; 
    letter-spacing: 0.5px; 
}

/* Full Width Button Modifier */
.ns-full-width { 
    grid-column: span 2; 
    height: auto; 
    flex-direction: row; 
    gap: 15px; 
    padding: 20px 25px; 
    justify-content: center; 
}

.ns-full-width .ns-icon { 
    margin-bottom: 0; 
    font-size: 24px; 
}

/* Specific Button Styles */
.ns-btn-menu { 
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.2), rgba(41, 151, 255, 0.1)); 
    border-color: rgba(41, 151, 255, 0.4); 
}

/* Review Card */
.ns-review-card { 
    grid-column: span 2; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 20px; 
    padding: 18px 25px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    text-decoration: none; 
    margin-top: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

.ns-review-left { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.ns-review-star { 
    font-size: 20px; 
    color: #FFD700; 
}

.ns-review-text { 
    font-weight: 600; 
    font-size: 15px;
    color: var(--ns-dyn-text); /* Dynamic Text Color */
}

.ns-review-arrow { 
    color: rgba(255,255,255,0.5); 
    font-weight: bold; 
}

/* Toast Notification */
#ns-toast { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: rgba(0,0,0,0.85); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 30px; 
    font-size: 14px; 
    font-weight: 600; 
    opacity: 0; 
    transition: opacity 0.3s; 
    pointer-events: none; 
    z-index: 9999; 
}

#ns-toast.show { 
    opacity: 1; 
    bottom: 40px; 
}


/* ------------------------------------------------------------------
   2. DASHBOARD VIEW STYLES (Waiter)
   ------------------------------------------------------------------ */

.ns-dashboard { 
    background: #f2f2f7; /* Default Light BG for Dashboard */
    min-height: 100vh; 
    padding: 20px; 
    font-family: var(--ns-font); 
    box-sizing: border-box;
}

.ns-dash-head { 
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap; 
    gap: 15px;
}

.ns-brand h1 { 
    margin: 0; 
    color: #000000 !important; /* Force Black */
    font-size: 24px; 
    font-weight: 800; 
    letter-spacing: -0.5px; 
}

.ns-brand p { 
    margin: 0; 
    color: #8e8e93; 
    font-size: 13px; 
}

/* Status Indicators */
.ns-status { 
    font-size: 13px; 
    font-weight: 600; 
    color: var(--ns-success); 
    background: #fff; 
    padding: 6px 12px; 
    border-radius: 20px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

.ns-dot { 
    width: 8px; 
    height: 8px; 
    background: var(--ns-success); 
    border-radius: 50%; 
    display: inline-block; 
    animation: ns-pulse 2s infinite; 
}

.ns-status-btn { 
    background: #fff3e0; 
    color: #e65100; 
    border: 1px solid #ffe0b2; 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 13px; 
    transition: all 0.2s; 
    min-width: 110px; 
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap; 
    margin-bottom: 0 !important; 
}
.ns-dash-head > div:last-child {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

}

.ns-status-btn.active { 
    background: #e7f7ed; 
    color: #2e7d32; 
    border: 1px solid #c8e6c9; 
}

.ns-status-btn:hover { 
    opacity: 0.8; 
}

/* Grid System */
.ns-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
}

/* Dashboard Cards */
.ns-card { 
    background: #fff !important; 
    border-radius: 16px; 
    padding: 20px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    animation: ns-slideUp 0.3s ease-out; 
    border: 1px solid rgba(0,0,0,0.02); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.ns-card-head { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
    align-items: center; 
}

.ns-card-loc { 
    font-size: 18px; 
    font-weight: 700; 
    color: var(--ns-dark); 
}

.ns-card-time { 
    font-size: 12px; 
    color: #8e8e93; 
    background: #f2f2f7; 
    padding: 3px 8px; 
    border-radius: 6px; 
}

/* Priority Button inside Card */
.ns-card-label { 
    padding: 10px; 
    border-radius: 10px; 
    text-align: center; 
    font-weight: 600; 
    color: #fff; 
    margin-bottom: 15px; 
    font-size: 15px; 
    /* Resets for JS Priority Colors overrides */
    background: transparent; 
    box-shadow: none; 
    border: 1px solid transparent;
}

/* Type Colors */
.ns-type-bill { background: var(--ns-danger); box-shadow: 0 4px 10px rgba(255, 59, 48, 0.2); }
.ns-type-order { background: var(--ns-success); box-shadow: 0 4px 10px rgba(52, 199, 89, 0.2); }
.ns-type-waiter { background: var(--ns-warning); box-shadow: 0 4px 10px rgba(255, 149, 0, 0.2); }
.ns-type-custom { background: var(--ns-primary); box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2); }

/* Complete Button */
.ns-done { 
    background: #1c1c1e !important; /* Force Dark Background */
    color: #ffffff !important;      /* Force White Text */
    border: none; 
    padding: 12px; 
    border-radius: 10px; 
    width: 100%; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.2s; 
    margin-top: 10px; 
}

.ns-done:hover { 
    background: #3a3a3c; 
}

/* States */
.ns-loading-state { 
    grid-column: 1 / -1; 
    text-align: center; 
    color: #8e8e93; 
    margin-top: 50px; 
    font-style: italic; 
}

.ns-dashboard-footer-notice { 
    text-align: center; 
    margin-top: 40px; 
    padding: 15px; 
    background: #eef2ff; 
    color: #4b5563; 
    border-radius: 8px; 
    font-size: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    border: 1px solid #e0e7ff; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto; 
}

.ns-clean-icon { 
    font-size: 16px; 
}

/* Keyframe Animations */
@keyframes ns-pulse { 
    0% { opacity: 0.5; } 
    50% { opacity: 1; } 
    100% { opacity: 0.5; } 
}

@keyframes ns-slideUp { 
    from { transform: translateY(10px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}
/* Dashboard Fixes */
.ns-dash-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ns-d-none {
    display: none;
}
.ns-text-danger {
    color: #ff453a !important;
}