@tailwind base;
@tailwind components;
@tailwind utilities;


html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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 {
    background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#blazor-error-ui .error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#blazor-error-ui .error-icon {
    font-size: 1.5rem;
}

#blazor-error-ui .error-message {
    font-size: 0.95rem;
    color: #92400e;
    font-weight: 500;
}

#blazor-error-ui #error-countdown {
    font-weight: 700;
    color: #dc2626;
}

#blazor-error-ui .error-actions {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

#blazor-error-ui .reload {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s;
}

#blazor-error-ui .reload:hover {
    background: #2563eb;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    color: #78716c;
    font-size: 1.25rem;
    padding: 0.25rem;
    text-decoration: none;
}

#blazor-error-ui .dismiss:hover {
    color: #1c1917;
}

.blazor-error-boundary {
    background: url(data:image/svg+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U5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Branded pre-Blazor loader (overrides the default template's loader below). */
.mesero-loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: #0f172a;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 1;
}

.mesero-loader-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    animation: mesero-loader-fade-in 0.4s ease-out 0.05s forwards;
}

.mesero-loader .loading-progress {
    position: relative;
    display: block;
    width: 4rem;
    height: 4rem;
    margin: 0;
}

.mesero-loader .loading-progress circle {
    fill: none;
    stroke: rgba(148, 163, 184, 0.25);
    stroke-width: 0.3rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.mesero-loader .loading-progress circle:last-child {
    stroke: #a78bfa;
    stroke-linecap: round;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.2s ease-out;
}

/* Once Blazor reports 100% (or we flip the flag after WASM boot),
   switch the ring to an indeterminate spin so the user sees continued
   activity during DI / first-render handoff. */
.mesero-loader.is-finalizing .loading-progress circle:last-child {
    stroke-dasharray: 80, 500%;
    animation: mesero-loader-spin 1s linear infinite;
}

.mesero-loader .loading-progress-text {
    position: static;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.55);
    min-height: 1em;
}

.mesero-loader .loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "");
}

.mesero-loader.is-finalizing .loading-progress-text:after {
    content: "";
}

.mesero-loader-status {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

@keyframes mesero-loader-fade-in {
    to { opacity: 1; }
}

@keyframes mesero-loader-spin {
    to { transform: rotate(270deg); }
}

/* ---- Guest QR pages (/{slug}/qr…): index.html's boot script sets html.qr-guest before the first paint ----
   The guest's own paper from the first byte, instead of the staff app's navy «Cargando Mesero» splash (design audit,
   2026-10-19). The loader draws the carta's shape — header, chips, rows — as the page's skeleton does, so the boot,
   the page's skeleton and the carta read as one surface. site.css paints html/body navy and pads body by the
   safe-area insets for the staff shell; these win on specificity (html.qr-guest body > body). */
html.qr-guest,
html.qr-guest body {
    background: #faf9f6;
}

html.qr-guest-dark,
html.qr-guest-dark body {
    background: #121110;
}

html.qr-guest body {
    padding: 0;
}

.qr-boot {
    display: none;
}

html.qr-guest .mesero-loader {
    display: block;
    background: transparent;
    overflow: hidden;
}

html.qr-guest .mesero-loader > :not(.qr-boot) {
    display: none;
}

html.qr-guest .qr-boot {
    display: block;
    --sk: #f4f2ee;
    --sk-2: #ebe8e2;
    --line: #ebe7e0;
    --bar: #ffffff;
}

html.qr-guest-dark .qr-boot {
    --sk: #24221f;
    --sk-2: #2e2b27;
    --line: #2f2c28;
    --bar: #1a1917;
}

.qr-boot-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.qr-boot i {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--sk) 25%, var(--sk-2) 50%, var(--sk) 75%);
    background-size: 200% 100%;
}

.qr-boot-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: center;
    column-gap: 12px;
    row-gap: 7px;
    height: 62px;
    padding: 0 16px;
    box-sizing: border-box;
    background: var(--bar);
    border-bottom: 1px solid var(--line);
}

.qr-boot-name {
    grid-column: 1;
    width: 46%;
    height: 18px;
}

.qr-boot-meta {
    grid-column: 1;
    width: 26%;
    height: 10px;
}

.qr-boot-header .qr-boot-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 104px;
    height: 38px;
    border-radius: 999px;
}

.qr-boot-chips {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow: hidden;
    background: var(--bar);
    border-bottom: 1px solid var(--line);
}

.qr-boot-chips i {
    flex: none;
    width: 84px;
    height: 36px;
    border-radius: 999px;
}

.qr-boot-chips i:first-child {
    width: 36px;
}

