/* ========== CUSTOMER KIOSK LAYOUT ========== */

/* Override base.html messages na customer stranicama */
body > .messages {
    display: none !important;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    overflow-x: hidden;
    height: 100vh;
    touch-action: manipulation;
}

/* ========== KIOSK CONTAINER (VERTICAL LAYOUT) ========== */
.kiosk-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Za horizontal layout */
.kiosk-container.horizontal {
    flex-direction: column;
}

/* ========== MAIN CONTENT AREA ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* OBAVEZNO. Flex stavka po defaultu ima min-width:auto, tj. odbija se
       stisnuti ispod širine svog sadržaja. Traka kategorija je interno široka
       ~1016px (16 kategorija) i time je cijelu stranicu razvlačila na 1060px
       na mobitelu — sadržaj je izlazio izvan ekrana umjesto da traka scrolla.
       Vidi i .scroll-content niže; oba su potrebna. */
    min-width: 0;
}

/* ========== KIOSK HEADER ========== */
.kiosk-header {
    background: 
        linear-gradient(110deg, 
            rgba(255, 107, 53, 0.18) 0%, 
            rgba(247, 147, 30, 0.15) 10%, 
            rgba(253, 200, 48, 0.12) 20%,
            rgba(255, 255, 255, 0.02) 40%,
            transparent 60%);
    padding: 16px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    position: relative;
    overflow: hidden;
}

.kiosk-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 800px 200px at 0% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 600px 150px at 25% 50%, rgba(247, 147, 30, 0.12) 0%, transparent 65%);
    animation: wave-flow 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes wave-flow {
    0%, 100% { 
        transform: translateX(0) scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: translateX(40px) scale(1.1);
        opacity: 1;
    }
}

.header-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
    z-index: 1;
}

.header-title span {
    color: #c2410c;
}

/* Lijevo: "natrag" + jezik (partials/jezik.html). */
.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Izbornik jezika (partials/jezik.html): zatvoren je 🌐 HR ▾ u istom tihom
   jeziku kao pločica stola desno (.table-chip) — postavka, ne glavna radnja.
   Popis je position: fixed jer zaglavlje ima overflow: hidden (valovita
   pozadina); smješta ga i zatvara js/customer-base.js. */
.lang-menu {
    position: relative;
}

/* flex, ne inline-flex: kao inline element sjedio bi na retku s fontom
   .header-title (32px) i spuštao se ispod pločice stola i košarice. */
.lang-menu__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(230, 126, 34, 0.45);
    color: #2c3e50;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

.lang-menu__toggle::-webkit-details-marker {
    display: none;
}

.lang-menu__toggle .fa-globe {
    color: #c2410c;
    font-size: 14px;
}

.lang-menu__chev {
    font-size: 10px;
    color: #7a8590;
    transition: transform 0.15s ease;
}

.lang-menu[open] .lang-menu__chev {
    transform: rotate(180deg);
}

.lang-menu__list {
    position: fixed;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.lang-menu__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;           /* dodirna površina */
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #2c3e50;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.lang-menu__opt:hover {
    background: #fff4ea;
}

.lang-menu__opt.is-current {
    color: #c2410c;
    cursor: default;
}

