/*************************************************************
 * kiosk-app.css
 * 
 * Upravené a upratané štýly pre EZ-WASH mobilnú aplikáciu (Kiosk Prototype)
 *************************************************************/

/* ==========================
   1) GLOBAL A BASIC STYLES
   ========================== */
/* ====== GLOBAL ====== */
html, body {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    font-family: 'Roboto', sans-serif;
    height: 100%;
    overflow-x: hidden;
    box-sizing: border-box;

}
*, *::before, *::after {
    box-sizing: inherit;
}

img {
    max-width: 100%;
    height: auto;
    align-items: center;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 15px 16px 105px 16px; /* Extra priestor pre .bottom-nav */
    margin: 0 auto;
    box-sizing: border-box;
    background-color: #f8f9fa;
    overscroll-behavior: contain;
}

/* Skrytý element */
.hidden {
    display: none !important;
}

/* ==========================
   2) SCREEN & TRANSITIONS
   ========================== */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding-top: 30px;
    padding-right: 5px;
    padding-left: 5px;
    padding-bottom: 20px;
    width: 100%;
    min-height: calc(100vh - 105px); /* Zmeníme height na min-height */
    overflow-y: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s forwards;
    will-change: transform, opacity;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================
   3) TYPOGRAPHY
   ========================== */
h1 {
    font-size: 24px;
    margin: 15px 0;
    color: #333;
    text-align: center;
}
p,
label,
li {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    color: #555;
}

/* ==========================
   4) INPUT FIELDS
   ========================== */
input[type='text'],
input[type='tel'],
input[type='email'],
input[type='password'] {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    font-size: 16px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* ==========================
   5) BUTTONS
   ========================== */
button {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 16px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
button:hover {
    background: linear-gradient(135deg, #0056b3, #003f7f);
    transform: translateY(-2px);
}
button:active {
    transform: translateY(0);
}
.btn-icon {
    font-size: 18px;
}

/* Špeciálny štýl pre tlačidlo "Uhradiť objednávku" */
.payment-button {
    background: linear-gradient(135deg, #d9534f, #c9302c);
}
.payment-button:hover {
    background: linear-gradient(135deg, #c9302c, #ac2925);
}

/* Menšie tlačidlá (napr. storno, zaplatiť) */
button.small-btn {
    font-size: 14px;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #007bff !important;
    color: #fff;
    transition: background 0.2s;
}
button.small-btn:hover {
    background-color: #0056b3;
}
button.small-btn.pay-btn {
    background: #6eb314 !important; /* zelené pozadie */
}
button.small-btn.cancel-btn {
    background: #dc3545 !important; /* červené pozadie */
}
button.small-btn.cancel-btn:hover {
    background: #c9302c !important;
}

/* ==========================
   6) BOTTOM NAVIGATION
   ========================== */
.bottom-nav {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 90px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding-bottom: 15px;
    padding-top: 5px;
    padding-right: 5px;
    padding-left: 5px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}
.bottom-nav .nav-item i {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 5px;
}
.bottom-nav .nav-item.active {
    color: #007bff;
}

/* ==========================
   7) LANGUAGE SWITCHER
   ========================== */
.language-switcher {
    position: absolute; /* Zmeníme z fixed na absolute */
    top: 5px;

    right: 5px;
    display: flex;
    gap: 2px;
    z-index: 999; /* Stále vysoké, aby bolo nad obsahom v .screen */
}
.lang-option {
    font-size: 30px;
    cursor: pointer;
    user-select: none;
    padding: 1px;
}

/* ==========================
   8) USER PHONE DISPLAY
   ========================== */
.user-phone-display {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    z-index: 1;
}

/* ==========================
   9) MODAL
   ========================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
}
.modal-content p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

/* ==========================
   10) INFO LINKS
   ========================== */
.info-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}
.info-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 5px;
}
.info-links a:hover {
    text-decoration: underline;
}

/* ==========================
   11) LOTTIE CONTAINERS
   ========================== */
.lottie-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 10px auto;
    text-align: center;
}
.lottie-sm {
    width: 150px;
    height: 150px;
}
.rotating-icons {
    text-align: center;
    margin-bottom: 20px;
}
.rotating-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: block;
}
#homeAnimationTooltip,
#mainMenuAnimationTooltip {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 16px;
    color: #f39c12 !important;
    text-align: center;
}
#homeAnimationTooltip,
#mainMenuAnimationTooltip {
    color: #555; /* Prípadne zmeňte, aby ste zladili so zvyškom UI */
}

