﻿/* Base Variables */
:root {
    --primary: #2196f3;
    --primary-blue: #2196f3;
    --primary-color: #2196f3;
    --text-primary: #333;
    --text-secondary: #666;
    --background: #fff;
    --border: #e0e0e0;
    --border-color: #e0e0e0;
    --success: #4caf50;
    --danger: #f44336;
    --spacing: 1.5rem;
    --radius: 8px;
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --hover-bg: #eee;
    --primary-font: inherit;
    --primary-font-size: 1rem;
    --primary-line-height: 1.5;
}

/* Layout */
.columns-index {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* Header & Navigation */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: initial!important;
    height: 55px;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

    .header-container.nav-up {
        transform: translateY(-100%);
    }

.account-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    height: 100%;
}

.header-left {
    width: auto;
    display: flex;
    justify-content: left;
    align-items: center;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-size: var(--primary-font-size);
}

.icon-logo {
    width: 26px;
    height: auto;
}

/* Restaurant Selector */
form.restaurant.header-restaurant {
    display: flex;
    align-items: center;
    padding: 0 10px 0 0px;
    max-width: 240px;
    min-width: 200px;
    border-radius: 7px;
    border: 1px solid #eee;
    margin-left: 12px;
}

select.restaurant {
    width: 100%;
    font-size: var(--primary-font-size);
    padding: 0.5rem;
    background-color: white;
    font-family: var(--primary-font);
    height: 36px;
}

/* Map Container */
.container-map {
    width: 100%;
    height: 400px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 1;
}

    .container-map.hidden {
        height: 0;
        opacity: 0;
        margin: 0;
    }

.map {
    width: 100%;
    height: 100%;
    border: none;
}

/* Popup Navigation */
.popup {
    position: fixed;
    right: 16px;
    top: 60px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 280px;
    z-index: 101;
}

    .popup.show {
        display: block;
    }

.popup-content {
    padding: 16px;
}

.popup-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.popup-nav {
    padding: 8px 0;
}

    .popup-nav br {
        display: none;
    }

.popup-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

/* Interactive Elements - Unified Styling */
.popup-nav a,
.popup-nav button,
.map-btn,
.btn-logout,
.install-app,
.btn-add,
.temp-data-btn {
    font-family: var(--primary-font);
    font-size: var(--primary-font-size);
    line-height: var(--primary-line-height);
    padding: 5px;
    border-radius: var(--border-radius);
    border: none;
    color: #333;
    background-color: transparent !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-nav a,
.popup-nav button {
    display: block;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: var(--primary-color);
    margin: 0;
    padding: 8px 16px;
}

    .popup-nav a:hover,
    .popup-nav button:hover,
    .map-btn:hover,
    .install-app:hover {
        background: var(--hover-bg) !important;
        color: #222 !important;
    }

.btn-logout:hover {
    background: #777 !important;
    color: #fff;
}

/* Status Indicators & Badges */
.status-indicator {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 25px;
}

    .status-indicator.open {
        background-color: #e8f5e9;
        color: #444;
    }

    .status-indicator.closed {
        background-color: transparent;
        color: #dc2626;
        text-transform: uppercase;
    }

.status-display,
.identity-status-badge {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
    font-family: Calibri;
    font-size: 0.75rem;
}

    .status-open,
    .identity-status-badge.confirmed {
        background-color: #e8f5e9;
        color: #0a7c1c;
    }

    .status-closed,
    .identity-status-badge.pending {
        background-color: #fff3cd;
        color: #856404;
    }

/* Menu Navigation */
#menuNavigation {
    position: sticky;
    top: 0;
    z-index: 99;
    left: 0;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.menu-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding: 0px;
    transition: box-shadow 0.3s ease;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
    z-index: 101!important;
}

/* Category Navigation */
.category-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 10px;
}

.category-dropdown-container {
    width: 100%;
    padding: 0.5rem;
}

.category-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
}

/* Sort & Filter Buttons */
.sort-btn {
    display: flex;
    flex-direction: column;
    background-color: transparent !important;
    color: #555;
    text-transform: lowercase;
    outline: none !important;
    border-radius: 8px;
    border: thin solid #fff !important;
    font-family: Tahoma;
    font-size: 0.9em;
    gap: 18px !important;
    padding: 10px 15px 10px 15px !important;
    width: auto;
}

    .sort-btn:hover {
        background-color: transparent !important;
        color: #111;
    }

    .sort-btn.active-sort {
        box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
        border: thin solid orange !important;
    }

    .sort-btn.status-button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        border: thin solid #fff !important;
        box-shadow: none;
        background: transparent;
        padding-left: 0;
        font-family: Tahoma !important;
        font-weight: 400 !important;
    }

        .sort-btn.status-button:hover,
        .sort-btn.status-button:focus {
            border: none;
            box-shadow: none;
            background: transparent;
            outline: none;
        }

        .sort-btn.status-button.status-open,
        .sort-btn.status-button.status-closed {
            color: #555;
        }