.qr-boot-rows {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* A row: the dish's name, its price, and the ring of its "+". */
.qr-boot-rows i {
    position: relative;
    height: 68px;
    border-radius: 0;
    background: radial-gradient(circle at calc(100% - 18px) 34px, transparent 16.5px, var(--line) 17px, var(--line) 18px, transparent 18.5px) no-repeat;
    border-bottom: 1px solid var(--line);
}

.qr-boot-rows i::before,
.qr-boot-rows i::after {
    content: "";
    position: absolute;
    left: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--sk) 25%, var(--sk-2) 50%, var(--sk) 75%);
    background-size: 200% 100%;
}

.qr-boot-rows i::before {
    top: 16px;
    width: 55%;
    height: 14px;
}

.qr-boot-rows i::after {
    top: 40px;
    width: 22%;
    height: 12px;
}

/* The order-status page and the buffet: the header, then cards. */
.qr-boot-cards {
    display: none;
    padding: 20px 16px;
}

.qr-boot-cards i {
    height: 112px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--bar);
    box-shadow: inset 0 0 0 1px var(--line);
}

.qr-boot-cards i:first-child {
    height: 196px;
}

html.qr-guest-status .qr-boot-chips,
html.qr-guest-status .qr-boot-rows,
html.qr-guest-buffet .qr-boot-chips,
html.qr-guest-buffet .qr-boot-rows {
    display: none;
}

html.qr-guest-status .qr-boot-cards,
html.qr-guest-buffet .qr-boot-cards {
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .qr-boot-header i,
    .qr-boot-chips i,
    .qr-boot-rows i::before,
    .qr-boot-rows i::after {
        animation: qr-boot-shimmer 1.5s infinite;
    }
}

@keyframes qr-boot-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* The guest pages' icons from QrIcon: raw markup, which a page's scoped CSS cannot reach (no scope attribute), so
   their base lives here. :where() keeps it below every scoped rule, so the icons the pages write inline keep their
   own sizes; a container sizes these through --ico. */
:where(.qr-order-page, .order-status-page, .qrbuf) svg.ico {
    width: var(--ico, 20px);
    height: var(--ico, 20px);
    flex-shrink: 0;
    fill: var(--ico-fill, none);
    stroke: currentColor;
    stroke-width: var(--ico-stroke, 1.7);
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

:where(.qr-order-page, .order-status-page, .qrbuf) svg.ico .fill {
    fill: currentColor;
    stroke: none;
}

/* The dot that flies from a dish's "+" to the cart (qr-menu.js enableAddFlights): appended to <body>, so global. */
.qr-fly-dot {
    position: fixed;
    z-index: 400;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* The searched words in a dish's name (raw markup too, so styled here). */
:where(.qr-order-page) mark {
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* Custom "update available" banner (replaces the native confirm() prompt) */
.mesero-update-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    padding: 0.875rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 1001;
    max-width: calc(100vw - 2rem);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.mesero-update-banner[hidden] { display: none; }
.mesero-update-banner.is-visible {
    transform: translateX(-50%) translateY(0);
}

.mesero-update-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.mesero-update-banner-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    font-size: 1rem;
    line-height: 1;
}

.mesero-update-banner-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
}

.mesero-update-banner-subtitle {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.mesero-update-banner-actions {
    display: flex;
    gap: 0.375rem;
    flex: 0 0 auto;
}

.mesero-update-banner button {
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.mesero-update-banner-later {
    background: transparent;
    color: #94a3b8;
}

.mesero-update-banner-later:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.mesero-update-banner-apply {
    background: #a78bfa;
    color: #0f172a;
}

.mesero-update-banner-apply:hover {
    background: #bfa8ff;
}

@media (max-width: 520px) {
    .mesero-update-banner {
        flex-direction: column;
        align-items: stretch;
        left: 1rem;
        right: 1rem;
        transform: translateY(calc(100% + 2rem));
    }
    .mesero-update-banner.is-visible {
        transform: translateY(0);
    }
    .mesero-update-banner-actions {
        justify-content: flex-end;
    }
}

code {
    color: #c02d76;
}
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: url('/Images/background.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* ========== Embed Mode (for iframe embedding in POS) ========== */
/* Hide admin layout chrome when catalog is in embed mode */
.catalog-page.embed-mode {
    padding: 12px !important;
}

.catalog-page.embed-mode .catalog-header {
    display: none !important;
}

/* Also support body-level embed mode for backwards compatibility */
body.embed-mode .admin-sidebar {
    display: none !important;
}

body.embed-mode .admin-layout {
    margin-left: 0 !important;
}

body.embed-mode .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
}
