:root {
    --primary-color: #258cfb;
    --background-color: lightyellow;
    --auxiliar-color: rgba(0, 0, 0, 0.2);
    --font-family: 'Behind The Nineties Bold', sans-serif;
}

@font-face {
    font-family: 'Behind The Nineties Italic';
    src: url('https://sirbbhstorage.blob.core.windows.net/fonts/Behind-The-Nineties-It.otf') format('opentype');
    font-style: italic;
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Behind The Nineties Bold Italic';
    src: url('https://sirbbhstorage.blob.core.windows.net/fonts/Behind-The-Nineties-Bd-It.otf') format('opentype');
    font-style: italic;
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: 'Behind The Nineties Bold';
    src: url('https://sirbbhstorage.blob.core.windows.net/fonts/Behind-The-Nineties-Bd.otf') format('opentype');
    font-style: normal;
    font-weight: bold;
    font-display: swap;
}


html, body {
    background-color: var(--background-color) !important;
    font-family: var(--font-family) !important;
    height: 100%;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: white !important;
    background-color: var(--primary-color) !important;
    border-color: #1861ac !important;
}

.btn-secondary {
    color: white !important;
    background-color: var(--background-color) !important;
    border-color: #1861ac !important;
}

.btn-auxiliar {
    color: black !important;
    background-color: var(--auxiliar-color) !important;
    border-color: #1861ac !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.loading-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #fff;
}

    .loading-custom img {
        width: 100px;
        height: auto;
    }

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner-image {
    background-color: black;
    height: 50%;
    width: auto;
}

.spinner-image-embebbed {
    background-color: black;
    height: 50%;
    width: 50%;
    align-content: center;
    text-align: center;
}


code {
    color: #c02d76;
}

.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;
}

.aux-button {
    padding: 12px 0;
    border: none;
    border-radius: 999px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.9), 0 6px 20px rgba(0,0,0,0.9);
    transition: background-color 0.2s ease-in-out;
}

.back-button {
    background: rgba(255, 255, 255, 0.8);
    color: black !important;
    border: none;
    border-radius: 20%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 11;
}

.bottom-buttons-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
    z-index: 1000;
}

