/**
 * Shop Modes Styles
 *
 * Styles for the 4-mode shop experience:
 * - Mode selection bar
 * - Mode banners
 * - Disabled product states
 * - Modals
 *
 * @package Schilcher_Customer_Catalog
 * @since 1.13.0
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES - Mode Colors
   ========================================================================== */

:root {
    /* Bestellen (Green) */
    --mode-bestellen-primary: #22c55e;
    --mode-bestellen-bg: #f0fdf4;
    --mode-bestellen-border: #86efac;
    --mode-bestellen-text: #166534;

    /* Vorbestellen (Blue) */
    --mode-vorbestellen-primary: #3b82f6;
    --mode-vorbestellen-bg: #eff6ff;
    --mode-vorbestellen-border: #93c5fd;
    --mode-vorbestellen-text: #1e40af;

    /* Erweitern (Orange) */
    --mode-erweitern-primary: #f97316;
    --mode-erweitern-bg: #fff7ed;
    --mode-erweitern-border: #fdba74;
    --mode-erweitern-text: #9a3412;

    /* Ansehen (Yellow) */
    --mode-ansehen-primary: #d97706;
    --mode-ansehen-bg: #fffbeb;
    --mode-ansehen-border: #fcd34d;
    --mode-ansehen-text: #92400e;

    /* Layout */
    --mode-bar-height: 80px;
    --mode-bar-height-mobile: 64px;
    --mode-banner-padding: 20px 24px;
}

/* ==========================================================================
   MODE SELECTION BAR
   ========================================================================== */

.schilcher-mode-bar {
    position: relative;
    z-index: 100;
    background: none;
    border: none;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: var(--mode-bar-height);
    box-shadow: none;
}