/* Map Button */
.map-btn {
    width: 100%;
    text-align: center;
    font-size: 1.1em;
    background-color: transparent !important;
}

    .map-btn:hover {
        background: #eee;
    }

/* Icons & Indicators */
.icon-container {
    position: relative;
    display: inline-block;
}

.info-indicator {
    position: absolute;
    bottom: -10px;
    right: -14px;
    width: 19px;
    height: 19px;
    opacity: 0.5;
}

.icon-category-description[src$=".svg"] {
    filter: brightness(0.8);
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.4));
}

img.icon-business-hours {
    width: 16px;
    opacity: 0.5;
    cursor: pointer;
}

    img.icon-business-hours:hover {
        opacity: 0.7;
    }

img.icon-category-description {
    width: 30px;
    opacity: 0.8;
    filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.2));
}

/* Product Grid & Cards */
#product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.product-item {
    break-inside: avoid;
}

.card.inside {
    position: relative;
    min-height: 370px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.card-image {
    position: relative;
    min-height: 50px;
}

.img-index {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: #222;
    text-transform: lowercase;
    font-family: Calibri;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    border: thin solid #ccc;
}

.product-timeframe {
    text-align: center;
    padding: 5px;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-family: Calibri;
    font-size: 0.85rem;
}

.status {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
}

[data-status="SoldOut"] .status {
    display: block;
}

/* Card Content */
.card-content {
    padding: 15px 10px;
}

.col-card-content {
    margin-bottom: 1rem;
}

.title {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.description {
    display: block;
    color: #666;
    margin-bottom: 0.5rem;
}

.row-card-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.spicy {
    color: #f44336;
    font-size: 0.9rem;
}

.serve-note {
    color: #666;
    font-size: 0.9rem;
}

/* Card Basket */
.card-basket {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
    padding: 10px;
    border-top: thin solid #eee;
}

.card-basket-row {
    display: flex;
    gap: 0;
}

.btn-price {
    font-weight: bold;
    color: #2196f3;
}

.price-note {
    font-size: 0.9rem;
    color: #666;
}

/* Add to Cart Button */
.btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    padding: 0;
    font-size: 1.5rem;
}

    .btn-add:hover {
        background-color: #1976d2;
    }

/* Temp Data Button & Modal */
button.temp-data-btn {
    background: #666 !important;
}

    button.temp-data-btn:hover {
        background: #333 !important;
    }

.temp-data-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    font-family: Calibri, Arial, sans-serif;
}

.temp-data-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    line-height: 1.3;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.temp-data-title {
    font-size: 1em;
    font-family: OpenSans-SemiBold;
    margin-bottom: 15px;
    color: #333;
}

p.temp-data-notification {
    margin-top: 10px;
    line-height: 1.4;
    color: #666;
}

.temp-data-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.temp-data-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    text-align: center;
    flex: 1;
    color: white;
}

.temp-data-btn-primary {
    background-color: var(--primary-blue) !important;
}

.temp-data-btn-danger {
    background-color: #dc3545 !important;
}

.temp-data-btn-secondary {
    background-color: #6c757d !important;
}

/* Business Hours Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .getusername {
        display: none;
    }

    #product-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .menu-navigation {
        position: sticky;
        top: 50px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        z-index: 1 !important;
    }

    .category-buttons-container {
        display: none;
    }

    .category-dropdown-container {
        display: block;
    }

    .restaurant.header-restaurant {
        font-size: 0.9em;
        border: none;
    }

    .popup {
        position: fixed;
        right: 1rem;
        top: 4rem;
        background: white;
        border-radius: var(--border-radius);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .header-container {
        transform: translateY(0);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

        .header-container.nav-up {
            transform: translateY(-100%);
        }
}

@media screen and (max-width: 480px) {
    #product-list {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 769px) {
    .menu-navigation {
        position: relative;
    }

    .category-dropdown-container {
        display: none;
    }

    .category-buttons-container {
        display: flex;
    }
}
