/**
 * WaitN Design System - Compound Components
 * Complex UI patterns composed of multiple atomic components
 * These provide ready-to-use assemblies for common app screens
 */

/* ========================================
   APP HEADER COMPOUND COMPONENT
   Composed of: Status Bar + App Bar + Hero Content
   ======================================== */

/* Base App Header Container */
.wn-app-header {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
}

/* Minimal Header - Just status + app bar */
.wn-app-header-minimal {
    background: var(--wn-bg-card);
}

/* Solid Header - Colored background without gradient */
.wn-app-header-solid {
    background: var(--wn-bg-elevated);
}

/* Hero Header - Extended with hero content area */
.wn-app-header-hero {
    padding-bottom: 20px;
}

/* ========================================
   COMPACT DATA HEADER
   The vital info IS the header - no wasted space
   ======================================== */

.wn-app-header-data {
    padding-bottom: 0;
}

/* Data Header: Combines nav + info in one dense row */
.wn-data-bar {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 12px;
    padding-top: calc(44px + 8px); /* Safe zone */
}

.wn-data-bar-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* The main data display - ticket/queue info */
.wn-data-bar-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wn-data-bar-ticket {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 10px;
}

.wn-data-bar-ticket-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.wn-data-bar-ticket-num {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.wn-data-bar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
}

.wn-data-bar-stat {
    text-align: center;
    padding: 0 8px;
}

.wn-data-bar-stat-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.wn-data-bar-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.8;
    white-space: nowrap;
}

/* Actions on the right */
.wn-data-bar-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   WIDGET INFO BADGE
   Standardized header widget info display
   Minimum: Icon + Primary Value
   Extended: + Secondary info/stats
   ======================================== */

.wn-widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px 4px 4px;
    border-radius: 8px;
    white-space: nowrap;
}

.wn-widget-badge-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--wn-indigo);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.wn-widget-badge-value {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Extended badge with additional info */
.wn-widget-badge-extended {
    gap: 8px;
    padding: 5px 12px 5px 5px;
}

.wn-widget-badge-extended .wn-widget-badge-icon {
    width: 30px;
    height: 30px;
}

.wn-widget-badge-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wn-widget-badge-info .wn-widget-badge-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.75;
}

.wn-widget-badge-info .wn-widget-badge-value {
    font-size: 14px;
}

/* Widget badge with extra stats inline */
.wn-widget-badge-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.wn-widget-badge-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
}

.wn-widget-badge-stat-value {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 2px;
}

.wn-widget-badge-stat-label {
    font-size: 8px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ========================================
   INLINE DATA HEADER
   Even more compact - everything on one line
   ======================================== */

.wn-app-header-inline {
    padding-bottom: 0;
}

.wn-inline-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    padding-top: calc(44px + 10px);
    gap: 8px;
}

.wn-inline-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wn-inline-bar-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Prominent ticket badge */
.wn-inline-ticket {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px 4px 6px;
    border-radius: 8px;
    font-weight: 700;
}

.wn-inline-ticket-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--wn-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.wn-inline-ticket-num {
    font-size: 15px;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* Inline stats */
.wn-inline-bar-stats {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wn-inline-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.wn-inline-stat-value {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
}

.wn-inline-stat-label {
    font-size: 8px;
    text-transform: uppercase;
    opacity: 0.7;
}

.wn-inline-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   SLOT HEADER
   App bar with a customizable slot below
   Single versatile pattern for any hero content
   ======================================== */

.wn-app-header-slot {
    padding-bottom: 12px;
}

/* Standard app bar - just nav */
.wn-slot-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    padding-top: calc(44px + 6px);
}

.wn-slot-bar-action {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.wn-slot-bar-title {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

/* The slot - accepts any content */
.wn-slot-content {
    padding: 0 12px;
}

/* Pre-made slot content: Ticket Card - Modular Left/Right Layout */
.wn-slot-ticket-card {
    display: flex;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* LEFT PANEL - Always shows primary widget info (ticket, order, etc) */
.wn-slot-ticket-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    min-width: 0;
}

.wn-slot-ticket-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--wn-primary) 0%, var(--wn-primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--wn-white);
    box-shadow: 0 2px 6px var(--wn-primary-light);
    flex-shrink: 0;
}

.wn-slot-ticket-info {
    flex: 1;
    min-width: 0;
}

.wn-slot-ticket-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wn-text-secondary, #64748b);
    font-weight: 600;
    display: block;
    margin-bottom: 1px;
}