.lang-menu__opt.is-current:hover {
    background: transparent;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ── Pločica sa stolom (uz košaricu u zaglavlju) ──────────────────────────
   Namjerno ista građa kao gumb košarice pored nje (.cart-button u items.css,
   .header-cart-btn u category.css): bijela pilula, drop-shadow — ne box-shadow, cijelo zaglavlje koristi filter. Tako se
   dvoje čita kao par ("tvoj stol — tvoja košarica"), a ne kao dvije
   nepovezane stvari zalijepljene jedna do druge.

   Razlika je namjerna i jedna: pločica je PODATAK, ne gumb. Zato nema hover
   scale ni cursor: pointer — ništa ne obećava klik kojeg nema.

   Hijerarhija unutra: broj je ono što gost provjerava ("je li ovo moj stol"),
   pa je on velik i tamnoplav kao naslovi u meniju; riječ "Stol" je samo
   etiketa, pa je manja i prigušeno narančasta.

   white-space: nowrap — "Stol 5" se ne smije prelomiti u dva retka i razvući
   visinu zaglavlja; flex-shrink: 0 iz istog razloga kad je logo širok.       */
.table-chip {
    display: inline-flex;
    align-items: center;
    /* Namjerno NIŽA i tiša od gumba košarice pored sebe. Košarica je jedina
       radnja u zaglavlju i bez nje se narudžba ne može poslati, pa ona nosi
       puni tretman: sjena i velika ikona. Pločica je
       samo podatak ("sjediš za stolom 5"), pa ima tanak rub, nema sjenu i ne
       raste u visinu reda — inače dvoje izgleda kao dva ravnopravna gumba i
       oko ne zna gdje je radnja.

       align-self: center (a ne stretch) drži je nižom bez obzira koliko je
       visok gumb košarice na pojedinoj stranici. */
    align-self: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(230, 126, 34, 0.45);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.table-chip__icon {
    font-size: 11px;
    color: #c2410c;
    opacity: 0.75;
}

/* Etiketa: sitna i prigušena, samo da broj ima značenje. */
.table-chip__label {
    font-size: 11px;
    font-weight: 600;
    color: #8a5a2b;
}

/* Broj: jedino što se stvarno čita. Tamnoplava je ista koja nosi nazive
   artikala — pločica time pripada meniju, ali ostaje tiša od košarice. */
.table-chip__number {
    font-size: 14px;
    font-weight: 800;
    color: #2c3e50;
}

/* ========== CONTENT + ORDER PANEL LAYOUT ========== */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px 40px 40px;
    /* Isti razlog kao kod .main-content — ovo je flex stavka u .content-wrapper
       (flex-direction: row), pa i ovdje min-width:auto blokira stiskanje. */
    min-width: 0;
}

/* ========== ORDER PANEL (KOŠARICA SIDEBAR) ========== */
.order-panel {
    width: 380px;
    background: white;
    box-shadow: -2px 0 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    z-index: 90;
}

.order-header {
    padding: 30px 24px;
    border-bottom: 2px solid #f1f3f5;
}

.order-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.order-type {
    font-size: 16px;
    color: #6c757d;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.order-empty {
    text-align: center;
    padding: 60px 20px;
    color: #adb5bd;
}

.order-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.order-empty-text {
    font-size: 18px;
    font-weight: 500;
}

.order-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
}

.order-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.order-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #c2410c;
}

.order-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-display {
    font-size: 18px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

/* ========== ORDER FOOTER ========== */
.order-footer {
    padding: 24px;
    border-top: 2px solid #f1f3f5;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff3e6;
    border-radius: 12px;
}

.order-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #6c757d;
}

.order-total-amount {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== LANGUAGE SELECTOR (container) ========== */
.language-selector {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 12px;
}

/* .logo i .restaurant-name koristi costumer_start.html. Ostatak ove sekcije
   (traka kategorija, customer_base_horizontal.html) obrisan 2026-10-21. */
.logo {
    font-size: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.restaurant-name {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========== PRODUCT GRID (MENU ITEMS) ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 16px;
    min-height: 40px;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: #c2410c;
    margin-bottom: 16px;
}

/* ========== CATEGORY TABS ========== */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 14px 28px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tab:hover {
    border-color: #c2410c;
    color: #c2410c;
}

.category-tab.active {
    background: #c2410c;
    border-color: #c2410c;
    color: white;
}

/* ========== SCROLLBAR STILOVI ========== */
.scroll-content::-webkit-scrollbar,
.order-items::-webkit-scrollbar {
    width: 8px;
}

.scroll-content::-webkit-scrollbar-track,
.order-items::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.scroll-content::-webkit-scrollbar-thumb,
.order-items::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

.scroll-content::-webkit-scrollbar-thumb:hover,
.order-items::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* ========== ANIMATIONS ========== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .order-panel {
        width: 320px;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
    }

    .kiosk-container {
        height: auto;
        min-height: 100vh;
    }

    .main-content {
        overflow: visible;
    }

    .content-wrapper {
        overflow: visible;
    }

    .kiosk-header {
        padding: 10px 14px;
    }

    .header-actions {
        gap: 8px;
    }

    /* Na mobitelu je prostor uz logo najuži — pločica se stišće još malo,
       ali ostaje čitka. */
    .table-chip {
        padding: 5px 9px;
        gap: 4px;
    }

    .table-chip__icon {
        font-size: 10px;
    }

    .table-chip__label {
        font-size: 10px;
    }

    .table-chip__number {
        font-size: 13px;
    }

    .scroll-content {
        padding: 0;
        overflow: visible;
    }

    .scroll-content::-webkit-scrollbar {
        display: none;
    }
}