/* ==========================
   12) ADDITIONAL UTILITIES
   ========================== */
.blink {
    animation: blinkAnimation 1s infinite;
}
@keyframes blinkAnimation {
    0%   { opacity: 1; }
    50%  { opacity: 0.2; }
    100% { opacity: 1; }
}

/* ==========================
   13) SERVICE BUTTONS
   ========================== */
button.service-button {
    flex-direction: column;
    gap: 8px;
    text-align: center;
}
.service-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.service-text {
    font-size: 12px;
    display: block;
    text-align: center;
}

/* ==========================
   14) SELECT (DROPDOWN)
   ========================== */
select {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0 20px 0;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23007bff' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6 6 6-6' stroke='%23007bff' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    transition: border 0.3s, box-shadow 0.3s;
}
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}
select::-ms-expand {
    display: none;
}

/* ==========================
   15) PROFILE SCREEN, ORDER HISTORY
   ========================== */
/* Profil */
#profileScreen {
    
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.avatar-container {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}
.user-details {
    width: 100%;
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.user-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}
.orders-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.order-card-profile {
    flex: 1;
    min-width: 150px;
    margin: 10px;
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}
.order-card-profile:hover {
    transform: scale(1.03);
}
.order-card-profile h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}
.order-card-profile p {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}

/* História objednávok */
#orderHistoryScreen {
    
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    flex-grow: 1; /* Nech obsah zaberie dostupný priestor */
}
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}
.active-orders,
.completed-orders {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.active-orders h2,
.completed-orders h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}
.order-history-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.order-card {
    background-color: #fff;
    padding: 10px 5px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}
.order-card p {
    font-size: 12px;
    margin: 3px 0;
}
.order-card.completed {
    border-left: 4px solid #28a745; /* Green */
}
.order-card.active {
    border-left: 4px solid #ffc107; /* Orange */
}
.order-card.cancelled {
    border-left: 4px solid #dc3545; /* Red */
}
.order-card.active .status-label {
    color: #ffc107;
}
.order-card.completed .status-label {
    color: #28a745;
}
.order-card.cancelled .status-label {
    color: #dc3545;
}
.order-info {
    flex: 1;
}
.order-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 10px;
}

/* ==========================
   16) PRODUCTS
   ========================== */
/* Layout pre zoznam produktov */
.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #ccc;
    margin: 10px 0;
    padding: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border-radius: 6px;
    transition: background 0.3s, transform 0.2s;
}
.product-item:hover {
    background: linear-gradient(135deg, #0056b3, #003f7f);
    transform: translateY(-2px);
}
.product-item img {
    filter: brightness(0) saturate(100%) invert(100%);
    width: 32px;
    height: 32px;
}
.product-left {
    flex: 1;
    text-align: center;
}
.product-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    text-align: center;
    justify-content: center;
}
.product-name {
    font-size: 16px;
    margin-top: 5px;
    font-weight: 600;
}
.product-right {
    flex: 1;
    text-align: center;
}
.price-tag {
    color: #d9534f;
    font-weight: bold;
    margin-left: 10px;
    font-size: 1.1em;
}

/* ==========================
   17) PAYMENT ICON
   ========================== */
.payment-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(100%);
    margin-right: 8px;
}

/* ==========================
   18) ORDER CONFIRMATION
   ========================== */
#orderConfirmationScreen {
    text-align: center;
    align-items: center !important;
}


