/* No font-family here: each theme ships its own type (Lumen's Source Sans Pro,
   Sketchy's handwriting...) and the app must not flatten that. */

/* No link/button color rules here: Bootswatch themes own those. The default
   (Blazing Berry) theme's overrides live in App.razor, scoped to that theme only. */

.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;
}

.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."
    }

.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;
}
/* Readability: larger base text and generous spacing, especially in forms. */
html {
    font-size: 16px;
}

.form-label, label {
    font-weight: 600;
}

.mb-form {
    margin-bottom: 1.25rem;
}

.avatar-circle {
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bs-secondary-bg, #e2e8f0);
    color: var(--bs-secondary-color, #475569);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}

.page-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* narrow screens: actions drop below the title instead of crushing it */
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Header action buttons sit in a row with even spacing, wrapping as a group. */
.page-title-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.critical-alert-banner {
    background-color: var(--bs-danger, #dc3545);
    color: white;
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.warning-alert-banner {
    background-color: var(--bs-warning, #ffc107);
    color: #212529;
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.tag-chip {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 1rem;
    background-color: color-mix(in srgb, var(--bs-primary, #0a58ca) 12%, #ffffff);
    color: color-mix(in srgb, var(--bs-primary, #0a58ca) 80%, #000000);
    font-size: 0.9rem;
    margin-right: 0.35rem;
    margin-bottom: 0.2rem;
}

.media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.media-gallery .media-tile {
    width: 180px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
}

.media-gallery .media-tile img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.media-gallery .media-tile .media-meta {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* Grooming board */
.board-lanes {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    align-items: flex-start;
}

.board-lane {
    min-width: 250px;
    flex: 1;
    background: var(--bs-secondary-bg, #f1f3f5);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.board-lane-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.board-card { min-width: 280px; }

/* Customer portal: extra-large, generously spaced, high-contrast. */
.portal-page {
    min-height: 100vh;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bs-primary, #4a2c8f) 10%, var(--bs-body-bg, #ffffff)) 0%, var(--bs-body-bg, #ffffff) 40%);
    color: var(--bs-body-color, #212529);
    font-size: 1.15rem;
}

.portal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
}

.portal-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--bs-primary, #4a2c8f);
}

.portal-main {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.portal-card {
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, transparent);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    width: 100%;
    max-width: 640px;
}

.portal-progress {
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 600;
    margin-bottom: 1rem;
}

.portal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portal-text {
    font-size: 1.25rem;
    line-height: 1.6;
}

.portal-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portal-input {
    font-size: 1.5rem !important;
    padding: 0.85rem 1rem !important;
}

.portal-code {
    letter-spacing: 0.5rem;
    text-align: center;
    max-width: 300px;
}

.portal-button {
    font-size: 1.25rem !important;
    padding: 0.75rem 2rem !important;
}

.portal-pet-card, .portal-service-card {
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border: 2px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s;
    width: 100%;
}

.portal-pet-card {
    width: auto;
    min-width: 160px;
    text-align: center;
}

.portal-pet-card:hover, .portal-service-card:hover {
    border-color: var(--bs-primary, #4a2c8f);
}

.portal-pet-card.selected, .portal-service-card.selected {
    border-color: var(--bs-primary, #4a2c8f);
    background: color-mix(in srgb, var(--bs-primary, #4a2c8f) 14%, var(--bs-body-bg, #ffffff));
}

.portal-addpet {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.portal-addon {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.portal-check {
    width: 1.5rem;
    height: 1.5rem;
}

.portal-slot {
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border: 2px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.portal-slot:hover { border-color: var(--bs-primary, #4a2c8f); }

.portal-slot.selected {
    border-color: var(--bs-primary, #4a2c8f);
    background: var(--bs-primary, #4a2c8f);
    color: #fff;
}

.portal-review {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.portal-review-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--bs-border-color-translucent, #f1f3f5);
}

.portal-review-row:last-child { border-bottom: none; }

.portal-review-total {
    font-size: 1.4rem;
}

/* Public report card photos */
.report-photos {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.report-photos figure {
    flex: 1;
    min-width: 220px;
    margin: 0;
}

.report-photos img {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.report-photos figcaption {
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 0.5rem;
}

/* ===== App shell: top toolbar ===== */
/* Layout only — colors come from the theme: the header carries real Bootstrap
   navbar classes (navbar bg-primary, data-bs-theme=dark), so each Bootswatch
   theme paints the bar exactly the way it paints its own navbars. */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    min-height: 3.4rem;
    padding: 0.25rem 1rem;
}

.topbar-burger,
.topbar-icon-btn,
.topbar-menu-btn,
.topbar-user {
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 1.05rem;
    line-height: 1.2;
    cursor: pointer;
    color: var(--bs-navbar-color, inherit);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.topbar-burger:hover,
.topbar-icon-btn:hover,
.topbar-menu-btn:hover,
.topbar-menu-btn.open,
.topbar-user:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--bs-navbar-hover-color, inherit);
}

.topbar-menus {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-left: 0.4rem;
}

.topbar-menu {
    position: relative;
    display: inline-flex;
}

.topbar-caret {
    font-size: 0.7rem;
    opacity: 0.6;
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    max-height: 75vh;
    overflow-y: auto;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.4rem;
    z-index: 1040;
}

.topbar-dropdown-right {
    left: auto;
    right: 0;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 0.45rem;
    color: var(--bs-body-color, #212529);
    text-decoration: none;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.topbar-dropdown-item:hover {
    background: var(--bs-secondary-bg, #f1f1f1);
    color: var(--bs-body-color, #212529);
}

.topbar-item-emoji {
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.topbar-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--bs-danger, #dc3545);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    min-width: 1.1rem;
    text-align: center;
}

.topbar-user-text {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.topbar-user-shop {
    font-size: 0.78rem;
    color: inherit;
    opacity: 0.7;
    white-space: nowrap;
}

.topbar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    background: transparent;
}

.topbar-notifications {
    min-width: 340px;
    max-width: 400px;
}

.topbar-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.75rem 0.5rem;
    border-bottom: 1px solid var(--bs-border-color, #eee);
}

.topbar-dropdown-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
}

.topbar-notification {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 0.45rem;
    text-align: left;
    cursor: pointer;
    align-items: flex-start;
}

.topbar-notification:hover {
    background: var(--bs-secondary-bg, #f1f1f1);
}

.topbar-notification.unread {
    background: color-mix(in srgb, var(--bs-primary, #7c50dd) 9%, transparent);
}

.topbar-notification.unread:hover {
    background: color-mix(in srgb, var(--bs-primary, #7c50dd) 16%, transparent);
}

.topbar-notification-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.topbar-notification-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.topbar-notification.unread .topbar-notification-title {
    font-weight: 700;
}

.topbar-notification-body {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topbar-notification-when {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #999);
}

.topbar-dropdown-footer {
    justify-content: center;
    border-top: 1px solid var(--bs-border-color, #eee);
    border-radius: 0 0 0.45rem 0.45rem;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* ===== Notifications history page ===== */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 900px;
}

.notification-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.6rem;
    background: var(--bs-body-bg, #fff);
    cursor: pointer;
}

.notification-row:hover {
    background: var(--bs-secondary-bg, #f6f6f6);
}

.notification-row.unread {
    border-color: color-mix(in srgb, var(--bs-primary, #7c50dd) 45%, transparent);
    background: color-mix(in srgb, var(--bs-primary, #7c50dd) 7%, transparent);
}

.notification-row-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.notification-row-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.notification-row-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.notification-row.unread .notification-row-title {
    font-weight: 700;
}

.notification-row-body {
    color: var(--bs-secondary-color, #6c757d);
}

.notification-row-when {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Site map page ===== */
.sitemap-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sitemap-links a {
    padding: 0.4rem 0.5rem;
    border-radius: 0.4rem;
    text-decoration: none;
    color: var(--bs-body-color, #212529);
    font-size: 1.02rem;
}

.sitemap-links a:hover {
    background: var(--bs-secondary-bg, #f1f1f1);
}

/* ===== Toolbar brand (the sidebar is gone; the toolbar is the whole shell) ===== */
.topbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--bs-navbar-brand-color, inherit);
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.topbar-brand:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--bs-navbar-brand-hover-color, inherit);
}

.topbar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.topbar-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-brand-sub {
    font-size: 0.72rem;
    color: inherit;
    opacity: 0.7;
    white-space: nowrap;
}

/* Narrow screens: the section menus shrink to their emoji so everything fits. */
@media (max-width: 991.98px) {
    .topbar-menu-label {
        display: none;
    }

    .topbar-menu-btn .topbar-caret {
        display: none;
    }

    .topbar-brand-name {
        max-width: 9rem;
    }

    .topbar {
        padding: 0.25rem 0.5rem;
    }
}

/* Phones: menus wrap onto their own row and dropdowns open as full-width sheets. */
@media (max-width: 575.98px) {
    .topbar {
        flex-wrap: wrap;
        padding-bottom: 0;
    }

    /* The wrapped menu row is its own bar: a translucent darkening of whatever
       color the theme gave the navbar, so it works on every theme. */
    .topbar-menus {
        order: 10;
        width: calc(100% + 1rem);
        justify-content: space-between;
        margin: 0.25rem -0.5rem 0;
        padding: 0.3rem 0.5rem;
        background-color: rgba(0, 0, 0, 0.14);
    }

    .topbar-menu {
        position: static;
    }

    .topbar-dropdown,
    .topbar-dropdown-right {
        left: 0.5rem;
        right: 0.5rem;
        min-width: 0;
    }
}

/* ===== Picons icon system ===== */
.app-icon {
    width: 1.15em;
    height: 1.15em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.2em;
    flex-shrink: 0;
}

/* A flat circle in the theme's primary color with a white line icon inside —
   one uniform badge style for stat cards and feature callouts. */
.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: var(--bs-primary, #7c50dd);
    color: #fff;
}

.icon-chip .app-icon {
    width: 58%;
    height: 58%;
}

/* Dashboard stat-card art. No display here — it must not override the chip's
   flex centering (that's what floated icons to the top of their circles). */
.stat-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0.35rem auto 0.5rem;
}

.portal-logo {
    height: 48px;
    max-width: 200px;
    object-fit: contain;
    border-radius: 0.4rem;
}

/* Toolbar logo: rendered as-is — no backdrop, transparency preserved. The shop
   picked the logo; it's theirs to make work against their chosen theme. */
.topbar-logo {
    height: 34px;
    max-width: 150px;
    object-fit: contain;
}

/* Staff member screen: masonry card columns (3 → 2 → 1). CSS columns pack cards
   by height, so a short Login card doesn't hollow out a whole grid row. */
.staff-cards {
    columns: 1;
    column-gap: 1rem;
}

@media (min-width: 992px) {
    .staff-cards { columns: 2; }
}

@media (min-width: 1400px) {
    .staff-cards { columns: 3; }
}

.staff-cards > .card {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.schedule-time {
    max-width: 130px;
}

/* Invoice receipt identity above the page header. */
.invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.invoice-brand-logo {
    height: 44px;
    max-width: 180px;
    object-fit: contain;
    border-radius: 0.375rem;
}

.invoice-brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
}

/* Blazor's error banner: hidden until the runtime raises it. Global on purpose —
   every layout carries its own copy of this div, and a scoped rule only hid one. */
#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;
    color: #212529;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Pay-by-app QR overlay: hand-rolled dialog (no component library — it crashed
   real Android browsers). Centered card on desktop, bottom sheet on phones. */
.qr-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
}

.qr-sheet {
    position: fixed;
    z-index: 1061;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 2rem));
    max-height: 92dvh;
    overflow-y: auto;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 575.98px) {
    .qr-sheet {
        left: 0;
        top: auto;
        bottom: 0;
        transform: none;
        width: 100vw;
        border-radius: 1rem 1rem 0 0;
    }
}

/* Phones: every popup dialog becomes a bottom sheet — full width, pinned to the
   bottom of the screen, its body scrolling inside itself when too tall. The
   fixed pixel Width= on each DxPopup then only applies on desktop. */
@media (max-width: 575.98px) {
    .dxbl-modal .dxbl-popup {
        width: 100vw !important;
        max-width: 100vw !important;
        position: fixed !important;
        left: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        margin: 0 !important;
        transform: none !important;
        max-height: 92dvh;
    }

    .dxbl-modal .dxbl-popup .dxbl-modal-content {
        max-height: 92dvh;
        border-radius: 1rem 1rem 0 0 !important;
        overflow: hidden;
    }

    .dxbl-modal .dxbl-popup .dxbl-modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
