:root {
    --bg: #000; /*#0D0D0D;;*/
    --text: #FFFFFF;
    --accent: #ffe27a;
    --accent-light: #ed9bff;
    --accent-dark: #E5B400;
    --card: #151515;
}

/* Remove divider line between a dish row and its description row */
.menu-table tr.desc-row td {
    border-top: none !important;
    padding-top: 0.125rem;
}

/* Slightly reduce spacing on the dish row above the description */
.menu-table tr.dish-with-desc td {
    border-bottom: none !important;
    padding-bottom: 0.125rem;
}

html, body {
    font-family: "Inter", system-ui, sans-serif; /*'Helvetica Neue', Helvetica, Arial, sans-serif;*/
    background: var(--bg);
    color: var(--text);
    font-weight: 600;
}

a, .btn-link {
    color: var(--accent);
}

.btn {
    font-weight: 600;
    border-radius: 999px;
}

.accent {
    color: var(--accent) !important;
}

.btn-primary {
    color: #000;
    background-color: var(--accent);
    border-color: var(--accent-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.08rem var(--text), 0 0 0 0.22rem rgba(255,216,77,0.25);
}

.card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card-body .h4 {
    color: var(--accent) !important;
}

/* Make list-group items inside our dark cards inherit the dark background
   (Bootstrap defaults to white). Also reduce the default strong contrast border. */
.card .list-group-item {
    background: transparent;
    color: var(--text);
    border-color: rgba(255,255,255,0.04);
}
.card .list-group-item .small.text-muted {
    color: var(--accent-light) !important;
}

.clickcard {
    border: 1px solid var(--accent-light);
}

.card h2 {
    color: var(--accent);
}

.row .h4 {
    color: var(--accent);
}

.card h3 {
    margin-top: 0;
    color: var(--accent);
}

/* Force all card text to use the primary text color (white) so content is readable on dark cards */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card p, .card li, .card span, .card a {
    color: var(--text) !important;
}

/* Buttons inside cards should use their button color (keep button text readable) */
.card .btn {
    /*color: #000 !important;*/
}

.btn-outline-danger, .btn-outline-secondary {
    color: #fff !important;
}

.card a.btn-link {
    /* keep link-style buttons using accent color */
    color: var(--accent) !important;
}

.btn-outline-danger:hover, .btn-outline-secondary:hover {
    color: inherit;
}

/* Simple lightbox styles used by Pension page */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1.5rem;
}
.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.lightbox-toolbar {
    display:flex;
    gap:0.5rem;
    align-items:center;
}
.clickable-img { cursor: pointer; }

