﻿/* --- GLOBAL --- */
/* --- GLOBAL --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px; /* jednotná veľkosť */
    line-height: 1.5; /* lepšia čitateľnosť */
    background: #121212;
    color: #e0e0e0;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    max-width: 100%;
    overflow-x: hidden; /* zabráni horizontálnemu scrollu */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HLAVNÉ MENU --- */
.menu-title {
    text-align: center;
    font-size: 1.6rem; /* menšie písmo */
    font-weight: bold;
    margin: 15px 0; /* menšie okraje */
    color: #e74c3c;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1600px; /* max 5 stĺpcov */
    margin: 0 auto;
    justify-content: center; /* 👉 zarovná grid do stredu */
    align-content: start; /* 👉 aby nezačínal úplne hore */
}

    .menu-grid:has(.menu-item:only-child) {
        grid-template-columns: 1fr; /* jedna dlaždica cez celý stĺpec */
        max-width: 300px; /* ale obmedzíme max šírku */
        margin: 0 auto; /* centrovanie */
    }


.menu-item {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

    .menu-item:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0,0,0,0.9);
    }

    .menu-item img {
        width: 100%;
        height: 180px; /* pevná výška */
        object-fit: cover; /* zachová proporcie, vyplní box */
        filter: brightness(0.9);
    }

    .menu-item span {
        padding: 14px;
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        color: #fff;
    }

/* --- PIZZE GRID --- */
.pizza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.pizza-card {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

    .pizza-card:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0,0,0,0.9);
    }

.pizza-img {
    width: 100%;
    height: 200px; /* pevná výška */
    object-fit: cover;
    filter: brightness(0.95);
}

.pizza-info {
    padding: 12px;
}

    .pizza-info h3 {
        margin: 0 0 8px 0;
        font-size: 1.2rem;
        font-weight: bold;
        color: #fff;
    }

.pizza-price {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 1px;
}

.pizza-desc {
    font-size: 0.9rem;
    color: #bbb;
}

.pizza-allergens {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 2px;
    font-style: italic;
}

/* --- TOPBAR --- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
    z-index: 1000;
}

/* --- ĽAVÁ ČASŤ (logo / back icon) --- */
.topbar-left {
    display: flex;
    align-items: center;
}

    .topbar-left img {
        height: 42px; /* mierne väčšie než predtým, pre vizuálnu rovnováhu */
        cursor: pointer;
        filter: brightness(0.92);
        position: relative;
        top: 1px; /* drobné vycentrovanie */
        transition: transform 0.15s ease, filter 0.2s ease;
    }

        .topbar-left img:hover {
            transform: scale(1.04);
            filter: brightness(1);
        }

