/* ===========================================
   FLORIWAY SCANAPPLICATIE - GLOBAL STYLES
   ===========================================
   Alle styling op één plek - app.css
   Prefix: fw- (Floriway)
   =========================================== */

/* ===========================================
   FONTS
   =========================================== */
@font-face {
    font-family: 'HalyardDisplay';
    src: url('/fonts/Halyard-Display.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HalyardDisplayBold';
    src: url('/fonts/Halyard-Display-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ===========================================
   CSS VARIABLES
   =========================================== */
:root {
    --fw-purple: #270047;
    --fw-orange: #ff7200;
    --fw-white: #ffffff;
    --fw-gray: #f5f5f5;
    --fw-spacing-xs: 0.5rem;
    --fw-spacing-sm: 0.75rem;
    --fw-spacing-md: 1rem;
    --fw-spacing-lg: 1.5rem;
    --fw-spacing-xl: 2rem;
}

/* ===========================================
   RESET & BASE
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 3.8vw, 18px);
}

body {
    width: 100%;
    min-height: 100dvh;
    margin: 0 auto;
    overflow-x: hidden;
    background-color: var(--fw-gray);
    font-family: 'HalyardDisplayBold', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: lighter;
    -webkit-font-smoothing: antialiased;
}

/* ===========================================
   APP CONTAINER - RESPONSIVE
   =========================================== */
#app {
    width: 100%;
    max-width: 1000px;
    min-height: 100dvh;
    margin: 0 auto;
    background-color: var(--fw-gray);
    display: flex;
    flex-direction: column;
}

/* ===========================================
   LOADING SCREEN
   =========================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--fw-gray);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fw-loading-logo {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    font-weight: 700;
    color: var(--fw-purple);
    margin-bottom: var(--fw-spacing-xl);
    letter-spacing: -0.5px;
}

.fw-spinner-container {
    display: flex;
    gap: var(--fw-spacing-xs);
    margin-bottom: var(--fw-spacing-xl);
}

.fw-spinner-bar {
    width: 6px;
    height: 40px;
    background-color: var(--fw-orange);
    border-radius: 3px;
    animation: fw-wave 1.2s ease-in-out infinite;
}

    .fw-spinner-bar:nth-child(1) {
        animation-delay: 0s;
    }

    .fw-spinner-bar:nth-child(2) {
        animation-delay: 0.1s;
    }

    .fw-spinner-bar:nth-child(3) {
        animation-delay: 0.2s;
    }

    .fw-spinner-bar:nth-child(4) {
        animation-delay: 0.3s;
    }

    .fw-spinner-bar:nth-child(5) {
        animation-delay: 0.4s;
    }

@keyframes fw-wave {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.fw-loading-text {
    color: #666;
    font-size: 1rem;
    text-align: center;
    line-height: 1.5;
    padding: 0 var(--fw-spacing-md);
}

.fw-fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.fw-hidden {
    display: none !important;
}

/* ===========================================
   NAVBAR - Fixed aan bovenkant
   =========================================== */
.fw-navbar {
    background-color: var(--fw-purple, #270047);
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    flex-shrink: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fw-navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--fw-spacing-sm);
    flex: 1;
    min-width: 0;
}

.fw-navbar-logo {
    height: clamp(35px, 10vw, 45px);
    width: 130px;
    object-fit: contain;
    flex-shrink: 0;
}

.fw-navbar-divider {
    color: rgba(255,255,255,0.6);
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 300;
    flex-shrink: 0;
}

.fw-navbar-title {
    color: white;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fw-navbar-icon-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

    .fw-navbar-icon-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

.fw-navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ===========================================
   PAGE LAYOUT - Fixed height container
   =========================================== */
.fw-page {
    width: 100%;
    max-width: 1000px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background-color: var(--fw-gray, #f5f5f5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fw-content-flush {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* ===========================================
   CONTENT - Scrollbaar midden gedeelte
   =========================================== */
.fw-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--fw-spacing-md, 1rem);
    min-height: 0;
}

/* ===========================================
   CARD
   =========================================== */
.fw-card {
    background: var(--fw-white);
    border-radius: 12px;
    padding: var(--fw-spacing-lg);
    margin-bottom: var(--fw-spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fw-card-centered {
    text-align: center;
    padding: var(--fw-spacing-xl);
}

.fw-card-error {
    border-left: 4px solid #f44336;
}

/* ===========================================
   STEP ICONS (wizard pages)
   =========================================== */
.fw-step-icon {
    width: clamp(60px, 18vw, 80px);
    height: clamp(60px, 18vw, 80px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--fw-spacing-lg);
}

.fw-step-icon-large {
    width: clamp(80px, 22vw, 100px);
    height: clamp(80px, 22vw, 100px);
}

.fw-step-icon-purple {
    background: linear-gradient(135deg, var(--fw-purple) 0%, #3d0066 100%);
    box-shadow: 0 4px 12px rgba(39,0,71,0.3);
}

.fw-step-icon-orange {
    background: linear-gradient(135deg, var(--fw-orange) 0%, #f57c00 100%);
    box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}

.fw-step-icon-green {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.fw-step-icon-blue {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 4px 12px rgba(33,150,243,0.3);
}

.fw-step-icon-red {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(244,67,54,0.3);
}

.fw-step-emoji {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
}

.fw-step-title {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: var(--fw-spacing-xs);
    text-align: center;
}

.fw-step-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: var(--fw-spacing-lg);
    font-size: clamp(0.85rem, 3.5vw, 0.95rem);
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
.fw-input {
    width: 100%;
    min-height: 48px;
    padding: var(--fw-spacing-sm) var(--fw-spacing-md);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background-color: var(--fw-white);
}

    .fw-input:focus {
        outline: none;
        border-color: var(--fw-purple);
    }

    .fw-input::placeholder {
        color: #999;
    }

.fw-input-barcode {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
}

.fw-input-warning {
    border-color: #ffc107 !important;
}

/* ===========================================
   BUTTONS
   =========================================== */
.fw-btn {
    min-height: 48px;
    padding: var(--fw-spacing-sm) var(--fw-spacing-md);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--fw-spacing-xs);
    transition: transform 0.1s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    text-decoration: none;
}

    .fw-btn:active {
        transform: scale(0.98);
    }

    .fw-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

        .fw-btn:disabled:hover {
            transform: none;
            box-shadow: none;
        }

.fw-btn-purple {
    background-color: var(--fw-purple);
    color: white;
}

.fw-btn-orange {
    background-color: var(--fw-orange);
    color: white;
}

.fw-btn-green {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

    .fw-btn-green:hover {
        background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    }

.fw-btn-red {
    background-color: #f44336;
    color: white;
}

    .fw-btn-red:hover {
        background-color: #e53935;
    }

.fw-btn-outline {
    background-color: transparent;
    border: 2px solid var(--fw-purple);
    color: var(--fw-purple);
}

.fw-btn-gray {
    background-color: #666;
    color: white;
}

    .fw-btn-gray:hover {
        background-color: #555;
    }

.fw-btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

    .fw-btn-warning:hover {
        background: linear-gradient(135deg, #e0a800 0%, #c79100 100%);
    }

    .fw-btn-warning:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.fw-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fw-btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
}

/* ===========================================
   INFO & ERROR BOXES
   =========================================== */
.fw-info-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: var(--fw-spacing-md);
}

.fw-info-label {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.fw-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    word-break: break-word;
}

.fw-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--fw-spacing-sm) 0;
    border-bottom: 1px solid #e0e0e0;
}

    .fw-info-row:last-child {
        border-bottom: none;
    }

.fw-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.fw-error-box {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: var(--fw-spacing-md);
    border-radius: 6px;
    margin-top: var(--fw-spacing-md);
}

.fw-error-text {
    color: #f44336;
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
}

.fw-error-close {
    background: none;
    border: none;
    color: #c62828;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-left: 0.5rem;
}

    .fw-error-close:hover {
        color: #b71c1c;
    }

.fw-success-box {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: var(--fw-spacing-md);
    border-radius: 6px;
    margin-top: var(--fw-spacing-md);
}

.fw-success-text {
    color: #2e7d32;
    font-weight: 600;
    margin: 0;
}

.fw-warning-box {
    background-color: #fff3e0;
    border-left: 4px solid var(--fw-orange);
    padding: var(--fw-spacing-md);
    border-radius: 6px;
    margin-top: var(--fw-spacing-md);
}

.fw-warning-text {
    color: #e65100;
    font-weight: 600;
    margin: 0;
}

/* ===========================================
   SPINNER
   =========================================== */
.fw-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--fw-purple);
    border-radius: 50%;
    margin: 0 auto var(--fw-spacing-lg);
    animation: fw-spin 1s linear infinite;
}

.fw-spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.fw-spinner-large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

.fw-spinner-tiny {
    width: 12px;
    height: 12px;
    border: 2px solid #e0e0e0;
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: fw-spin 0.8s linear infinite;
}

.fw-spinner-warning {
    border-top-color: #ffc107 !important;
}

@keyframes fw-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===========================================
   MENU ITEMS (ScanMenu)
   =========================================== */
.fw-menu-card {
    background: var(--fw-white);
    border-radius: 12px;
    padding: var(--fw-spacing-md);
    margin-bottom: var(--fw-spacing-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: var(--fw-spacing-md);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

    .fw-menu-card:active {
        transform: scale(0.98);
    }

    .fw-menu-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

.fw-menu-card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.fw-menu-card-highlight {
    border: 2px solid var(--fw-purple);
}

.fw-menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.fw-menu-icon-purple {
    background-color: rgba(39,0,71,0.1);
    color: var(--fw-purple);
}

.fw-menu-icon-orange {
    background-color: rgba(255,114,0,0.1);
    color: var(--fw-orange);
}

.fw-menu-icon-green {
    background-color: rgba(76,175,80,0.1);
    color: #4caf50;
}

.fw-menu-icon-blue {
    background-color: rgba(33,150,243,0.1);
    color: #2196f3;
}

.fw-menu-icon-red {
    background-color: rgba(244,67,54,0.1);
    color: #f44336;
}

.fw-menu-content {
    flex: 1;
    min-width: 0;
}

.fw-menu-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.fw-menu-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.fw-menu-arrow {
    color: #ccc;
    font-size: 1.2rem;
}

/* ===========================================
   SCAN RESULT / HISTORY
   =========================================== */
.fw-scan-result {
    background: var(--fw-white);
    border-radius: 8px;
    padding: var(--fw-spacing-sm) var(--fw-spacing-md);
    margin-bottom: var(--fw-spacing-xs);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.fw-scan-result-success {
    border-left: 3px solid #4caf50;
}

.fw-scan-result-error {
    border-left: 3px solid #f44336;
}

.fw-scan-barcode {
    font-family: monospace;
    font-size: 0.85rem;
    color: #333;
}

.fw-scan-time {
    font-size: 0.75rem;
    color: #999;
}

/* ===========================================
   COUNTER / BADGE
   =========================================== */
.fw-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--fw-spacing-sm);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
}

.fw-counter-large {
    min-width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 30px;
}

.fw-counter-purple {
    background-color: var(--fw-purple);
    color: white;
}

.fw-counter-orange {
    background-color: var(--fw-orange);
    color: white;
}

.fw-counter-green {
    background-color: #4caf50;
    color: white;
}

.fw-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.fw-badge-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* ===========================================
   UTILITIES
   =========================================== */
.fw-mt-xs {
    margin-top: var(--fw-spacing-xs);
}

.fw-mt-sm {
    margin-top: var(--fw-spacing-sm);
}

.fw-mt-md {
    margin-top: var(--fw-spacing-md);
}

.fw-mt-lg {
    margin-top: var(--fw-spacing-lg);
}

.fw-mt-xl {
    margin-top: var(--fw-spacing-xl);
}

.fw-mb-xs {
    margin-bottom: var(--fw-spacing-xs);
}

.fw-mb-sm {
    margin-bottom: var(--fw-spacing-sm);
}

.fw-mb-md {
    margin-bottom: var(--fw-spacing-md);
}

.fw-mb-lg {
    margin-bottom: var(--fw-spacing-lg);
}

.fw-mb-xl {
    margin-bottom: var(--fw-spacing-xl);
}

.fw-p-sm {
    padding: var(--fw-spacing-sm);
}

.fw-p-md {
    padding: var(--fw-spacing-md);
}

.fw-p-lg {
    padding: var(--fw-spacing-lg);
}

.fw-text-center {
    text-align: center;
}

.fw-text-muted {
    color: #666;
}

.fw-text-small {
    font-size: 0.9rem;
}

.fw-text-bold {
    font-weight: 600;
}

.fw-text-success {
    color: #4caf50;
}

.fw-text-error {
    color: #f44336;
}

.fw-text-strikethrough {
    text-decoration: line-through;
}

.fw-redirect-text {
    color: #666;
    text-align: center;
    margin-top: var(--fw-spacing-lg);
    font-size: 0.9rem;
}

.fw-w-full {
    width: 100%;
}

.fw-flex {
    display: flex;
}

.fw-flex-col {
    flex-direction: column;
}

.fw-flex-center {
    align-items: center;
    justify-content: center;
}

.fw-flex-between {
    justify-content: space-between;
}

.fw-gap-xs {
    gap: var(--fw-spacing-xs);
}

.fw-gap-sm {
    gap: var(--fw-spacing-sm);
}

.fw-gap-md {
    gap: var(--fw-spacing-md);
}

.fw-label-warning {
    display: block;
    color: #856404;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===========================================
   FOOTER - Fixed aan onderkant
   =========================================== */
.fw-footer {
    background-color: var(--fw-gray, #f5f5f5);
    padding: var(--fw-spacing-md, 1rem);
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    z-index: 100;
}

/* ===========================================
   SCAN PAGE LAYOUT
   =========================================== */
.fw-scan-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: var(--fw-spacing-md, 1rem);
}

.fw-scan-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.fw-scan-results-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ===========================================
   SCAN RESULTATEN OVERZICHT
   =========================================== */
.fw-scan-overview {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fw-tellers-card {
    background-color: white;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.fw-tellers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.fw-teller-item {
    padding: 0.25rem;
}

.fw-teller-label {
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

.fw-teller-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* ===========================================
   KARREN LIJST
   =========================================== */
.fw-karren-lijst {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.fw-kar-card {
    background-color: white;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.fw-kar-card-latest {
    border-left-color: #4caf50;
}

.fw-kar-card-removed {
    border-left-color: #f44336;
    background-color: #ffebee;
    opacity: 0.7;
}

.fw-kar-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.fw-kar-left {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.fw-kar-right {
    text-align: right;
}

.fw-kar-badge {
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.fw-kar-badge-green {
    background-color: #4caf50;
}

.fw-kar-badge-orange {
    background-color: #ff9800;
}

.fw-kar-badge-blue {
    background-color: #2196f3;
}

.fw-kar-badge-gray {
    background-color: #9e9e9e;
}

.fw-kar-badge-disabled {
    background-color: #bdbdbd !important;
}

.fw-kar-badge-removed {
    background-color: #f44336;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
}

.fw-kar-info {
    min-width: 0;
}

.fw-kar-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a1a;
}

.fw-kar-barcode {
    font-size: 0.65rem;
    color: #888;
    font-family: 'Courier New', Courier, monospace;
}

.fw-kar-route {
    font-size: 0.75rem;
    color: #666;
}

.fw-kar-destination {
    font-size: 0.75rem;
    color: #c62828;
    font-weight: 500;
}

.fw-kar-meta {
    font-size: 0.7rem;
    color: #999;
}

/* ===========================================
   RITTEN LIJST
   =========================================== */
.fw-ritten-header {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.fw-ritten-lijst {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fw-rit-card {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .fw-rit-card:hover {
        border-color: var(--fw-purple, #270047);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .fw-rit-card:active {
        transform: translateY(0);
    }

.fw-rit-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.fw-rit-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

.fw-rit-icon {
    font-size: 1.5rem;
}

.fw-rit-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.fw-rit-adressen {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0 0 0;
}

/* ===========================================
   POPUP / MODAL - MOBILE FRIENDLY
   =========================================== */
.fw-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.fw-popup {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: min(360px, calc(100vw - 2rem));
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.fw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    background: var(--fw-purple);
    color: white;
}

.fw-popup-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.fw-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

    .fw-popup-close:hover {
        opacity: 1;
    }

.fw-popup-content {
    padding: 1rem;
}

.fw-popup-footer {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
}

    .fw-popup-footer .fw-btn {
        flex: 1;
    }

/* Popup info box - tekst wrappen */
.fw-popup .fw-info-box {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 0.75rem;
}

.fw-popup .fw-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

    .fw-popup .fw-info-row:last-child {
        border-bottom: none;
    }

.fw-popup .fw-info-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.fw-popup .fw-info-value {
    font-size: 0.9rem;
    color: #333;
    word-break: break-word;
}

/* Op bredere schermen: labels naast waarden */
@media (min-width: 400px) {
    .fw-popup .fw-info-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .fw-popup .fw-info-value {
        text-align: right;
        max-width: 60%;
    }
}

/* Popup icon styling */
.fw-popup-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    font-size: 28px;
}

.fw-popup-message {
    text-align: center;
    color: #666;
    margin: 0 0 24px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.fw-popup-item-name {
    color: var(--fw-purple, #270047);
    display: block;
    margin-top: 4px;
}

.fw-popup-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--fw-purple, #270047);
    border-radius: 50%;
    animation: fw-spin 1s linear infinite;
}

.fw-popup-buttons {
    display: flex;
    gap: 12px;
}

.fw-popup-btn-cancel {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid #ccc;
    background: white;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .fw-popup-btn-cancel:hover {
        border-color: #999;
        background-color: #f5f5f5;
    }

.fw-popup-btn-confirm {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #270047 0%, #4a0080 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .fw-popup-btn-confirm:hover {
        background: linear-gradient(135deg, #1a0030 0%, #3a0060 100%);
    }

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

    .popup-buttons button {
        width: 100%;
        justify-content: center;
    }

/* ===========================================
   INTERN AFLEVEREN - RIT INFO BAR
   =========================================== */
.rit-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a5f2a 0%, #2d8a3e 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

    .rit-info-bar.compact {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .rit-info-bar .separator {
        opacity: 0.5;
        margin: 0 8px;
    }

.rit-nummer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.rit-tijd {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===========================================
   INTERN AFLEVEREN - SECTION TITLE
   =========================================== */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* ===========================================
   INTERN AFLEVEREN - ADRES LIJST
   =========================================== */
.adres-lijst {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 80px;
    max-height: none !important;
    overflow: visible !important;
}

.adres-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .adres-card:hover:not(.afgeleverd) {
        border-color: #1976d2;
        box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    }

    .adres-card.afgeleverd {
        background: #e8f5e9;
        border-color: #4caf50;
    }

    .adres-card .status-icon {
        color: #999;
        transition: color 0.2s ease;
    }

    .adres-card:hover:not(.afgeleverd) .status-icon {
        color: #1976d2;
    }

.adres-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.adres-naam {
    font-weight: 600;
    color: #333;
}

.status-icon.success {
    color: #4caf50;
    font-size: 1.2rem;
}

.adres-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .adres-details small {
        color: #666;
        font-size: 0.85rem;
    }

.adres-extra {
    color: #888 !important;
    font-style: italic;
}

.adres-zendingen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.zending-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===========================================
   INTERN AFLEVEREN - LOCATIE INFO BAR
   =========================================== */
.locatie-info-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    gap: 8px;
}

    .locatie-info-bar.success {
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
        border: 1px solid #4caf50;
    }

    .locatie-info-bar.warning {
        background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
        border: 1px solid #ff9800;
    }

.locatie-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    flex: 1;
}

.locatie-info-bar.success .locatie-header {
    color: #2e7d32;
}

.locatie-info-bar.warning .locatie-header {
    color: #e65100;
}

.locatie-info-bar .warning-text {
    width: 100%;
    margin-top: 4px;
    color: #e65100;
    font-size: 0.85rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ===========================================
   INTERN AFLEVEREN - BARCODE ITEMS
   =========================================== */
.barcode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #4caf50;
}

    .barcode-item.warning {
        background: #fff3e0;
        border-left-color: #ff9800;
    }

    .barcode-item.status-pending {
        background: #fff8e1;
        border-left: 3px solid #ffc107;
    }

    .barcode-item.status-processing {
        background: #e3f2fd;
        border-left: 3px solid #2196f3;
    }

    .barcode-item.status-error {
        background: #ffebee;
        border-left: 3px solid #f44336;
    }

.barcode-kort {
    font-family: monospace;
    font-weight: 600;
    color: #333;
    min-width: 100px;
    font-size: 0.9rem;
}

.barcode-info {
    flex: 1;
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warning-icon {
    color: #ff9800;
}

.scanned-list.compact {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

    .scanned-list.compact::-webkit-scrollbar {
        width: 4px;
    }

    .scanned-list.compact::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 2px;
    }

    .scanned-list.compact::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }

/* ===========================================
   INTERN AFLEVEREN - WARNING POPUP
   =========================================== */
.warning-popup {
    max-width: 350px;
}

    .warning-popup .popup-icon {
        color: #ff9800;
        margin-bottom: 12px;
    }

.locatie-vergelijk {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
}

.vergelijk-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

    .vergelijk-item:not(:last-child) {
        border-bottom: 1px solid #e0e0e0;
    }

    .vergelijk-item .label {
        color: #666;
        font-size: 0.9rem;
    }

    .vergelijk-item .value {
        font-weight: 600;
        color: #333;
        text-align: right;
        max-width: 60%;
    }

/* ===========================================
   INTERN AFLEVEREN - VERWACHTE LOCATIES
   =========================================== */
.verwachte-locaties {
    margin-top: 20px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

    .verwachte-locaties > small {
        display: block;
        color: #666;
        margin-bottom: 8px;
        font-weight: 500;
    }

.hint-locatie {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .hint-locatie:hover {
        border-color: #1976d2;
        background: #e3f2fd;
    }

    .hint-locatie.readonly {
        cursor: default;
    }

        .hint-locatie.readonly:hover {
            border-color: #e0e0e0;
            background: white;
        }

    .hint-locatie i {
        color: #1976d2;
    }

    .hint-locatie span {
        flex: 1;
        font-weight: 500;
    }

    .hint-locatie small {
        color: #999;
        font-family: monospace;
        font-size: 0.8rem;
    }

/* ===========================================
   INTERN AFLEVEREN - SUCCESS SCREEN
   =========================================== */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    color: #4caf50;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.success-screen h2 {
    color: #2e7d32;
    margin-bottom: 8px;
}

.success-screen p {
    color: #666;
    margin-bottom: 24px;
}

.success-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a5f2a;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ===========================================
   INTERN AFLEVEREN - TREKKER INFO BAR
   =========================================== */
.trekker-info-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

/* ===========================================
   INTERN AFLEVEREN - SUCCESS BANNER
   =========================================== */
.success-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 16px 16px 16px;
}

    .success-banner i {
        font-size: 1.2rem;
    }

    .success-banner button {
        margin-left: auto;
        background: none;
        border: none;
        color: #2e7d32;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0 4px;
    }

/* ===========================================
   EXTRA BUTTON VARIANTS
   =========================================== */
.btn-danger {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-danger:hover {
        background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    }

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-secondary:hover {
        background: #e0e0e0;
    }

.btn-remove {
    background: none;
    border: none;
    color: #999;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .btn-remove:hover {
        background: #ffebee;
        color: #d32f2f;
    }

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #999;
    color: #666;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-outline-secondary:hover {
        background: #f5f5f5;
        border-color: #666;
        color: #333;
    }

/* ===========================================
   QUEUE STATUS INDICATORS
   =========================================== */
.fw-queue-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    color: #1565c0;
    font-size: 0.9rem;
}

    .fw-queue-status .fw-spinner-small {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
}

    .status-badge.pending {
        background: #fff3e0;
        color: #e65100;
    }

    .status-badge.error {
        background: #ffebee;
        color: #c62828;
        cursor: help;
    }

/* ===========================================
   SECONDARY ACTIONS
   =========================================== */
.secondary-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* ===========================================
   BLAZOR ERROR UI
   =========================================== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }


/* Verkeerde regio styling */
.fw-kar-card-verkeerde-regio {
    background: #fff3e0 !important;
    border-left: 4px solid #ff6d00 !important;
    opacity: 0.85;
}

.fw-kar-regio-warning {
    font-size: 1.8rem;
    display: block;
    text-align: center;
    line-height: 1;
}

.fw-kar-badge-regio {
    background: #ff6d00 !important;
    color: white !important;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================
   LANGUAGE SELECTOR - LanguageSelector.razor
   Voeg toe aan het EINDE van fw-styles.css
   ============================================ */

/* Container */
.fw-lang-selector {
    position: relative;
    display: flex;
    align-items: center;
}

/* Vlaggetje button */
.fw-lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

    .fw-lang-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .fw-lang-btn:active {
        background-color: rgba(255, 255, 255, 0.25);
    }

.fw-lang-flag {
    font-size: 1.5rem;
    line-height: 1;
}

/* Overlay (sluit dropdown bij klik erbuiten) */
.fw-lang-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* Dropdown menu */
.fw-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    min-width: 180px;
    animation: fw-lang-dropdown-open 0.15s ease-out;
}

@keyframes fw-lang-dropdown-open {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== LANGUAGE SELECTOR ===== */

.fw-language-selector {
    position: relative;
    z-index: 1001;
}

.fw-language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    padding: 0;
}

    .fw-language-btn:active {
        background-color: rgba(255, 255, 255, 0.3);
    }

.fw-language-flag-img {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: block;
}

.fw-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 200px;
    z-index: 1002;
    animation: fw-dropdown-in 0.15s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes fw-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fw-language-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: background-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

    .fw-language-option:last-child {
        border-bottom: none;
    }

    .fw-language-option:active,
    .fw-language-option:hover {
        background-color: #f0f0f0;
    }

.fw-language-active {
    background-color: #f5f0fa !important;
    font-weight: 600;
    color: #270047;
}

.fw-language-option-flag-img {
    width: 26px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.fw-language-option-name {
    flex: 1;
}

.fw-language-check {
    color: #270047;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.fw-language-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: transparent;
}