.wn-slot-ticket-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--wn-primary, #3b82f6);
    letter-spacing: -0.3px;
}

.wn-slot-ticket-value {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--wn-slate-900);
}

/* RIGHT PANEL - Swappable content area */
.wn-slot-ticket-right {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, var(--wn-slate-100) 0%, var(--wn-slate-200) 100%);
    border-left: 1px solid var(--wn-slate-200);
    flex-shrink: 0;
}

/* Right panel variant: Stats - horizontal compact layout */
.wn-slot-ticket-right-stats {
    flex-direction: row;
    gap: 0;
}

.wn-slot-ticket-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 12px;
}

.wn-slot-ticket-stat:not(:last-child) {
    border-right: 1px solid var(--wn-slate-300);
}

.wn-slot-ticket-stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.wn-slot-ticket-stat:nth-child(1) .wn-slot-ticket-stat-icon {
    background: var(--wn-primary-light);
    color: var(--wn-primary);
}

.wn-slot-ticket-stat:nth-child(2) .wn-slot-ticket-stat-icon {
    background: var(--wn-warning-light);
    color: var(--wn-warning);
}

.wn-slot-ticket-stat-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wn-slot-ticket-stat-value {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--wn-slate-900);
}

.wn-slot-ticket-stat-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--wn-slate-500);
}

/* Right panel variant: Progress - Semicircle Gauge */
.wn-slot-ticket-right-progress {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 14px;
    min-width: 80px;
}

.wn-slot-ticket-gauge {
    position: relative;
    width: 56px;
    height: 28px;
    overflow: hidden;
}

.wn-slot-ticket-gauge-bg {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 6px solid var(--wn-slate-300);
    border-bottom-color: transparent;
    border-left-color: transparent;
    transform: rotate(-45deg);
    box-sizing: border-box;
}

.wn-slot-ticket-gauge-fill {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: var(--wn-success);
    border-right-color: var(--wn-success);
    transform: rotate(-45deg);
    box-sizing: border-box;
    animation: gaugeAnimate 1s ease-out forwards;
    --gauge-percent: 0deg;
}

@keyframes gaugeAnimate {
    from { transform: rotate(-45deg); }
    to { transform: rotate(calc(-45deg + var(--gauge-percent))); }
}

.wn-slot-ticket-gauge-value {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--wn-success);
}

/* Right panel variant: QR Code */
.wn-slot-ticket-right-qr {
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.wn-slot-ticket-qr {
    width: 56px;
    height: 56px;
    background: var(--wn-white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--wn-slate-800);
}

/* Right panel variant: Action Buttons - Multiple options */
.wn-slot-ticket-right-action {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    gap: 4px;
}

/* Single large action */
.wn-slot-ticket-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--wn-primary) 0%, var(--wn-primary-dark) 100%);
    border: none;
    border-radius: 8px;
    color: var(--wn-white);
    cursor: pointer;
}

.wn-slot-ticket-action-btn i {
    font-size: 14px;
}

.wn-slot-ticket-action-btn span {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Action button row - multiple small actions */
.wn-slot-ticket-actions-row {
    display: flex;
    gap: 6px;
}

.wn-slot-ticket-action-mini {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.wn-slot-ticket-action-mini.primary {
    background: linear-gradient(135deg, var(--wn-primary) 0%, var(--wn-primary-dark) 100%);
    color: var(--wn-white);
}

.wn-slot-ticket-action-mini.secondary {
    background: var(--wn-white);
    color: var(--wn-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Circular status indicator */
.wn-slot-ticket-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wn-slot-ticket-status-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--wn-slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: pulse 2s ease-in-out infinite;
}

.wn-slot-ticket-status-ring.waiting {
    border-color: var(--wn-primary);
    color: var(--wn-primary);
}

.wn-slot-ticket-status-ring.ready {
    border-color: var(--wn-success);
    color: var(--wn-success);
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.wn-slot-ticket-status-text {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--wn-text-secondary);
}

/* Pre-made slot content: Search bar - with input methods and filters */
.wn-slot-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Input method buttons (camera, voice) - left side */
.wn-slot-search-inputs {
    display: flex;
    gap: 4px;
}

.wn-slot-search-input-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.wn-slot-search-input-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wn-slot-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--wn-slate-700);
}

.wn-slot-search i {
    color: var(--wn-slate-400);
    font-size: 14px;
}

.wn-slot-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--wn-slate-700);
    outline: none;
    min-width: 0;
}

