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

a, .btn-link {
    color: #006bb7;
}

.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;
}

h1:focus {
    outline: 2px solid #258cfb;
    outline-offset: 2px;
}

/* Skip navigation link (WCAG 2.4.1) */
.skip-nav {
    position: absolute;
    top: -100px;
    left: 0;
    background: #1976d2;
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    font-size: 14px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}
.skip-nav:focus {
    top: 0;
}

/* Ensure visible focus on non-MudBlazor elements (WCAG 2.4.7) */
a:focus-visible,
button:not(.mud-button-root):focus-visible,
input:not(.mud-input-slot):focus-visible,
[tabindex]:not(.mud-button-root):not(.mud-input):not(.mud-select):not(.mud-tab):focus-visible {
    outline: 2px solid #258cfb !important;
    outline-offset: 2px !important;
}

.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+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMz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I2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* Column width helpers for MudDataGrid */
.col-w-50 { width: 50px !important; max-width: 50px !important; }
.col-w-55 { width: 55px !important; max-width: 55px !important; }
.col-w-60 { width: 60px !important; max-width: 60px !important; }
.col-w-80 { width: 80px !important; max-width: 80px !important; }
.col-w-90 { width: 90px !important; max-width: 90px !important; }
.col-w-100 { width: 100px !important; max-width: 100px !important; }
.col-w-110 { width: 110px !important; max-width: 110px !important; }
.col-w-120 { width: 120px !important; max-width: 120px !important; }
.col-w-150 { width: 150px !important; max-width: 150px !important; }
.col-nowrap { white-space: nowrap !important; }

/* Stretch tab buttons to fill width */
.mud-tabs-header .mud-tab {
    flex: 1 !important;
    min-width: 80px !important;
}

/* ============================================
   Accessibility Widget Styles
   ============================================ */

/* Floating button */
.a11y-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
}
.a11y-fab:hover, .a11y-fab:focus {
    transform: scale(1.1);
    background: #1565c0;
    outline: 2px solid #fff;
}

/* Overlay */
.a11y-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9998;
}

/* Panel */
.a11y-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9999;
    width: 320px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.a11y-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1976d2;
    color: white;
}
.a11y-header .mud-icon-button { color: white !important; }
.a11y-body {
    padding: 12px 16px;
    overflow-y: auto;
    max-height: calc(80vh - 56px);
}
.a11y-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.a11y-section:last-of-type { border-bottom: none; }

/* RTL support */
[dir="rtl"] .a11y-fab { left: auto; right: 20px; }
[dir="rtl"] .a11y-panel { left: auto; right: 20px; }

/* ============================================
   Accessibility Feature Styles
   ============================================ */

/* High Contrast */
.a11y-high-contrast {
    filter: contrast(1.5) !important;
}
.a11y-high-contrast * {
    border-color: #000 !important;
}

/* Monochrome / Grayscale */
.a11y-monochrome {
    filter: grayscale(100%) !important;
}

/* Invert Colors */
.a11y-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
}
.a11y-invert img, .a11y-invert video {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* Highlight Links */
.a11y-highlight-links a,
.a11y-highlight-links a * {
    text-decoration: underline !important;
    outline: 2px solid #ff0 !important;
    outline-offset: 1px !important;
    background-color: rgba(255,255,0,0.15) !important;
}

/* Big Cursor */
.a11y-big-cursor,
.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M4 4l16 36 6-14 14-6z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* Readable Font */
.a11y-readable-font,
.a11y-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.5px !important;
}

/* Increased Line Height */
.a11y-line-height,
.a11y-line-height * {
    line-height: 2 !important;
}

/* Text Spacing */
.a11y-text-spacing,
.a11y-text-spacing * {
    letter-spacing: 2px !important;
    word-spacing: 4px !important;
}

/* Pause Animations */
.a11y-pause-animations,
.a11y-pause-animations * {
    animation: none !important;
    transition: none !important;
}

/* ============================================
   Visual Seating Layout
   ============================================ */

.vs-tables-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.vs-table-card {
    width: 200px;
    min-height: 120px;
    border-radius: 12px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vs-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 4px;
    gap: 8px;
}

.vs-table-chip {
    min-height: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
}

.vs-table-dropzone {
    min-height: 60px;
    padding: 4px 8px 8px;
    flex: 1;
}

.vs-guest-in-table {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    margin: 2px 0;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    gap: 4px;
}

.vs-guest-in-table:hover {
    background: rgba(0, 0, 0, 0.08);
}

.vs-remove-btn {
    padding: 2px !important;
    min-width: 24px !important;
    width: 24px !important;
    height: 24px !important;
}

/* RTL adjustments */
[dir="rtl"] .vs-guest-in-table {
    flex-direction: row-reverse;
}

/* Responsive: stack on small screens */
@media (max-width: 960px) {
    .vs-table-card {
        width: 160px;
    }
}

/* Mobile responsive panel */
@media (max-width: 400px) {
    .a11y-panel {
        left: 10px;
        right: 10px;
        width: auto;
    }
    [dir="rtl"] .a11y-panel {
        left: 10px;
        right: 10px;
    }
}