/* Availability badge sizing for menu icons */
.availability-badge {
    font-size: 1.25rem; /* larger emoji or icon */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.availability-badge svg {
    width: 1.25rem;
    height: 1.25rem;
}
.availability-badge .icon-dual {
    display: inline-flex;
    gap: 0.2rem;
}

/* Menu list layout: separate fixed-width number column and flexible text column */
.list-group-item {
    background: transparent;
}
.menu-number {
    flex: 0 0 3.25rem; /* fixed column for numbers */
    text-align: right;
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
    padding-right: 0.5rem;
}
.menu-text {
    min-width: 0; /* allow truncation */
}
@media (max-width: 575.98px) {
    .menu-number { flex: 0 0 2.2rem; font-size: 0.95rem; }
}

/* Price column: fixed width so prices align and don't wrap */
.menu-price {
    flex: 0 0 5.25rem; /* fixed column for price */
    text-align: right;
    min-width: 5.25rem;
}
@media (max-width: 575.98px) {
    .menu-price { flex: 0 0 4.25rem; min-width: 4.25rem; font-size: 0.95rem; }
}

/* Responsive: turn menu tables into card list on small screens */
@media (max-width: 500px) {
    .card {
        padding: 0px;
    }
    /*.menu-table thead { display: none; }
    .menu-table, .menu-table tbody, .menu-table tr, .menu-table td { display: block; width: 100%; }
    .menu-table tr {
        background: var(--card);
        border: 1px solid rgba(255,255,255,0.04);
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 0.5rem;
    }
    .menu-table td {
        padding: 0.2rem 0;
        border: none;
    }
    .menu-table td:nth-child(1) {*/ /* number */
        /*text-align: left;
        color: var(--accent);
        font-weight: 700;
        padding-bottom: 0.25rem;
    }
    .menu-table td:nth-child(2) {*/ /* name + desc */
        /*padding-bottom: 0.25rem;
    }
    .menu-table td:nth-child(3) {*/ /* price */
        /*text-align: left;
        font-weight: 700;
        padding-bottom: 0.25rem;
        color: var(--text);
    }
    .menu-table td:nth-child(4) {*/ /* actions */
        /*text-align: left;
    }*/
    /* ensure buttons fit nicely */
    /*.menu-table .btn { margin-top: 0.25rem; }*/
}

/* Ensure normal card text is white on dark cards */
.card .card-text {
    color: var(--text);
}

/* Ensure normal card text is white on dark cards */
.card .card-title {
    color: var(--accent);
}

/* Preserve newlines in descriptions */
.dish-description {
    white-space: pre-wrap;
}

/* Toppings demo styles */
.toppings-grid{display:flex;flex-wrap:wrap;gap:0.5rem}
.chip{display:inline-block;background:rgba(255,255,255,0.04);color:var(--text);padding:0.25rem 0.5rem;border-radius:999px;font-weight:600;border:1px solid rgba(255,255,255,0.03)}
.chip.small{padding:0.2rem 0.4rem;font-size:0.85rem}
.chip.active{background:var(--accent);color:#000;border-color:rgba(0,0,0,0.12)}
.toppings-columns{columns:3;column-gap:1rem}
.group-chips h6{margin-bottom:0.25rem}
.toppings-table td{border-top:none;padding:0.25rem 0}
.toppings-icon-list .topping-item{display:flex;align-items:center;gap:0.5rem}
.toppings-filter{max-width:320px}

/* responsive tweaks for chips grid */
@media (max-width:575.98px){
    .toppings-columns{columns:2}
    .toppings-grid{gap:0.4rem}
}

/* Group header for toppings */
.topping-group-header{
    text-transform:uppercase;
    letter-spacing:0.03em;
    font-weight:600;
    color:var(--muted, #9aa0a6);
}
.topping-group{margin-bottom:0.5rem}

.topping-group-badge {
    cursor: pointer;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    
}
.topping-group-badge[aria-expanded="false"]{
    opacity:0.85;
}

/* Arrow icon inside group badge — rotates when expanded */
.topping-badge-icon{
    display:inline-block;
    transform-origin:center;
    transition:transform 180ms ease;
    font-size:0.9rem;
    line-height:1;
}
.topping-group-badge[aria-expanded="true"] .topping-badge-icon{
    transform:rotate(180deg);
}
.topping-group-badge[aria-expanded="false"] .topping-badge-icon{
    transform:rotate(0deg);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding: 0.4rem 0;
}

.text-muted {
    color: var(--accent-light) !important;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Logo / brand styling */
.navbar-brand .brand-logo {
    height: 36px;
    width: auto;
    padding-right: 0.5rem;
    transition: height 0.15s ease-in-out;
}

/* Larger on wide screens */
@media (min-width: 992px) {
    .navbar-brand .brand-logo { height: 48px; }
}

/* Smaller on small screens */
@media (max-width: 575.98px) {
    .navbar-brand .brand-logo { height: 28px; }
    .content {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }
    html, body {
        font-weight: 400;
    }
}

/* Add some spacing to nav items so logo doesn't crowd */
.top-row .container-fluid { display:flex; align-items:center; gap:0.5rem; }

/* Active nav link uses accent color */
.nav .nav-link.active,
.nav .nav-link.active:focus,
.nav .nav-link.active:hover,
.nav .nav-link.active span,
.nav .nav-link.active .bi {
    color: var(--accent) !important;
}

/* Icon spacing and sizing for nav items */
.nav .nav-link {
    display: flex; /* use full-width flex so alignment is consistent */
    align-items: center;
    gap: 0.5rem; /* space between icon and text */
    line-height: 1; /* ensure consistent vertical metrics */
}

.nav .nav-link .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 1em; /* match text height */
    font-size: 1.05rem;
    color: inherit;
}

/* Gallery responsive layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem !important; /* increased spacing between images */
    align-items: start;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* slightly larger gap inside item */
    align-items: center; /* center image when max-width applies */
}

.gallery-item .gallery-img {
    width: 100%;
    max-width: 500px; /* constrain each image to max 500px */
    height: auto;
    aspect-ratio: 4 / 3; /* keep consistent thumbnails */
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.6); /* subtle 1px border */
    background: #111;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.gallery-item .gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

@media (min-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 575.98px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .gallery-item .gallery-img { aspect-ratio: 3/2; }
}

/* Homepage gallery: always three images side-by-side with max total width */
.homepage-gallery {
    display: grid;
    /* allow columns to wrap automatically when there is not enough space
       each column will be at least 120px wide and expand otherwise */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 800px;
    width: 100%; /* ensure container shrinks with viewport */
    box-sizing: border-box;
    margin: 0 auto;
    align-items: center;
}
.homepage-gallery .hp-item {
    min-width: 0; /* allow items to shrink below content size */
}
.homepage-gallery .hp-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: 1px solid rgba(255,255,255,0.6); /* subtle 1px border */
}


.blazor-error-boundary {
    background-color: var(--card);
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--text);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.form-label {
    color: var(--text);
}

/* Cart badge animation */
.position-relative .badge {
    animation: badge-pulse 0.3s ease-out;
}

@keyframes badge-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Order button hover effect */
.btn .bi-cart-plus {
    transition: transform 0.2s ease;
}

.btn:hover .bi-cart-plus {
    transform: scale(1.2);
}

/* Dish detail page styling */
.dish-detail-quantity .btn-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.dish-detail-quantity .btn {
    min-width: 3rem;
    font-weight: 700;
}

/* Ingredient quantity controls */
.list-group-item .btn-group-sm .btn {
    min-width: 2.5rem;
    padding: 0.15rem 0.4rem;
}

/* Labeling info toggle animation */
.btn-warning, .btn-outline-warning {
    transition: all 0.2s ease;
}

.btn-warning:hover, .btn-outline-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

/* Pizza toppings selection */
.toppings-selection .btn {
    transition: all 0.2s ease;
}

.toppings-selection .btn-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

.toppings-selection .btn-outline-warning:hover:not(:disabled) {
    background-color: rgba(255, 226, 122, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.toppings-selection .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Toppings add section */
.toppings-add-section .btn-outline-warning {
    transition: all 0.15s ease;
}

.toppings-add-section .btn-outline-warning:hover {
    background-color: rgba(255, 226, 122, 0.15);
    transform: scale(1.05);
}

/* Selected toppings in list (gelber Hintergrund) */
.list-group-item .btn-outline-warning {
    border-color: var(--accent);
    color: var(--accent);
}

.list-group-item .btn-outline-warning:hover:not(:disabled) {
    background-color: var(--accent);
    color: #000;
}

.list-group-item .btn-outline-warning.disabled {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent);
    opacity: 0.7;
}

/* Category Slider */
.category-slider-wrapper {
    background: #000000;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.category-slider {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.category-slider::-webkit-scrollbar {
    height: 4px;
}

.category-slider::-webkit-scrollbar-track {
    background: transparent;
}

.category-slider::-webkit-scrollbar-thumb {
    background: rgba(255, 226, 122, 0.3);
    border-radius: 2px;
}

.category-slider::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 226, 122, 0.5);
}

.category-chip {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 226, 122, 0.3);
    background: var(--background);
    color: var(--text);
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip:hover {
    border-color: var(--accent);
    background: rgba(255, 226, 122, 0.1);
    transform: translateY(-2px);
}

.category-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 226, 122, 0.4);
}

/* Smooth scroll for section navigation */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (max-width: 576px) {
    .category-slider-wrapper {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .category-chip {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }
}