/* Filter buttons - right side */
.wn-slot-search-filters {
    display: flex;
    gap: 4px;
}

.wn-slot-search-filter {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
}

.wn-slot-search-filter.active {
    background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   MINI STAT HEADER SLOT
   Responsive stats that auto-fit based on container width
   Uses container queries for smart sizing
   ======================================== */

.wn-slot-stats {
    container-type: inline-size;
    container-name: stats-container;
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    overflow: hidden; /* Hide stats that don't fit */
}

.wn-slot-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    min-width: 48px;
    flex: 1 1 48px; /* Grow and shrink, base 48px */
    max-width: 72px; /* Don't get too wide */
}

/* Hide stats beyond what fits - use nth-child for progressive hiding */
/* On very small containers, show fewer stats */
@container stats-container (max-width: 180px) {
    .wn-slot-stat:nth-child(n+3) { display: none; } /* Show 2 */
}
@container stats-container (min-width: 181px) and (max-width: 240px) {
    .wn-slot-stat:nth-child(n+4) { display: none; } /* Show 3 */
}
@container stats-container (min-width: 241px) and (max-width: 300px) {
    .wn-slot-stat:nth-child(n+5) { display: none; } /* Show 4 */
}
@container stats-container (min-width: 301px) and (max-width: 360px) {
    .wn-slot-stat:nth-child(n+6) { display: none; } /* Show 5 */
}
@container stats-container (min-width: 361px) and (max-width: 420px) {
    .wn-slot-stat:nth-child(n+7) { display: none; } /* Show 6 */
}
@container stats-container (min-width: 421px) and (max-width: 480px) {
    .wn-slot-stat:nth-child(n+8) { display: none; } /* Show 7 */
}
@container stats-container (min-width: 481px) and (max-width: 540px) {
    .wn-slot-stat:nth-child(n+9) { display: none; } /* Show 8 */
}
/* 541px+ shows up to 9+ stats */

/* Fallback for browsers without container query support */
@supports not (container-type: inline-size) {
    .wn-slot-stat:nth-child(n+6) { display: none; } /* Default to 5 */
}

/* Label goes on TOP */
.wn-slot-stat-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.75;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Icon and value side by side */
.wn-slot-stat-content {
    display: flex;
    align-items: center;
    gap: 3px;
}

.wn-slot-stat-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    flex-shrink: 0;
}