/* --- PRAVÁ ČASŤ (košík, badge, login/logout) --- */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.2rem;
    color: #fff;
}

    /* Každý prvok klikateľný má jemný feedback */
    .topbar-right .cart,
    .topbar-right .login,
    .topbar-right .user-badge {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 8px;
        border-radius: 8px;
        transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
    }

        .topbar-right .cart:hover,
        .topbar-right .login:hover,
        .topbar-right .user-badge:hover {
            transform: scale(1.08);
            background: #2a2a2a;
        }

        .topbar-right .cart:active,
        .topbar-right .login:active,
        .topbar-right .user-badge:active {
            transform: scale(0.9);
            background: #333;
        }

    /* --- USER BADGE --- */
    .topbar-right .user-badge {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #e74c3c;
        color: #fff;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }

/* --- IKONY --- */
.topbar i {
    font-size: 1.5rem;
    color: #e0e0e0;
    transition: color 0.15s ease;
}

    .topbar i:hover {
        color: #e74c3c;
    }

/* --- KOŠÍK --- */
.cart {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .cart i {
        font-size: 1.45rem;
    }

.cart-sum {
    font-size: 1rem;
    font-weight: 500;
}

/* --- BACK ICON --- */
.back-icon {
    font-size: 1.9rem;
    color: #e74c3c;
    transition: transform 0.15s ease;
}

    .back-icon:hover {
        transform: scale(1.1);
    }




.cart {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

.main-content {
    padding-top: 60px;
    flex: 1; /* vyplní dostupný priestor medzi topbarom a footerom */
}

.footer {
    background: #1c1c1c;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px solid #333;
    margin-top: auto; /* odsunie footer dolu */
    position: sticky; /* bude vždy na spodku */
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900; /* nižšie ako topbar aj cookie banner */
}

    .footer a {
        color: #e74c3c;
        margin: 0 4px;
        text-decoration: none;
    }

        .footer a:hover {
            text-decoration: underline;
        }


.footer-links {
    display: flex;
    flex-wrap: wrap; /* ak je málo miesta, zalomí */
    justify-content: center;
    gap: 6px; /* namiesto "|" použijeme medzery */
}

    .footer-links a {
        white-space: nowrap; /* nech sa texty nezalamujú uprostred */
    }


/* --- CLICK (ACTIVE) EFEKT --- */
.menu-item:active,
.pizza-card:active {
    transform: scale(0.95);
    filter: brightness(0.8);
    transition: transform 0.05s ease, filter 0.05s ease;
}

/* --- RIPPLE EFEKT --- */
.menu-item::after,
.pizza-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.menu-item:active::after,
.pizza-card:active::after {
    transform: scale(40);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.8s ease;
}

/* --- RESPONSIVITA --- */
@media (max-width: 600px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .pizza-grid {
        grid-template-columns: 1fr;
    }

    .menu-item img {
        height: 160px;
    }

    .menu-item span {
        font-size: 1rem;
        padding: 10px;
    }

    .pizza-img {
        height: 160px;
    }

    .menu-title {
        font-size: 1.8rem;
        margin: 20px 0 10px 0;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .menu-grid,
    .pizza-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .menu-grid,
    .pizza-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1201px) and (max-width: 1500px) {
    .menu-grid,
    .pizza-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1501px) {
    .menu-grid,
    .pizza-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Layout pre dashboard panely (extras-layout) */
.extras-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 🟢 280px minimálna šírka boxu */
    gap: 20px;
    padding: 20px;
}

.pizza-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
}

.pizza-detail-img {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pizza-detail-info {
    text-align: center;
}

    .pizza-detail-info h2 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .pizza-detail-info .pizza-price {
        font-size: 1.3rem;
        color: #e74c3c;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .pizza-detail-info .pizza-desc {
        font-size: 1rem;
        color: #bbb;
        margin-bottom: 8px;
    }

    .pizza-detail-info .pizza-allergens {
        font-size: 0.9rem;
        color: #aaa;
        font-style: italic;
    }

.extras-panel {
    flex: 2;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 5px;
}

    .extras-panel h3 {
        margin: 10px 5px 10px 5px;
    }

/* Sumár pod prílohami */
.extras-summary {
    margin-top: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

.extra-chip {
    display: inline-block;
    background: #444;
    color: #e0e0e0;
    border-radius: 12px;
    padding: 4px 10px;
    margin: 2px;
    font-size: 0.9rem;
}

/* Tlačidlo */
.extras-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-add {
    padding: 12px 24px;
    font-size: 1.2rem;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .btn-add:hover {
        background: #ff6655;
    }

    .btn-add:disabled {
        background: #555;
        color: #aaa;
        cursor: not-allowed;
        opacity: 0.7;
    }

/* Responzívne: mobily */
@media (max-width: 768px) {
    .extras-layout {
        flex-direction: column;
    }

    .pizza-panel, .extras-panel {
        width: 100%;
    }
}

/* Badge na cenu */
.badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    margin-left: 8px;
}

.total {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.extras-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

    .extras-list li {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
        border-bottom: 1px solid #444;
        font-size: 0.95rem;
    }

        .extras-list li:last-child {
            border-bottom: none;
        }

.price {
    color: #e74c3c;
    font-weight: bold;
}

.no-extras {
    color: #bbb;
    font-style: italic;
    margin: 5px 0 10px 0;
}

.total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
    font-size: 1.1rem;
}

    .total-row .badge {
        margin-left: 10px;
        font-size: 1.2rem;
        padding: 6px 14px;
    }

.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    gap: 12px;
    justify-content: left;
}

@media (max-width: 600px) {
    .extras-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Skryť natívny checkbox */
.extras-item input[type="checkbox"] {
    display: none;
}

/* Default stav */
.extras-item {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: #2a2a2a;
    padding: 0 0 0 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
    overflow: hidden;
    min-height: 35px;
}

    /* Hover */
    .extras-item:hover {
        background: #3a3a3a;
    }

    /* Checked stav – celé políčko je červené */
    .extras-item.active {
        background: #e74c3c;
        color: #fff;
    }

    /* Text */
    .extras-item span {
        flex: 1;
        text-align: left;
        word-break: break-word;
        line-height: 1.3;
        display: flex;
        align-items: center;
        padding: 0 0px;
    }

    /* Badge cena – vždy červený */
    .extras-item .price {
        font-size: 0.85rem;
        background: #e74c3c; /* fixne červený */
        color: #fff;
        max-width: 55px; /* fixná šírka */
        text-align: center;
        border-radius: 0 6px 6px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        flex-shrink: 0;
    }

    /* Aktívny stav – celé políčko červené, text biely */
    .extras-item.active {
        background: #e74c3c;
        color: #fff;
    }

        /* ALE – badge nech zostane vždy červený */
        .extras-item.active .price {
            background: #c0392b; /* trošku tmavšia červená pre kontrast */
            color: #fff;
        }

    /* Disabled stav */
    .extras-item.disabled {
        background: #444; /* sivý podklad */
        color: #999; /* vyblednutý text */
        cursor: not-allowed; /* zablokovaná ruka */
        opacity: 0.6; /* celkové zosvetlenie */
    }

        /* Badge v disabled stave */
        .extras-item.disabled .price {
            background: #666; /* sivý badge */
            color: #ccc;
        }


  


    



.checkout-form {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px 15px;
    align-items: center;
}

    .checkout-form label {
        font-weight: bold;
    }

    .checkout-form input,
    .checkout-form select {
        width: 98%;
        padding: 10px 10px 10px 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #222;
        color: #fff;
    }

        .checkout-form input:focus,
        .checkout-form select:focus {
            border-color: #e53935;
            outline: none;
        }

    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        width: 98%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #222;
        color: #fff;
    }



@media (max-width: 600px) {
    .checkout-form {
        grid-template-columns: 1fr;
    }

        .checkout-form label {
            justify-self: start;
        }
}

/* animácia košíka */
.cart-bump {
    animation: bump 0.4s ease;
}

@keyframes bump {
    0% {
        transform: scale(1);
    }

    20% {
        transform: scale(1.2);
        color: #e74c3c;
    }

    50% {
        transform: scale(0.95);
        color: #fff176;
    }

    100% {
        transform: scale(1);
        color: inherit;
    }
}

.cart-sum.bumped {
    color: #e74c3c;
    font-weight: bold;
    transition: color 0.4s ease;
}

.dark-toast {
    border: 1px solid #e74c3c;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.7);
    padding: 12px 20px;
    font-size: 1rem;
}

/* --- ADMIN TABUĽKA --- */



/* Tlačidlá v tabuľke */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 6px;
}

    .btn-action.edit {
        background: #3498db;
        color: #fff;
    }

    .btn-action.delete {
        background: #e74c3c;
        color: #fff;
    }

    .btn-action:hover {
        opacity: 0.9;
    }

/* Layout editor */
.editor-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Ľavý panel */
.editor-left {
    flex: 1;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.editor-img {
    width: 100%;
    max-width: 260px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
}

.editor-info {
    width: 100%;
}

    .editor-info label {
        display: block;
        font-weight: bold;
        margin-top: 10px;
        margin-bottom: 4px;
        color: #ddd;
    }

    .editor-info input,
    .editor-info textarea {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #444;
        border-radius: 4px;
        background: #222;
        color: #fff;
        font-size: 0.95rem;
    }

    .editor-info textarea {
        min-height: 80px;
        resize: vertical;
    }

/* Pravý panel */
.editor-right {
    flex: 2;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
}

/* Skupiny 2×2 */
.groups-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.group-box {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 8px;
}

    .group-box h4 {
        margin-top: 0;
        color: #e74c3c;
        margin-bottom: 10px;
    }

    .group-box label {
        display: block;
        font-weight: bold;
        margin-top: 8px;
        margin-bottom: 4px;
        color: #ccc;
    }

    .group-box input,
    .group-box textarea {
        width: 100%;
        padding: 6px 8px;
        border: 1px solid #444;
        border-radius: 4px;
        background: #222;
        color: #fff;
        font-size: 0.9rem;
    }

        .group-box input[type="checkbox"] {
            width: auto;
            transform: scale(1.2);
            margin-top: 6px;
        }

/* Akcie */
.editor-actions {
    text-align: right;
    margin-top: 20px;
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-left: 8px;
}

    .btn-action.save {
        background: #2ecc71;
        color: #fff;
    }

    .btn-action.cancel {
        background: #7f8c8d;
        color: #fff;
    }

    .btn-action:hover {
        opacity: 0.9;
    }

/* Responzivita */
@media (max-width: 900px) {
    .editor-layout {
        flex-direction: column;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }
}

.editor-toolbar {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    position: sticky;
    top: 0px; /* pod topbar */
    background: #1c1c1c;
    padding: 8px 2px;
    z-index: 100;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    overflow-x: auto; /* povolí horizontálny scroll */
    scrollbar-width: none; /* Firefox */
}

    .editor-toolbar::-webkit-scrollbar {
        display: none; /* Chrome, Edge, Safari */
    }


.ribbon-group {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    border-right: 1px solid #333;
    flex-shrink: 0; /* nedovolí zmenšiť */
}

    .ribbon-group:last-child {
        border-right: none;
    }

/* Ribbon tlačidlo */
.btn-ribbon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 70px;
    border: none;
    border-radius: 6px;
    background: #2a2a2a;
    cursor: pointer;
    font-size: 0.8rem;
    color: #e0e0e0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

    .btn-ribbon:hover {
        background: #333;
        transform: translateY(-2px);
        box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    }

    .btn-ribbon:disabled {
        background: #444;
        color: #777;
        cursor: not-allowed;
    }



    .btn-ribbon i {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .btn-ribbon.add i {
        color: #2ecc71;
    }

    .btn-ribbon.edit i {
        color: #3498db;
    }

    .btn-ribbon.delete i {
        color: #e74c3c;
    }


.admin-table-container {
    height: calc(100vh - 200px);
    /* 100vh = celé okno
       -60px topbar
       -80px ribbon (prispôsob podľa reálnej výšky ribbonu)
    */
    overflow-y: auto;
    border-radius: 8px;
    position: relative; /* sticky ostane fungovať */
}


/* Tabuľka */
.admin-table {
    width: 100%;
    border-collapse: separate; /* separate kvôli sticky */
    border-spacing: 0;
}

    /* Sticky header */
    .admin-table thead th {
        position: sticky;
        top: 0;
        background: #2a2a2a; /* farba hlavičky */
        z-index: 5;
    }

    /* Riadočky */
    .admin-table td,
    .admin-table th {
        padding: 10px 12px;
        border-bottom: 1px solid #333;
        text-align: left;
        color: #e0e0e0;
    }

    /* Hover efekt */
    .admin-table tr:hover {
        background: #292929;
    }

    /* Označený riadok */
    .admin-table tr.selected {
        background: #333 !important;
    }

.topbar i {
    font-size: 1.6rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .topbar i:hover {
        color: #e74c3c;
    }

.back-icon {
    font-size: 1.8rem;
    color: #e74c3c; /* zvýraznená */
}

.readonly-textarea {
    background-color: #2c2c2c; /* rovnaké pozadie ako tvoje inputy */
    border: 1px solid #444; /* rovnaký border */
    color: #e74c3c; /* červený text obsahu */
    font-weight: bold;
    font-size: 14px;
    font-family: inherit;
    border-radius: 4px;
    padding: 6px 10px;
    resize: none; /* vypne resize rukoväť */
}

.status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: bold;
    color: white;
    font-size: 0.9em;
}

    .status-badge.new {
        background-color: #f39c12; /* žltá/oranžová */
    }

    .status-badge.accepted {
        background-color: #3498db; /* modrá */
    }

    .status-badge.done {
        background-color: #27ae60; /* zelená */
    }

    .status-badge.cancelled {
        background-color: #e74c3c; /* červená */
    }

/* Flash efekt pre nové objednávky */
@keyframes flashHighlight {
    0% {
        background-color: #f39c12;
    }

    50% {
        background-color: #2a2a2a;
    }

    100% {
        background-color: #f39c12;
    }
}

.admin-table tr.new-order-flash {
    animation: flashHighlight 2s ease-in-out infinite;
}

.admin-table tr.new-order-static {
    background-color: #3a2a12 !important;
}

/* --- Flash efekt pre nové objednávky --- */
@keyframes flashRow {
    0% {
        background-color: #2a2a2a;
    }

    50% {
        background-color: #f39c12;
    }
    /* oranžová na upozornenie */
    100% {
        background-color: #2a2a2a;
    }
}

.new-order-flash {
    animation: flashRow 1s ease-in-out infinite;
}

/* Po 10s necháme len zvýraznený podklad */
.new-order-highlight {
    background-color: #3a3a3a !important;
}

/* --- Hover efekt pre nové aj bežné riadky --- */
.admin-table tr:hover {
    background: #444 !important; /* tmavší hover */
    cursor: pointer;
}

/* --- Kliknutý (selected) stav --- */
.admin-table tr.selected {
    background: #555 !important;
}

.summary-row {
    display: flex;
    justify-content: space-between; /* roztiahne text a cenu na kraje */
    padding: 4px 0;
    font-size: 0.95rem;
}

    .summary-row .price {
        text-align: right;
        min-width: 80px; /* aby sa čísla zarovnali krajšie pod sebou */
    }

.thankyou-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* zarovná do stredu */
    justify-content: center;
    text-align: center; /* text tiež na stred */
    margin-top: 80px;
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

    .thankyou-container h2 {
        color: #e74c3c;
        margin-bottom: 20px;
    }

.thankyou-actions {
    margin-top: 20px;
}



.search-box {
    display: flex;
    align-items: center; /* 🔑 zarovnanie na stred vertikálne */
    justify-content: flex-start;
    background: #2a2a2a;
    padding: 6px 10px;
    border-radius: 6px;
    margin-left: 20px;
    min-width: 220px;
    height: 38px; /* 🔑 fixná výška aby to sedelo */
}


    .search-box i {
        color: #aaa;
        margin-right: 8px;
    }

    .search-box input {
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        width: 100%;
        font-size: 0.9rem;
    }

/* --- DATE/TIME PICKERY v archíve --- */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    padding: 6px 8px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 140px; /* nech sú jednotné */
}

    /* Fokus */
    input[type="date"]:focus,
    input[type="time"]:focus,
    input[type="datetime-local"]:focus {
        border-color: #e74c3c;
        box-shadow: 0 0 6px rgba(231, 76, 60, 0.6);
        outline: none;
    }

    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        filter: invert(1); /* čisto biela */
        cursor: pointer;
    }


    /* Disabled stav */
    input[type="date"]:disabled,
    input[type="time"]:disabled,
    input[type="datetime-local"]:disabled {
        background: #2a2a2a;
        color: #777;
        cursor: not-allowed;
    }

.login-container {
    text-align: left; /* všetko doľava */
    width: 100%;
    max-width: 400px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

    .login-form label {
        font-weight: bold;
        margin-bottom: 4px;
        color: #e0e0e0;
    }

    .login-form input {
        width: 100%;
        padding: 10px;
        border: 1px solid #444;
        border-radius: 6px;
        background: #222;
        color: #fff;
    }

.full-width {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: -6px;
    margin-bottom: 8px;
    grid-column: 2 / 3; /* pod inputom */
}


.register-link {
    margin-top: 30px; /* väčší odstup od formulára */
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Full-width fix pre login/register tlačidlá */
.btn-action.full-width,
.btn-add.full-width {
    width: 100%;
    margin: 10px 0 0 0; /* hore malý odstup, inak nulové okraje */
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    display: block; /* aby ignoroval inline marginy */
}

.login-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 1rem;
}

    .login-form select:focus {
        border-color: #e74c3c;
        outline: none;
    }


.account-hint {
    margin-top: 20px;
    padding: 14px 16px;
    background: #1e1e1e; /* tmavé pozadie ako panely */
    border: 1px solid #333; /* tmavý border */
    border-radius: 8px;
    font-size: 0.9rem;
    color: #ccc; /* svetlosivý text */
}

    .account-hint p {
        margin: 6px 0;
    }

    .account-hint .btn-link {
        background: none;
        border: none;
        color: #e74c3c; /* červený akcent ako celé UI */
        cursor: pointer;
        text-decoration: underline;
        padding: 0;
        font-weight: bold;
    }

        .account-hint .btn-link:hover {
            color: #ff6655; /* svetlejšia červená pri hover */
        }

.user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e74c3c; /* červená ako akcent */
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: default;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    transition: background 0.2s ease;
}

    .user-badge:hover {
        background: #ff6655; /* hover efekt */
    }

.sms-message-box {
    width: 100%;
    min-height: 200px;
    padding: 14px 18px;
    background: #2c2c2c;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.5;
    white-space: pre-wrap; /* zachová zalomenia a viacriadkový text */
    word-break: break-word; /* zalomí dlhé slová/čísla */
    overflow-y: auto; /* ak je text dlhý, zobrazí scrollbar */
}

.phone-input {
    display: flex;
    gap: 8px; /* medzera medzi selectom a inputom */
    align-items: stretch; /* oba prvky natiahneme na rovnakú výšku */
}

    .phone-input select {
        padding-left: 32px; /* rezerva na vlajku */
        padding-right: 10px; /* trošku miesta napravo */
        background-repeat: no-repeat;
        background-position: 6px center; /* vlajka viac k ľavému okraju */
        background-size: 20px auto;
        width: auto; /* prispôsobí sa obsahu (+421) */
        min-width: 70px; /* aby sa nezúžil príliš */
        font-size: 14px;
        line-height: normal; /* nech sa neruší výška textu */
    }

        .phone-input select.flag-sk {
            background-image: url('/images/sk.png');
        }

        .phone-input select.flag-cz {
            background-image: url('/images/cz.png');
        }

    .phone-input input {
        flex: 1; /* zaberie zvyšok miesta */
        font-size: 14px;
        padding: 6px 8px;
        line-height: normal;
    }

.checkout-form .phone-input {
    width: 98%;
    display: flex;
    gap: 8px;
}

    .checkout-form .phone-input select {
        padding-left: 32px;
        padding-right: 10px;
        background-repeat: no-repeat;
        background-position: 6px center;
        background-size: 20px auto;
        min-width: 70px;
        font-size: 14px;
        height: 36px;
        line-height: normal;
    }

        .checkout-form .phone-input select.flag-sk {
            background-image: url('/images/sk.png');
        }

        .checkout-form .phone-input select.flag-cz {
            background-image: url('/images/cz.png');
        }

    .checkout-form .phone-input input {
        flex: 1;
        font-size: 14px;
        padding: 6px 8px;
        height: 36px;
        line-height: normal;
    }

.register-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.register-layout {
    display: flex;
    gap: 20px;
}

    .register-layout .pizza-panel {
        flex: 2;
        background: #1e1e1e;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    }

    .register-layout .extras-panel {
        flex: 1;
        background: #1e1e1e;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    }

@media (max-width: 768px) {
    .register-layout {
        flex-direction: column;
    }
}

.profile-wrapper {
    max-width: 1100px; /* obmedzí šírku celého layoutu */
    margin: 0 auto;
    padding: 20px;
}



/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2a2a2a;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #444;
    z-index: 2000;
    font-size: 0.9rem;
    flex-wrap: wrap; /* 👉 ak sa nezmestí, zlomí sa */
    gap: 10px;
}

.cookie-text {
    color: #e0e0e0;
    flex: 1; /* 👉 text má priestor */
}

    .cookie-text a {
        color: #e74c3c;
        font-weight: bold;
        text-decoration: underline;
    }

        .cookie-text a:hover {
            color: #ff6655;
        }

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .cookie-actions button {
        background: #e74c3c;
        border: none;
        padding: 6px 14px;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: background 0.2s ease;
    }

        .cookie-actions button:hover {
            background: #ff6655;
        }


.checkout-links {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
    margin-top: 12px;
}

    .checkout-links a {
        color: #e74c3c; /* červená ako akcent */
        font-weight: bold;
        text-decoration: underline;
    }

        .checkout-links a:hover {
            color: #ff6655; /* svetlejšia červená pri hover */
        }


@media (max-width: 600px) {
    .hours-table th,
    .hours-table td {
        font-size: 0.85rem;
        padding: 6px;
    }
}


/* Desktop only */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: grid;
        gap: 16px;
        padding: 16px;
    }

    .order-card {
        background: #1e1e1e;
        border-radius: 10px;
        padding: 14px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.6);
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

        .order-card:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(0,0,0,0.8);
        }

    .order-header {
        font-size: 1.1rem;
        margin-bottom: 8px;
        color: #e74c3c;
    }

    .order-body p {
        margin: 4px 0;
        font-size: 0.95rem;
        color: #ddd;
    }
}

.hours-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

    .hours-container h2 {
        text-align: center;
        color: #e74c3c;
        margin-bottom: 20px;
    }

.hours-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

    .hours-table th,
    .hours-table td {
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid #444;
        font-size: 0.95rem;
    }

    .hours-table th {
        background: #333;
        color: #e74c3c;
        font-weight: bold;
    }

    .hours-table td {
        color: #e0e0e0;
    }

    /* Inputs */
    .hours-table input[type="time"] {
        width: 90px;
        min-width: 80px;
        max-width: 100px;
        background: #222;
        border: 1px solid #444;
        border-radius: 4px;
        color: #fff;
        padding: 6px;
        font-size: 0.9rem;
        text-align: center;
    }

        .hours-table input[type="time"]:focus {
            border-color: #e74c3c;
            outline: none;
        }

/* Flex kontajner pre rozsahy */
.time-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .time-range .dash {
        color: #e0e0e0;
        font-weight: bold;
    }

/* Mobile layout */
@media (max-width: 700px) {
    .time-range {
        flex-direction: column;
        gap: 4px;
    }

        .time-range .dash {
            display: none; /* pomlčka sa schová */
        }

    .hours-table input[type="time"] {
        width: 100%;
        margin: 0;
    }
}


.today-row {
    background: #3a3a3a;
    font-weight: bold;
    color: #ff6655;
}

.admin-tools {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

    .admin-tools label {
        font-weight: bold;
        color: #e0e0e0;
    }

    .admin-tools .form-control {
        padding: 8px 10px;
        border: 1px solid #444;
        border-radius: 4px;
        background: #222;
        color: #fff;
        font-size: 0.95rem;
    }

    .admin-tools .btn-add {
        padding: 10px 20px;
        font-size: 1rem;
    }


/* --- SKELETON LOADER --- */
.skeleton {
    position: relative;
    background: #2a2a2a;
    overflow: hidden;
}

    .skeleton::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%; /* začiatok úplne mimo */
        height: 100%;
        width: 100%; /* pruh cez celý obrázok */
        background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.2), transparent );
        animation: shimmer 1.5s infinite;
    }