#comgate-container {
    position: fixed;
    z-index: 9999;
    left: 5%; /* Malý odstup od okrajov */
    top: 10px; /* Zmenšený odstup zhora pre menšie obrazovky */
    width: 90%; /* 90% šírky obrazovky */
    max-width: 504px; /* Maximálna šírka pre väčšie obrazovky */
    height: 80vh; /* 80% výšky viewportu, aby nezaberalo príliš veľa */
    max-height: 679px; /* Maximálna výška pre väčšie obrazovky */
    background: #fff;
    border: 1px solid #ccc;
    overflow: auto; /* Ak obsah pretečie, pridá posuvník */
}

#comgate-iframe {
    width: 100%;
    height: 100%;
    border: none; /* Odstráni zbytočné orámovanie */
}




/* Media query pre väčšie obrazovky (nad 768px) */
/* Media query pre väčšie obrazovky (nad 768px) */
/* Media query pre väčšie obrazovky (nad 768px) */
@media (min-width: 768px) {
    .app-wrapper {
        max-width: 768px; /* Maximálna šírka obsahu */
        margin: 0 auto; /* Centrovať horizontálne */
        background-color: #f8f9fa; /* Zachová pôvodnú farbu pozadia */
        padding-left: 250px; /* Pridaný priestor vľavo pre sidebar */
    }

    /* Pozadie html a body zostáva rovnaké */
    html, body {
        background-color: #f8f9fa; /* Pôvodná farba pozadia mimo .app-wrapper */
    }

    /* Úprava bottom-nav na vertikálny sidebar */
    .bottom-nav {
        position: fixed;
        top: 0; /* Začína hore */
        left: 0; /* Presun na ľavú stranu */
        bottom: auto; /* Odstránenie bottom pozície */
        width: 250px; /* Fixná šírka sidebaru */
        height: 100vh; /* Výška na celú obrazovku */
        max-width: none; /* Odstránenie max-width, šírka je fixná */
        transform: none; /* Odstránenie transform, už nie je centrovaný */
        background: #fff;
        border-right: 1px solid #ddd; /* Zmena border-bottom na border-right */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Tieň vpravo namiesto dole */
        display: flex;
        flex-direction: column; /* Vertikálne rozloženie položiek */
        justify-content: flex-start; /* Položky začínajú hore */
        align-items: stretch; /* Položky zaberajú celú šírku */
        padding-top: 20px; /* Padding zhora a zdola */
        padding-left: 20px;
    }

    .bottom-nav .nav-item {
        flex: 0 1 auto; /* Položky sa nerozťahujú zbytočne */
        padding: 15px 20px; /* Úprava paddingu pre sidebar */
        font-size: 1rem; /* Veľkosť písma */
        color: #666;
        display: flex;
        align-items: center; /* Ikonka a text vedľa seba */
        gap: 10px; /* Medzera medzi ikonkou a textom */
        text-align: left; /* Text zarovnaný vľavo */
    }

    .bottom-nav .nav-item i {
        margin-bottom: 0; /* Odstránenie margin-bottom, ikonky sú vedľa textu */
        font-size: 1.4rem; /* Veľkosť ikoniek */
    }

    .bottom-nav .nav-item.active {
        color: #007bff;
    }

    /* Úprava modalu pre väčšie obrazovky */
    .modal-content {
        max-width: 600px; /* Rovnaká šírka ako .app-wrapper */
    }

    /* Úprava comgate-container pre väčšie obrazovky */
    #comgate-container {
        left: 50%;
        transform: translateX(-50%);
        width: 90%; /* Zachová relatívnu šírku */
        max-width: 600px; /* Maximálna šírka obsahu */
        height: 80vh;
        max-height: 679px;
    }

    /* Zachovanie mobilného vzhľadu pre obsah */
    .screen {
        padding-top: 30px;
        padding-right: 15px; /* Zväčšené paddingy pre väčší priestor */
        padding-left: 15px;
        padding-bottom: 20px;
    }
}