.wn-slot-stat-value {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.wn-slot-stat-trend {
    font-size: 7px;
}

.wn-slot-stat-trend.up { color: var(--wn-success-vivid); }
.wn-slot-stat-trend.down { color: var(--wn-error-vivid); }
.wn-slot-stat-trend.neutral { opacity: 0.5; }

/* Compact stat variant - single line */
.wn-slot-stat-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.wn-slot-stat-compact .wn-slot-stat-label {
    font-size: 10px;
    opacity: 0.8;
    text-transform: none;
}

.wn-slot-stat-compact .wn-slot-stat-value {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.75;
}

/* ----------------------------------------
   Gradient Variants
   All use CSS variables for dynamic theming
   ---------------------------------------- */
.wn-app-header-gradient-primary {
    background: linear-gradient(135deg, var(--wn-primary) 0%, var(--wn-primary-dark) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-teal {
    background: linear-gradient(135deg, var(--wn-teal) 0%, var(--wn-teal-vivid) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-purple {
    background: linear-gradient(135deg, var(--wn-purple) 0%, var(--wn-purple-vivid) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-dark {
    background: linear-gradient(135deg, var(--wn-slate-800) 0%, var(--wn-slate-700) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-blue {
    background: linear-gradient(135deg, var(--wn-blue) 0%, var(--wn-cyan) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-amber {
    background: linear-gradient(135deg, var(--wn-amber) 0%, var(--wn-amber-vivid) 100%);
    color: var(--wn-white);
}

.wn-app-header-gradient-indigo {
    background: linear-gradient(135deg, var(--wn-indigo) 0%, var(--wn-indigo-vivid) 100%);
    color: var(--wn-white);
}

/* ----------------------------------------
   APP BAR - Navigation Row
   Back | Title | Actions
   ---------------------------------------- */
.wn-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    min-height: 48px;
    /* Safe zone padding for notch/Dynamic Island */
    padding-top: calc(44px + 8px);
}

.wn-app-bar-transparent {
    background: transparent;
}

.wn-app-bar-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.wn-app-bar-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wn-app-bar-action:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wn-app-bar-action-badge {
    position: relative;
}

.wn-app-bar-action-badge .wn-badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--wn-error);
    border-radius: 50%;
    border: 2px solid currentColor;
}

/* App Bar Stats Row */
.wn-app-bar-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.05);
    margin: 0 -16px;
}

.wn-app-bar-stat {
    text-align: center;
}

.wn-app-bar-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--wn-text-primary);
}

.wn-app-bar-stat-label {
    display: block;
    font-size: 10px;
    color: var(--wn-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ----------------------------------------
   HERO CONTENT - Contextual Content Area
   ---------------------------------------- */
.wn-hero-content {
    padding: 0 16px 16px;
}

.wn-hero-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero Greeting */
.wn-hero-greeting {
    margin-bottom: 16px;
}

.wn-hero-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.wn-hero-name {
    display: block;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Hero Avatar */
.wn-hero-avatar {
    position: relative;
    margin-bottom: 12px;
}

.wn-hero-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wn-primary), var(--wn-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--wn-white);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.wn-hero-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--wn-success);
    color: var(--wn-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid var(--wn-white);
}

/* Hero Card - Featured Content */
.wn-hero-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wn-hero-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wn-hero-card-main {
    flex: 1;
}

.wn-hero-card-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.wn-hero-card-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.wn-hero-card-side {
    text-align: right;
}

.wn-hero-card-metric {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

/* Hero Stats Row */
.wn-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
}

.wn-hero-stat {
    flex: 1;
    text-align: center;
}

.wn-hero-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.wn-hero-stat-label {
    display: block;
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wn-hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}

/* Hero Search */
.wn-hero-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--wn-slate-700);
}

.wn-hero-search i {
    color: var(--wn-slate-400);
}

.wn-hero-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--wn-slate-700);
    outline: none;
}

.wn-hero-search input::placeholder {
    color: var(--wn-slate-400);
}

/* ========================================
   SCREEN-LEVEL PATTERNS
   ======================================== */

/* Screen Filters Row */
.wn-screen-filters {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wn-screen-filters::-webkit-scrollbar {
    display: none;
}

/* Screen List Container */
.wn-screen-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Screen FAB Container */
.wn-screen-fab {
    position: absolute;
    bottom: 80px;
    right: 16px;
}

/* ----------------------------------------
   LIST ITEMS - For Queue/List Screens
   ---------------------------------------- */
.wn-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wn-bg-card);
    border-radius: 12px;
    padding: 12px;
}