.schilcher-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 2px solid var(--schilcher-border, #e5e7eb);
    border-radius: 12px;
    background: var(--schilcher-white, #ffffff);
    color: var(--schilcher-text-secondary, #6b7280);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.schilcher-mode-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.schilcher-mode-btn .mode-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Inactive mode button colors (always tinted) */
.schilcher-mode-btn[data-mode="bestellen"] {
    background: var(--mode-bestellen-bg);
    border-color: var(--mode-bestellen-border);
    color: var(--mode-bestellen-text);
}

.schilcher-mode-btn[data-mode="bestellen"]:hover {
    border-color: var(--mode-bestellen-primary);
}

.schilcher-mode-btn[data-mode="vorbestellen"] {
    background: var(--mode-vorbestellen-bg);
    border-color: var(--mode-vorbestellen-border);
    color: var(--mode-vorbestellen-text);
}

.schilcher-mode-btn[data-mode="vorbestellen"]:hover {
    border-color: var(--mode-vorbestellen-primary);
}

.schilcher-mode-btn[data-mode="erweitern"] {
    background: var(--mode-erweitern-bg);
    border-color: var(--mode-erweitern-border);
    color: var(--mode-erweitern-text);
}

.schilcher-mode-btn[data-mode="erweitern"]:hover {
    border-color: var(--mode-erweitern-primary);
}

.schilcher-mode-btn[data-mode="ansehen"] {
    background: var(--mode-ansehen-bg);
    border-color: var(--mode-ansehen-border);
    color: var(--mode-ansehen-text);
}

.schilcher-mode-btn[data-mode="ansehen"]:hover {
    border-color: var(--mode-ansehen-primary);
}

/* Active mode states */
.schilcher-mode-btn[data-mode="bestellen"].active,
.schilcher-mode-btn[data-mode="bestellen"]:focus {
    background: var(--mode-bestellen-bg);
    border-color: var(--mode-bestellen-primary);
    color: var(--mode-bestellen-text);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    animation: pulseBtnBestellen 2s ease-in-out infinite;
}

.schilcher-mode-btn[data-mode="vorbestellen"].active,
.schilcher-mode-btn[data-mode="vorbestellen"]:focus {
    background: var(--mode-vorbestellen-bg);
    border-color: var(--mode-vorbestellen-primary);
    color: var(--mode-vorbestellen-text);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    animation: pulseBtnVorbestellen 2s ease-in-out infinite;
}

.schilcher-mode-btn[data-mode="erweitern"].active,
.schilcher-mode-btn[data-mode="erweitern"]:focus {
    background: var(--mode-erweitern-bg);
    border-color: var(--mode-erweitern-primary);
    color: var(--mode-erweitern-text);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    animation: pulseBtnErweitern 2s ease-in-out infinite;
}

.schilcher-mode-btn[data-mode="ansehen"].active,
.schilcher-mode-btn[data-mode="ansehen"]:focus {
    background: var(--mode-ansehen-bg);
    border-color: var(--mode-ansehen-primary);
    color: var(--mode-ansehen-text);
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
}

@keyframes pulseBtnBestellen {
    0%, 100% {
        border-color: var(--mode-bestellen-primary);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        border-color: var(--mode-bestellen-primary);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.3), 0 0 12px 4px rgba(34, 197, 94, 0.15);
    }
}

@keyframes pulseBtnVorbestellen {
    0%, 100% {
        border-color: var(--mode-vorbestellen-primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        border-color: var(--mode-vorbestellen-primary);
        box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.3), 0 0 12px 4px rgba(59, 130, 246, 0.15);
    }
}

@keyframes pulseBtnErweitern {
    0%, 100% {
        border-color: var(--mode-erweitern-primary);
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        border-color: var(--mode-erweitern-primary);
        box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.3), 0 0 12px 4px rgba(249, 115, 22, 0.15);
    }
}

/* ==========================================================================
   MODE BANNER
   ========================================================================== */

.schilcher-mode-banner {
    padding: var(--mode-banner-padding);
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Floating top-right widget when scrolled past original position */
.schilcher-mode-banner.stuck {
    position: fixed;
    top: var(--banner-top-offset, 16px);
    right: 16px;
    bottom: auto;
    left: auto;
    width: 280px;
    z-index: 10010;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    gap: 8px;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
    backdrop-filter: blur(8px);
    animation: bannerSlideIn 0.3s ease-out;
    transition: width 0.3s ease, padding 0.3s ease, right 0.3s ease,
                border-radius 0.3s ease, opacity 0.2s ease;
}

.schilcher-mode-banner.stuck:hover {
    opacity: 1;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__content {
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__title {
    font-size: 11px;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__subtitle {
    font-size: 11px;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__date-btn,
.schilcher-mode-banner.stuck .schilcher-mode-banner__end-btn {
    padding: 4px 12px;
    font-size: 11px;
    width: 100%;
    justify-content: center;
}

.schilcher-mode-banner__checkout-btn {
    display: none;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 12px;
    background: var(--schilcher-text-primary, #374151);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__checkout-btn:hover:not(.disabled) {
    background: var(--schilcher-text-secondary, #1f2937);
}

.schilcher-mode-banner__checkout-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Collapse toggle button — only visible in stuck mode */
.schilcher-mode-banner__collapse-btn {
    display: none;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.schilcher-mode-banner.stuck .schilcher-mode-banner__collapse-btn:hover {
    opacity: 1;
}

.schilcher-mode-banner__collapse-btn svg {
    width: 14px;
    height: 14px;
}

/* Collapsed state: slide off-screen, show thin tab handle */
.schilcher-mode-banner.stuck.collapsed {
    width: auto;
    padding: 0;
    right: 0;
    border-radius: 8px 0 0 8px;
    transform: translateX(0);
    overflow: hidden;
    opacity: 0.6;
    animation: none;
    cursor: pointer;
}

.schilcher-mode-banner.stuck.collapsed .schilcher-mode-banner__content,
.schilcher-mode-banner.stuck.collapsed .schilcher-mode-banner__actions {
    display: none;
}

.schilcher-mode-banner.stuck.collapsed .schilcher-mode-banner__collapse-btn {
    position: static;
    width: 28px;
    height: 66px;
    opacity: 0.7;
}

.schilcher-mode-banner.stuck.collapsed .schilcher-mode-banner__collapse-btn svg {
    transform: rotate(180deg);
}

.schilcher-mode-banner.stuck.collapsed:hover {
    opacity: 1;
    padding-left: 6px;
}

@keyframes bannerSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.8;
    }
}

.schilcher-mode-banner__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schilcher-mode-banner__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.schilcher-mode-banner__subtitle {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
}

.schilcher-mode-banner__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Banner button base styles */
.schilcher-mode-banner__date-btn,
.schilcher-mode-banner__end-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Bestellen: Datum ändern button */
.schilcher-mode-banner--bestellen .schilcher-mode-banner__date-btn {
    background: var(--mode-bestellen-primary);
    color: white;
}

.schilcher-mode-banner--bestellen .schilcher-mode-banner__date-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

/* Vorbestellen: Datum ändern button */
.schilcher-mode-banner--vorbestellen .schilcher-mode-banner__date-btn {
    background: var(--mode-vorbestellen-primary);
    color: white;
}

.schilcher-mode-banner--vorbestellen .schilcher-mode-banner__date-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Erweitern: Beenden button */
.schilcher-mode-banner--erweitern .schilcher-mode-banner__end-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--mode-erweitern-text);
    border: 2px solid var(--mode-erweitern-border);
}

.schilcher-mode-banner--erweitern .schilcher-mode-banner__end-btn:hover {
    background: white;
    border-color: var(--mode-erweitern-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.2);
}

/* Banner color variants */
.schilcher-mode-banner--bestellen {
    background: var(--mode-bestellen-bg);
    border: 2px solid var(--mode-bestellen-border);
    color: var(--mode-bestellen-text);
    animation: pulseBestellen 2s ease-in-out infinite;
}

.schilcher-mode-banner--vorbestellen {
    background: var(--mode-vorbestellen-bg);
    border: 2px solid var(--mode-vorbestellen-border);
    color: var(--mode-vorbestellen-text);
    animation: pulseVorbestellen 2s ease-in-out infinite;
}

.schilcher-mode-banner--erweitern {
    background: var(--mode-erweitern-bg);
    border: 2px solid var(--mode-erweitern-border);
    color: var(--mode-erweitern-text);
    animation: pulseErweitern 2s ease-in-out infinite;
}

/* Banner pulse animations */
@keyframes pulseBestellen {
    0%, 100% {
        border-color: var(--mode-bestellen-border);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
    50% {
        border-color: var(--mode-bestellen-primary);
        box-shadow: 0 0 12px 4px rgba(34, 197, 94, 0.15);
    }
}

@keyframes pulseVorbestellen {
    0%, 100% {
        border-color: var(--mode-vorbestellen-border);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        border-color: var(--mode-vorbestellen-primary);
        box-shadow: 0 0 12px 4px rgba(59, 130, 246, 0.15);
    }
}

@keyframes pulseErweitern {
    0%, 100% {
        border-color: var(--mode-erweitern-border);
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
    50% {
        border-color: var(--mode-erweitern-primary);
        box-shadow: 0 0 12px 4px rgba(249, 115, 22, 0.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .schilcher-mode-banner--bestellen,
    .schilcher-mode-banner--vorbestellen,
    .schilcher-mode-banner--erweitern,
    .schilcher-mode-btn.active,
    .schilcher-mode-banner.stuck {
        animation: none;
    }

    .schilcher-mode-popup__track {
        transition: none;
    }
}

/* ==========================================================================
   DISABLED PRODUCT CARD STATES
   ========================================================================== */

.product-card.mode-disabled {
    position: relative;
}

.product-card.mode-disabled .product-card-image,
.product-card.mode-disabled .product-card-name,
.product-card.mode-disabled .product-card-price {
    opacity: 0.5;
    filter: grayscale(50%);
}

.product-card.mode-disabled .product-actions {
    display: none;
}

.product-card__mode-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--schilcher-border, #e5e7eb);
    padding: 12px;
    text-align: center;
}

.product-card__mode-badge--preorder {
    background: var(--mode-vorbestellen-bg);
    border-color: var(--mode-vorbestellen-border);
    color: var(--mode-vorbestellen-text);
}

.product-card__mode-badge--date-mismatch {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.product-card__mode-badge__icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.product-card__mode-badge__title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.product-card__mode-badge__details {
    font-size: 12px;
    margin: 0;
    opacity: 0.85;
}

.product-card__mode-badge__action {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mode-vorbestellen-primary);
    text-decoration: none;
    cursor: pointer;
}

.product-card__mode-badge__action:hover {
    text-decoration: underline;
}

/* ==========================================================================
   DATE SELECTION OVERLAY (Vorbestellen Phase 1)
   ========================================================================== */

.schilcher-date-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.schilcher-date-overlay__content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.schilcher-date-overlay__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--mode-vorbestellen-text);
    margin: 0 0 12px 0;
    text-align: center;
}

.schilcher-date-overlay__subtitle {
    font-size: 16px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.5;
}

.schilcher-date-overlay__calendar {
    margin-bottom: 20px;
    min-height: 320px;
}

/* MCDatepicker customization for bigger display */
.schilcher-date-overlay .mc-calendar {
    font-size: 16px !important;
}

.schilcher-date-overlay .mc-calendar__header {
    padding: 16px !important;
}

.schilcher-date-overlay .mc-calendar__body {
    padding: 12px !important;
}

.schilcher-date-overlay .mc-calendar__day {
    width: 44px !important;
    height: 44px !important;
    font-size: 15px !important;
}

.schilcher-date-overlay__info {
    font-size: 14px;
    color: var(--schilcher-text-secondary, #6b7280);
    text-align: center;
    margin-bottom: 24px;
    padding: 12px;
    background: var(--schilcher-bg-light, #f9fafb);
    border-radius: 8px;
}

.schilcher-date-overlay__btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--mode-vorbestellen-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schilcher-date-overlay__btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.schilcher-date-overlay__btn:disabled {
    background: var(--schilcher-border, #d1d5db);
    cursor: not-allowed;
    color: var(--schilcher-text-secondary, #9ca3af);
}

/* ==========================================================================
   ORDER SELECTOR OVERLAY (Erweitern)
   ========================================================================== */

.schilcher-order-selector {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
}

.schilcher-order-selector__content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.schilcher-order-selector__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--mode-erweitern-bg);
    border-bottom: 1px solid var(--mode-erweitern-border);
}

.schilcher-order-selector__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mode-erweitern-text);
    margin: 0;
}

.schilcher-order-selector__close {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--mode-erweitern-text);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.schilcher-order-selector__close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.schilcher-order-selector__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.schilcher-order-selector__section {
    margin-bottom: 24px;
}

.schilcher-order-selector__section:last-child {
    margin-bottom: 0;
}

.schilcher-order-selector__section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--schilcher-border, #e5e7eb);
}

.schilcher-order-card {
    border: 2px solid var(--schilcher-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.schilcher-order-card:last-child {
    margin-bottom: 0;
}

.schilcher-order-card--eligible {
    cursor: pointer;
}

.schilcher-order-card--eligible:hover {
    border-color: var(--mode-erweitern-primary);
    background: var(--mode-erweitern-bg);
}

.schilcher-order-card--ineligible {
    opacity: 0.6;
}

.schilcher-order-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.schilcher-order-card__number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.schilcher-order-card__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mode-bestellen-primary);
}

.schilcher-order-card--ineligible .schilcher-order-card__status-dot {
    background: var(--schilcher-text-secondary, #6b7280);
}

.schilcher-order-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: var(--schilcher-text-secondary, #6b7280);
}

.schilcher-order-card__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.schilcher-order-card__meta-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.schilcher-order-card__meta-label {
    color: var(--schilcher-text-secondary, #6b7280);
}

.schilcher-order-card__meta-value {
    font-weight: 600;
    color: var(--schilcher-text-primary, #374151);
}

.schilcher-order-card--ineligible .schilcher-order-card__meta-value {
    color: var(--schilcher-text-secondary, #6b7280);
}

.schilcher-mode-popup .tax-note {
    font-weight: 400;
    font-size: 0.8em;
    color: var(--schilcher-text-secondary, #6b7280);
    white-space: nowrap;
}

.schilcher-order-card__reason {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #991b1b;
    margin-top: 8px;
}

.schilcher-order-card__reason svg {
    flex-shrink: 0;
}

.schilcher-order-card__btn {
    padding: 8px 16px;
    background: var(--mode-erweitern-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.schilcher-order-card__btn:hover {
    background: #ea580c;
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.schilcher-mode-modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.schilcher-mode-modal__content {
    background: white;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.schilcher-mode-modal__close {
    float: right;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--schilcher-text-secondary, #6b7280);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.schilcher-mode-modal__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--schilcher-text-primary, #111827);
}

.schilcher-mode-modal__body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--schilcher-text-secondary, #4b5563);
    margin-bottom: 20px;
}

.schilcher-mode-modal__highlight {
    background: var(--mode-vorbestellen-bg);
    border: 1px solid var(--mode-vorbestellen-border);
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
    font-size: 14px;
}

.schilcher-mode-modal__highlight strong {
    color: var(--mode-vorbestellen-text);
}

.schilcher-mode-modal__item-list {
    margin: 12px 0;
    padding-left: 20px;
}

.schilcher-mode-modal__item-list li {
    margin-bottom: 4px;
}

.schilcher-mode-modal__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.schilcher-mode-modal__btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s;
}

.schilcher-mode-modal__btn--primary {
    background: var(--mode-vorbestellen-primary);
    color: white;
    border: none;
}

.schilcher-mode-modal__btn--primary:hover {
    background: #2563eb;
}

.schilcher-mode-modal__btn--secondary {
    background: white;
    color: var(--schilcher-text-primary, #374151);
    border: 1px solid var(--schilcher-border, #d1d5db);
}

.schilcher-mode-modal__btn--secondary:hover {
    background: var(--schilcher-bg-light, #f9fafb);
}

/* Warning modal variant */
.schilcher-mode-modal--warning .schilcher-mode-modal__title {
    color: #92400e;
}

.schilcher-mode-modal--warning .schilcher-mode-modal__highlight {
    background: #fffbeb;
    border-color: #fde68a;
}

/* ==========================================================================
   MODE SWITCH CONFIRMATION DIALOG
   ========================================================================== */

.schilcher-mode-switch-confirm {
    z-index: 100000;
}

.schilcher-mode-switch-confirm .mode-switch-confirm__content {
    max-width: 520px;
    position: relative;
}

.schilcher-mode-switch-confirm .schilcher-mode-modal__close {
    float: none;
    position: absolute;
    top: 16px;
    right: 16px;
}

/* Transition visualization: [FROM] --arrow--> [TO] */
.mode-switch-confirm__transition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px 0 16px;
}

/* Mode badges */
.mode-switch-confirm__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    min-width: 100px;
    text-align: center;
}

.mode-switch-confirm__badge--bestellen {
    background: var(--mode-bestellen-bg);
    border-color: var(--mode-bestellen-border);
    color: var(--mode-bestellen-text);
}

.mode-switch-confirm__badge--vorbestellen {
    background: var(--mode-vorbestellen-bg);
    border-color: var(--mode-vorbestellen-border);
    color: var(--mode-vorbestellen-text);
}

.mode-switch-confirm__badge--erweitern {
    background: var(--mode-erweitern-bg);
    border-color: var(--mode-erweitern-border);
    color: var(--mode-erweitern-text);
}

.mode-switch-confirm__badge--ansehen {
    background: var(--mode-ansehen-bg);
    border-color: var(--mode-ansehen-border);
    color: var(--mode-ansehen-text);
}

.mode-switch-confirm__badge-icon {
    width: 32px;
    height: 32px;
}

.mode-switch-confirm__badge-label {
    font-size: 13px;
    font-weight: 700;
}

/* Curved arrow */
.mode-switch-confirm__arrow {
    flex-shrink: 0;
    width: 80px;
    color: var(--schilcher-warm-brown, #876c4b);
    margin-top: calc(-12px - 1rem);
}

.mode-switch-confirm__arrow svg {
    width: 100%;
    height: auto;
}

/* Cart preview strip */
.mode-switch-confirm__cart-preview {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--schilcher-border-color, #e5e7eb);
}

.mode-switch-confirm__thumbs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.mode-switch-confirm__thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--schilcher-border-color, #e5e7eb);
    position: relative;
    cursor: default;
    flex-shrink: 0;
}

.mode-switch-confirm__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mode-switch-confirm__thumb--empty {
    background: var(--schilcher-bg-light, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-switch-confirm__thumb--empty svg {
    width: 20px;
    height: 20px;
    color: var(--schilcher-text-secondary, #9ca3af);
}

.mode-switch-confirm__thumb--overflow {
    background: var(--schilcher-bg-light, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--schilcher-text-secondary, #6b7280);
    border-style: dashed;
}

.mode-switch-confirm__cart-count {
    font-size: 13px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin: 0;
}

/* Primary button — background/color set via JS inline style for target mode */
.schilcher-mode-switch-confirm .schilcher-mode-modal__actions .schilcher-mode-modal__btn {
    line-height: 1.3;
}

.mode-switch-confirm__btn--keep {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.mode-switch-confirm__btn--keep:hover {
    opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 500px) {
    .mode-switch-confirm__transition {
        gap: 8px;
    }

    .mode-switch-confirm__badge {
        padding: 12px 14px;
        min-width: 80px;
    }

    .mode-switch-confirm__badge-icon {
        width: 24px;
        height: 24px;
    }

    .mode-switch-confirm__badge-label {
        font-size: 12px;
    }

    .mode-switch-confirm__arrow {
        width: 56px;
    }

    .mode-switch-confirm__thumb {
        width: 36px;
        height: 36px;
    }

    .schilcher-mode-switch-confirm .mode-switch-confirm__content {
        margin: 16px;
    }
}

/* ==========================================================================
   MODE SWITCH DELIVERY CONFLICT MODAL
   ========================================================================== */

.schilcher-mode-switch-conflict {
    z-index: 100001;
}

.mode-switch-conflict__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.mode-switch-conflict__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.mode-switch-conflict__item:hover {
    background: #fafafa;
}

.mode-switch-conflict__item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--schilcher-warm-brown, #876c4b);
}

.mode-switch-conflict__name {
    font-weight: 600;
    flex: 1;
}

.mode-switch-conflict__date {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ==========================================================================
   MODE SELECTION POPUP (Initial shop landing)
   ========================================================================== */

.schilcher-mode-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.schilcher-mode-popup__content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Slider track: holds all pages side-by-side */
.schilcher-mode-popup__track {
    display: flex;
    width: 400%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.schilcher-mode-popup__track[data-page="0"] {
    transform: translateX(0);
}

.schilcher-mode-popup__track[data-page="1"] {
    transform: translateX(-25%);
}

.schilcher-mode-popup__track[data-page="2"] {
    transform: translateX(-50%);
}

.schilcher-mode-popup__track[data-page="3"] {
    transform: translateX(-75%);
}

/* Each page takes 1/4 of the track (= 100% of visible area) */
.schilcher-mode-popup__page {
    width: 25%;
    flex-shrink: 0;
    padding: 40px 32px 32px;
    text-align: center;
    box-sizing: border-box;
}

/* Back button in slide panels */
.schilcher-mode-popup__back {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--schilcher-text-secondary, #6b7280);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px 8px 0;
    margin: -8px 0 12px;
    transition: color 0.2s;
}

.schilcher-mode-popup__back:hover {
    color: var(--schilcher-text-primary, #374151);
}

.schilcher-mode-popup__back svg {
    width: 18px;
    height: 18px;
}

/* Vorbestellen date picker panel */
.schilcher-mode-popup__date-panel {
    text-align: center;
}

.schilcher-mode-popup__date-panel .schilcher-date-overlay__calendar {
    margin-bottom: 20px;
    min-height: 320px;
    display: flex;
    justify-content: center;
}

/* Hide MCDatepicker OK/Clear footer — we use our own confirm button */
.schilcher-mode-popup__date-panel .mc-picker__footer {
    display: none;
}

/* MCDatepicker permanent mode: calendar is moved into popup container.
   Override library defaults so the calendar fills available space. */
.schilcher-mode-popup__date-panel .mc-calendar--permanent {
    position: relative;
    top: 0;
    left: 0;
    visibility: visible;
    z-index: auto;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    height: 360px;
    max-height: none;
}

.schilcher-mode-popup__date-confirm {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--mode-vorbestellen-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schilcher-mode-popup__date-confirm:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.schilcher-mode-popup__date-confirm:disabled {
    background: var(--schilcher-border, #d1d5db);
    cursor: not-allowed;
    color: var(--schilcher-text-secondary, #9ca3af);
}

/* Erweitern order list panel */
.schilcher-mode-popup__order-panel {
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.schilcher-mode-popup__order-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 8px;
}

/* Empty state for no orders */
.schilcher-mode-popup__empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--schilcher-text-secondary, #6b7280);
}

.schilcher-mode-popup__empty-state p {
    font-size: 16px;
    margin: 0 0 20px;
}

.schilcher-mode-popup__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--schilcher-text-primary, #111827);
    margin: 0 0 8px 0;
}

.schilcher-mode-popup__subtitle {
    font-size: 16px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.schilcher-mode-popup__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.schilcher-mode-popup__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.schilcher-mode-popup__card:hover,
.schilcher-mode-popup__card:focus-visible {
    transform: translateY(-4px);
    outline: none;
}

/* Card mode colors */
.schilcher-mode-popup__card--bestellen {
    background: var(--mode-bestellen-bg);
    border-color: var(--mode-bestellen-border);
    color: var(--mode-bestellen-text);
}

.schilcher-mode-popup__card--bestellen:hover,
.schilcher-mode-popup__card--bestellen:focus-visible {
    border-color: var(--mode-bestellen-primary);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.schilcher-mode-popup__card--vorbestellen {
    background: var(--mode-vorbestellen-bg);
    border-color: var(--mode-vorbestellen-border);
    color: var(--mode-vorbestellen-text);
}

.schilcher-mode-popup__card--vorbestellen:hover,
.schilcher-mode-popup__card--vorbestellen:focus-visible {
    border-color: var(--mode-vorbestellen-primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.schilcher-mode-popup__card--ansehen {
    background: var(--mode-ansehen-bg);
    border-color: var(--mode-ansehen-border);
    color: var(--mode-ansehen-text);
}

.schilcher-mode-popup__card--ansehen:hover,
.schilcher-mode-popup__card--ansehen:focus-visible {
    border-color: var(--mode-ansehen-primary);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.2);
}

.schilcher-mode-popup__card-icon {
    width: 48px;
    height: 48px;
}

.schilcher-mode-popup__card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.schilcher-mode-popup__card-desc {
    font-size: 14px;
    margin: 0;
    opacity: 0.85;
    line-height: 1.5;
}

/* Open orders quick-access section on page 0 */
.schilcher-mode-popup__open-orders {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--schilcher-border, #e5e7eb);
    text-align: left;
}

.schilcher-mode-popup__open-orders-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin-bottom: 12px;
    text-align: center;
}

.schilcher-mode-popup__open-orders-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--schilcher-border, #e5e7eb);
    border-radius: 10px;
}

.schilcher-mode-popup__open-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--schilcher-border, #e5e7eb);
    cursor: pointer;
    transition: background 0.15s ease;
}

.schilcher-mode-popup__open-order-row:last-child {
    border-bottom: none;
}

.schilcher-mode-popup__open-order-row:hover {
    background: var(--mode-erweitern-bg);
}

.schilcher-mode-popup__open-order-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.schilcher-mode-popup__open-order-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--schilcher-text-primary, #111827);
}

.schilcher-mode-popup__open-order-meta {
    font-size: 13px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin-top: 2px;
}

.schilcher-mode-popup__open-order-btn {
    padding: 6px 14px;
    background: var(--mode-erweitern-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.schilcher-mode-popup__open-order-btn:hover {
    background: #ea580c;
}

/* Skeleton loader for async order fetch */
.schilcher-mode-popup__open-orders-skeleton {
    padding: 14px 16px;
    border-bottom: 1px solid var(--schilcher-border, #e5e7eb);
}

.schilcher-mode-popup__open-orders-skeleton:last-child {
    border-bottom: none;
}

.schilcher-mode-popup__open-orders-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.schilcher-mode-popup__open-orders-skeleton-line--wide {
    width: 60%;
    margin-bottom: 6px;
}

.schilcher-mode-popup__open-orders-skeleton-line--narrow {
    width: 40%;
}

.schilcher-mode-popup__open-orders-empty {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: var(--schilcher-text-secondary, #9ca3af);
    margin: 0;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Open order row: action buttons container */
.schilcher-mode-popup__open-order-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}


/* ==========================================================================
   ORDER ITEMS PREVIEW (Page 3)
   ========================================================================== */

.schilcher-mode-popup__items-panel {
    text-align: left;
}

.schilcher-mode-popup__items-header {
    text-align: center;
    margin-bottom: 16px;
}

.schilcher-mode-popup__items-order-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--schilcher-text-primary, #111827);
}

.schilcher-mode-popup__items-summary {
    display: block;
    font-size: 13px;
    color: var(--schilcher-text-secondary, #6b7280);
    margin-top: 4px;
}

.schilcher-mode-popup__items-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--schilcher-border, #e5e7eb);
    border-radius: 10px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    align-items: center;
}

.schilcher-mode-popup__items-row {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    gap: 0 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--schilcher-border, #e5e7eb);
}

.schilcher-mode-popup__items-row:last-child {
    border-bottom: none;
}

.schilcher-mode-popup__items-thumb {
    width: 40px;
    height: 40px;
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
    background: #f5f5f5;
}

.schilcher-mode-popup__items-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--schilcher-text-primary, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.schilcher-mode-popup__items-qty {
    font-size: 13px;
    color: var(--schilcher-text-secondary, #6b7280);
    white-space: nowrap;
    text-align: right;
}

.schilcher-mode-popup__items-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--schilcher-text-primary, #111827);
    white-space: nowrap;
    text-align: right;
}

.schilcher-mode-popup__items-extend-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--mode-erweitern-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease;
}

.schilcher-mode-popup__items-extend-btn:hover {
    background: #ea580c;
}

.schilcher-mode-popup__items-error,
.schilcher-mode-popup__items-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 16px;
    font-size: 13px;
    color: var(--schilcher-text-secondary, #9ca3af);
    margin: 0;
}

/* Skeleton loader for order items */
.schilcher-mode-popup__items-skeleton {
    grid-column: 1 / -1;
}

.schilcher-mode-popup__items-skeleton-row {
    height: 40px;
    margin: 10px 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* ==========================================================================
   MOBILE ADAPTATIONS
   ========================================================================== */

@media (max-width: 768px) {
    .schilcher-mode-bar {
        min-height: var(--mode-bar-height-mobile);
        padding: 12px 16px;
        gap: 8px;
    }

    .schilcher-mode-btn {
        padding: 10px 14px;
        font-size: 14px;
    }

    .schilcher-mode-btn .mode-label {
        display: none;
    }

    .schilcher-mode-btn .mode-label-short {
        display: inline;
    }

    /* Collapsed mode bar (mobile scrolling) */
    .schilcher-mode-bar.collapsed {
        min-height: 52px;
        justify-content: space-between;
    }

    .schilcher-mode-bar.collapsed .schilcher-mode-btn:not(.active) {
        display: none;
    }

    .schilcher-mode-bar.collapsed .schilcher-mode-btn.active {
        flex: 1;
        justify-content: space-between;
    }

    .schilcher-mode-bar.collapsed .mode-expand-btn {
        display: flex;
    }

    .mode-expand-btn {
        display: none;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--schilcher-bg-light, #f3f4f6);
        border: 2px solid var(--schilcher-border, #e5e7eb);
        border-radius: 8px;
        cursor: pointer;
    }

    /* Mode banner mobile */
    .schilcher-mode-banner {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .schilcher-mode-banner.stuck {
        width: 220px;
        padding: 10px 14px;
        top: var(--banner-top-offset, 12px);
        right: 12px;
    }

    .schilcher-mode-banner__date-btn,
    .schilcher-mode-banner__end-btn {
        padding: 10px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .schilcher-mode-banner.stuck .schilcher-mode-banner__date-btn,
    .schilcher-mode-banner.stuck .schilcher-mode-banner__end-btn {
        width: auto;
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Date overlay mobile */
    .schilcher-date-overlay__content {
        padding: 24px;
        max-width: 100%;
    }

    .schilcher-date-overlay__title {
        font-size: 20px;
    }

    .schilcher-date-overlay__btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Mode selection popup mobile */
    .schilcher-mode-popup__page {
        padding: 24px 16px 20px;
    }

    .schilcher-mode-popup__title {
        font-size: 20px;
    }

    .schilcher-mode-popup__subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .schilcher-mode-popup__cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .schilcher-mode-popup__card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
        gap: 16px;
    }

    .schilcher-mode-popup__card-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .schilcher-mode-popup__card-title {
        font-size: 16px;
    }

    .schilcher-mode-popup__card-desc {
        font-size: 13px;
    }

    .schilcher-mode-popup__order-list {
        max-height: 300px;
    }

    /* Open orders quick-access mobile */
    .schilcher-mode-popup__open-orders-list {
        max-height: 180px;
    }

    .schilcher-mode-popup__open-order-row {
        padding: 12px 14px;
    }

    .schilcher-mode-popup__open-order-actions {
        gap: 6px;
    }

    .schilcher-mode-popup__open-order-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Order items preview mobile */
    .schilcher-mode-popup__items-list {
        max-height: 260px;
        grid-template-columns: 36px 1fr auto auto;
    }

    .schilcher-mode-popup__items-thumb {
        width: 36px;
        height: 36px;
    }

    .schilcher-mode-popup__items-row {
        gap: 0 10px;
        padding: 8px 12px;
    }

    /* Modal mobile */
    .schilcher-mode-modal__content {
        margin: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }

    .schilcher-mode-modal__actions {
        flex-direction: column;
    }

    .schilcher-mode-modal__btn {
        min-width: 100%;
    }
}

/* Hide short labels on desktop */
.schilcher-mode-btn .mode-label-short {
    display: none;
}

@media (max-width: 768px) {
    .schilcher-mode-btn .mode-label {
        display: none;
    }
    .schilcher-mode-btn .mode-label-short {
        display: inline;
    }
}

/* ==========================================================================
   SCREEN READER ONLY (Accessibility)
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================
   Recovery Popup
   ============================================= */
.schilcher-recovery-popup .schilcher-mode-popup__content {
    max-width: 480px;
}

.recovery-popup__body {
    padding: 40px 32px;
    text-align: center;
}

.recovery-popup__icon {
    margin-bottom: 16px;
    color: var(--schilcher-brown, #49391b);
}

.recovery-popup__icon svg {
    opacity: 0.7;
}

.recovery-popup__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--schilcher-brown, #49391b);
    margin: 0 0 12px;
}

.recovery-popup__message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px;
}

.recovery-popup__details {
    padding: 12px 16px;
    background: var(--schilcher-cream, #f5f0e6);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--schilcher-brown, #49391b);
}

.recovery-detail {
    padding: 2px 0;
}

.recovery-popup__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.recovery-popup__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
}

.recovery-popup__btn:hover {
    transform: translateY(-1px);
}

.recovery-popup__btn:active {
    transform: translateY(0);
}

.recovery-popup__btn--continue {
    background-color: var(--schilcher-brown, #49391b);
    color: #fff;
}

.recovery-popup__btn--continue:hover {
    background-color: var(--schilcher-warm-brown, #876c4b);
}

.recovery-popup__btn--discard {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.recovery-popup__btn--discard:hover {
    background-color: #eee;
    color: #333;
}

.recovery-popup__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.recovery-popup__warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

.recovery-popup__warning svg {
    color: #ccc;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .recovery-popup__body {
        padding: 32px 20px;
    }

    .recovery-popup__title {
        font-size: 1.15rem;
    }

    .recovery-popup__btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* =============================================
   Onboarding Popup — One-time introduction
   ============================================= */
.schilcher-onboarding-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.schilcher-onboarding-popup__content {
    background: #fff;
    border-radius: 16px;
    max-width: 816px;
    width: 100%;
    padding: 40px 36px 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.schilcher-onboarding-popup__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--schilcher-primary-text-brown, #49391b);
    margin: 0 0 12px;
    text-align: center;
}

.schilcher-onboarding-popup__subtitle {
    font-size: 15px;
    color: var(--schilcher-warm-brown, #876c4b);
    line-height: 1.6;
    margin: 0 0 28px;
    text-align: center;
}

.schilcher-onboarding-popup__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.schilcher-onboarding-popup__card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.schilcher-onboarding-popup__card-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}

.schilcher-onboarding-popup__card-text {
    min-width: 0;
}

.schilcher-onboarding-popup__card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

.schilcher-onboarding-popup__card-desc {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
}

/* Bestellen (Green) */
.schilcher-onboarding-popup__card--bestellen {
    background: var(--mode-bestellen-bg);
    border-left-color: var(--mode-bestellen-primary);
    color: var(--mode-bestellen-text);
}

/* Vorbestellen (Blue) */
.schilcher-onboarding-popup__card--vorbestellen {
    background: var(--mode-vorbestellen-bg);
    border-left-color: var(--mode-vorbestellen-primary);
    color: var(--mode-vorbestellen-text);
}

/* Erweitern (Orange) */
.schilcher-onboarding-popup__card--erweitern {
    background: var(--mode-erweitern-bg);
    border-left-color: var(--mode-erweitern-primary);
    color: var(--mode-erweitern-text);
}

/* Ansehen (Yellow) */
.schilcher-onboarding-popup__card--ansehen {
    background: var(--mode-ansehen-bg);
    border-left-color: var(--mode-ansehen-primary);
    color: var(--mode-ansehen-text);
}

.schilcher-onboarding-popup__contact {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--schilcher-cream, #f5f0e6);
}

.schilcher-onboarding-popup__contact-label {
    font-size: 14px;
    color: var(--schilcher-warm-brown, #876c4b);
    margin: 0 0 6px;
}

.schilcher-onboarding-popup__contact-info {
    font-size: 14px;
    margin: 0;
}

.schilcher-onboarding-popup__contact-info a {
    color: var(--schilcher-primary-text-brown, #49391b);
    text-decoration: none;
    font-weight: 600;
}

.schilcher-onboarding-popup__contact-info a:hover {
    text-decoration: underline;
}

.schilcher-onboarding-popup__contact-sep {
    margin: 0 10px;
    color: var(--schilcher-light-brown, #bda77f);
}

.schilcher-onboarding-popup__btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--schilcher-primary-text-brown, #49391b);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--schilcher-font-family, 'Open Sans', Arial, sans-serif);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    line-height: 1.3;
}

.schilcher-onboarding-popup__btn:hover {
    background: var(--schilcher-warm-brown, #876c4b);
    transform: translateY(-1px);
}

.schilcher-onboarding-popup__btn:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .schilcher-onboarding-popup__content {
        padding: 28px 20px 24px;
    }

    .schilcher-onboarding-popup__title {
        font-size: 20px;
    }

    .schilcher-onboarding-popup__subtitle {
        font-size: 14px;
    }

    .schilcher-onboarding-popup__cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .schilcher-onboarding-popup__card {
        padding: 14px;
    }

    .schilcher-onboarding-popup__card-icon {
        width: 28px;
        height: 28px;
    }

    .schilcher-onboarding-popup__contact-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .schilcher-onboarding-popup__contact-sep {
        display: none;
    }
}