.bottom-button {
    flex: 1;
    margin: 0 10px;
    padding: 12px 0;
    border: none;
    border-radius: 999px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.09);
    transition: background-color 0.2s ease-in-out;
}

    .bottom-button:hover {
        background-color: var(--auxiliar-color);
        color: black;
    }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--background-color);
    border-radius: 20px;
    padding: 30px 20px;
    max-width: 90vw;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    color: black !important;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-title {
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.spinner-video {
    width: 100vw;
    height: auto;
    object-fit: cover;
    display: block;
}

.order-number {
    padding: 5px 10px;
    border-radius: 10px;
    font-size: small;
    color: white;
}

.badge-success {
    background: #5cb85c;
    color: #fff;
}

.badge-first {
    background: #337ab7;
    color: #fff;
}

.badge-danger {
    background: #d9534f;
    color: #fff;
}

.badge-warning {
    background: #f0ad4e;
    color: #212529;
}

.badge-info {
    background: #5bc0de;
    color: #fff;
}

.badge-secondary {
    background: #6c757d;
    color: #fff;
}


.cancel-button {
    margin-top: 30px;
    background: rgb(128, 128, 128);
    color: white;
    font-size: 1rem;
    border-radius: 999px;
    border-color: #1861ac;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

    .cancel-button:hover {
        border-color: var(--primary-color);
        border: 2px;
    }


.action-buttons-container {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 0 10px;
    z-index: 1000;
}

.action-button {
    margin-top: 30px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    border-radius: 999px;
    border: none;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

    .action-button:hover {
        border-color: var(--primary-color);
        border: 2px;
    }

.text-primary-color {
    color: var(--primary-color);
}

.text-secondary-color {
    color: var(--background-color);
}

.text-auxiliar-color {
    color: var(--auxiliar-color);
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
    display: inline;
    font-size: 1.2rem;
    border-radius: 999px;
    margin-left: 3px;
    padding: 0 15px;
}

.zone-button {
    min-width: 200px;
    min-height: 80px;
    font-size: 1.2rem;
    color: antiquewhite;
    border-color: #1861ac !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.table-button {
    min-width: 160px;
    min-height: 70px;
    font-size: 1.1rem;
    color: darkslategray;
    border-color: #1861ac !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}


.floating-alert {
    position: fixed;
    top: 7px;
    left: 45%;
    transform: translateX(-50%);
    z-index: 2001;
    width: 85%;
    max-width: 500px;
    pointer-events: auto;
}

.alert-content {
    background: var(--primary-color);
    color: var(--auxiliar-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-body {
    background: var(--primary-color);
    color: var(--auxiliar-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 10px 15px;
}

.progress-bar-smooth {
    transition: width 1s ease;
}


h1, h2, h3, h4, h5, h6,
.btn,
.modal-title,
.form-control,
label,
input,
textarea,
select,
.badge,
.aux-button,
.bottom-button,
.cancel-button,
.action-button {
    font-family: var(--font-family) !important;
}







/* Dialog más agradable */
.diners-modal {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

/* Cerrar plano (sin borde) */
.btn-close-plain {
    background: transparent;
    border: 0;
    font-size: 1.25rem;
    line-height: 1;
    opacity: .6;
}

    .btn-close-plain:hover {
        opacity: .9;
    }

/* Chips rápidos en grid responsive */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
}

.btn-chip {
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    border-radius: 10px;
    padding: 6px 0;
    font-weight: 600;
}

    .btn-chip.active {
        background: var(--bs-primary, #007bff);
        color: #fff;
        border-color: transparent;
    }








/* Contenedor principal a columna para empujar leyenda al final */
.commander-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cabecera: mejor lectura en desktop */
.commander-header .header-kv span.h4,
.commander-header .header-kv span.h5 {
    line-height: 1.2;
}

.commander-header .btn {
    white-space: nowrap;
}

/* Mesas ~60% altura mínima y scroll interior si hace falta */
.tables-area {
    min-height: 40vh !important;
    overflow: auto;
}

/* Grid de mesas: tarjetas fluidas */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    padding-bottom: 8px;
}

/* Tarjeta de mesa “clickable” */
.table-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 12px;
    background: var(--tbl-color, #f4f6f9);
    color: #111;
    text-align: left;
    transition: transform .06s ease, box-shadow .06s ease;
}

    .table-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,.08);
    }

.table-name {
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.1;
}

/* Badge de comensales incrustado */
.diners-pill {
    font-size: large;
    font-weight: bold;
}

/* Metadatos (tiempos) */
.meta {
    font-size: .85rem;
    opacity: .9;
}

/* Leyenda fija al fondo, con altura reservada */
.legend-footer {
    border-top: 1px solid rgba(0,0,0,.07);
    background: #fff;
    min-height: 100px; /* <- altura reservada para evitar saltos */
    display: flex;
    align-items: center;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 18px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.legend-swatch {
    width: 18px;
    height: 18px;
    border: 1px solid #333;
    border-radius: 4px;
    display: inline-block;
}

@media (min-width: 992px) {
    .commander-header .card-body {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* Animación aplicada a TODOS los botones dentro del contenedor cuando este tiene la clase .pulse */
.pay-buttons.pulse .bottom-button {
  animation: pay-pulse 3500ms ease-in-out 5;
  will-change: transform, box-shadow;
}

/* por si .btn de Bootstrap pisa cosas, añadimos algo de transición */
.bottom-button.big-pay { transition: transform .15s ease; }

@keyframes pay-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(230,94,90,0.00); }
  45%  { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(230,94,90,0.22); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(230,94,90,0.00); }
}

/* Fallback extra visible: flash de fondo además del pulso */
.pay-buttons.pulse .bottom-button::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 2rem;
  box-shadow: 0 0 0 0 rgba(230,94,90,.0);
  animation: pay-outline 700ms ease-out 1;
}
@keyframes pay-outline {
  0%   { box-shadow: 0 0 0 0 rgba(230,94,90,.0); }
  35%  { box-shadow: 0 0 0 3px rgba(230,94,90,.55); }
  100% { box-shadow: 0 0 0 0 rgba(230,94,90,.0); }
}