.wn-list-item-serving {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(20, 184, 166, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.wn-list-item-badge {
    min-width: 56px;
    height: 36px;
    background: var(--wn-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.wn-list-item-content {
    flex: 1;
    min-width: 0;
}

.wn-list-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wn-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wn-list-item-subtitle {
    font-size: 12px;
    color: var(--wn-text-secondary);
}

.wn-list-item-action {
    display: flex;
    align-items: center;
}

/* Status Dot */
.wn-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wn-slate-400);
}

.wn-status-dot-success {
    background: var(--wn-success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.wn-status-dot-warning {
    background: var(--wn-warning);
}

.wn-status-dot-error {
    background: var(--wn-error);
}

/* Small Icon Button */
.wn-btn-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--wn-primary);
    color: var(--wn-white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* ----------------------------------------
   CHIP FILTERS
   ---------------------------------------- */
.wn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--wn-bg-card);
    border: 1px solid var(--wn-border-light);
    color: var(--wn-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wn-chip:hover {
    background: var(--wn-bg-elevated);
}

.wn-chip-active,
.wn-chip.active {
    background: var(--wn-primary);
    border-color: var(--wn-primary);
    color: white;
}

/* ----------------------------------------
   FAB BUTTON
   ---------------------------------------- */
.wn-fab {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.wn-fab-primary {
    background: var(--wn-primary);
    color: white;
}

.wn-fab-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* ----------------------------------------
   DASHBOARD COMPONENTS
   ---------------------------------------- */

/* Dashboard Stat Card */
.wn-dashboard-stat-card {
    background: var(--wn-bg-card);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.wn-dashboard-stat-card i {
    font-size: 16px;
    margin-bottom: 8px;
}

.wn-dashboard-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--wn-text-primary);
}

.wn-dashboard-stat-label {
    display: block;
    font-size: 11px;
    color: var(--wn-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions Grid */
.wn-dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: var(--wn-bg-card);
    border-radius: 16px;
    padding: 16px;
}

.wn-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wn-text-primary);
    font-size: 11px;
}

.wn-quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--wn-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--wn-primary);
    transition: all 0.2s ease;
}

.wn-quick-action:hover .wn-quick-action-icon {
    background: var(--wn-primary);
    color: white;
}

/* ----------------------------------------
   COMPOUND STAT COMPONENTS
   Used within compound screen patterns
   ---------------------------------------- */

/* Progress Card */
.wn-compound-progress-card {
    background: var(--wn-bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Stats Row */
.wn-compound-stats-row {
    display: flex;
    gap: 8px;
}

.wn-compound-stat-item {
    flex: 1;
    background: var(--wn-bg-card);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.wn-compound-stat-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.wn-compound-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--wn-text-primary);
}

.wn-compound-stat-label {
    display: block;
    font-size: 10px;
    color: var(--wn-text-secondary);
}

/* ========================================
   MOCKUP SLIDER
   Side-by-side Customer/Admin phone mockups
   ======================================== */

.wn-mockup-slider {
    margin-top: 16px;
}

/* Slider Navigation Tabs */
.wn-mockup-slider-nav {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--wn-slate-100);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wn-mockup-slider-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wn-slate-500);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wn-mockup-slider-btn:hover {
    color: var(--wn-slate-700);
    background: rgba(255, 255, 255, 0.5);
}

.wn-mockup-slider-btn.active {
    background: var(--wn-white);
    color: var(--wn-slate-800);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wn-mockup-slider-btn i {
    font-size: 12px;
}

/* Slides Container */
.wn-mockup-slides {
    position: relative;
}

.wn-mockup-slide {
    display: none;
    animation: slideIn 0.3s ease;
}

.wn-mockup-slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Header */
.wn-mockup-slide-header {
    text-align: center;
    margin-bottom: 20px;
}

.wn-mockup-slide-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wn-slate-800);
    margin-bottom: 4px;
}

.wn-mockup-slide-desc {
    font-size: 13px;
    color: var(--wn-slate-500);
}

/* Phone Pair Container */
.wn-mockup-pair {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wn-mockup-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wn-mockup-phone-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--wn-slate-100);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--wn-slate-500);
    margin-bottom: 12px;
}

.wn-mockup-phone-label i {
    font-size: 10px;
}

/* Slider Dots */
.wn-mockup-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.wn-mockup-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--wn-slate-300);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.wn-mockup-slider-dot:hover {
    background: var(--wn-slate-400);
}

.wn-mockup-slider-dot.active {
    background: var(--wn-primary);
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 640px) {
    .wn-mockup-pair {
        flex-direction: column;
        align-items: center;
    }
    
    .wn-mockup-slider-nav {
        justify-content: flex-start;
    }
    
    .wn-mockup-slider-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