@keyframes shimmer {
    100% {
        transform: translateX(200%); /* prejde celý box a ešte kúsok */
    }
}

/* Pevné výšky skeletonov podľa obrázkov */
.menu-item .skeleton {
    width: 100%;
    height: 180px; /* rovnaké ako .menu-item img */
}

.pizza-card .skeleton {
    width: 100%;
    height: 200px; /* rovnaké ako .pizza-img */
}

/* Mobilné varianty */
@media (max-width: 600px) {
    .menu-item .skeleton {
        height: 160px; /* rovnaké ako .menu-item img na mobile */
    }

    .pizza-card .skeleton {
        height: 160px; /* rovnaké ako .pizza-img na mobile */
    }
}

.kpi-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kpi-card {
    background: #1e1e1e;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #e0e0e0;
}

    .kpi-card i {
        color: #e74c3c;
        margin-right: 10px;
        font-size: 1.2rem;
    }

    .kpi-card strong {
        font-size: 1rem;
        color: #fff;
    }




.settings-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* min 280px, inak 1fr */
    gap: 20px;
    padding: 20px;
}


.settings-column {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

    .settings-column h3 {
        margin-top: 0;
        margin-bottom: 12px;
        color: #e74c3c;
    }

    .settings-column label {
        display: block;
        font-weight: bold;
        margin-top: 10px;
        margin-bottom: 4px;
        color: #ccc;
    }

    .settings-column input[type="text"] {
        width: 100%;
        padding: 6px 8px;
        border: 1px solid #444;
        border-radius: 4px;
        background: #222;
        color: #fff;
    }

.notify-textarea {
    width: 100%;
    min-height: 200px;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
    resize: vertical;
}

.date-range-select {
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-size: 0.9rem;
}

    .date-range-select:focus {
        border-color: #e74c3c;
        outline: none;
    }

#components-reconnect-modal {
    display: none;
    transition: visibility 0s linear 1000ms;
}

    /* zobrazí sa pri výpadku */
    #components-reconnect-modal.components-reconnect-show,
    #components-reconnect-modal.components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-rejected {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.85);
        position: fixed;
        inset: 0;
        z-index: 20000;
        animation: fadeInReconnect 0.3s ease forwards;
    }

@keyframes fadeInReconnect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reconnect-container {
    background: #1e1e1e;
    color: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(231,76,60,0.4);
    border: 1px solid #e74c3c;
    max-width: 320px;
}

.reconnect-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #e74c3c;
}

.reconnect-sub {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 20px;
}

/* spinner stále pri pokuse o reconnect */
.reconnect-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #333;
    border-top-color: #e74c3c;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

/* tlačidlo je defaultne skryté */
.reconnect-btn {
    display: none;
    margin-top: 20px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #e74c3c;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

    .reconnect-btn:hover {
        background: #c0392b;
    }

/* 🔥 tlačidlo sa zobrazí IBA keď reconnect zlyhá */
#components-reconnect-modal.components-reconnect-failed .reconnect-btn,
#components-reconnect-modal.components-reconnect-rejected .reconnect-btn {
    display: inline-block;
}

/* 🔥 spinner sa naopak skryje keď reconnect zlyhá */
#components-reconnect-modal.components-reconnect-failed .reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .reconnect-spinner {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


