html {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Hide scrollbar for IE, Edge and Firefox */
html,
body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%), url('/images/synagogue-background.jpg');
    background-blend-mode: normal;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

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: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50200;
}

.validation-message {
    color: #e50200;
}

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

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

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

/* Hebrew RTL dropdown arrow positioning for all pages */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center !important;
    background-size: 16px 12px;
    padding-left: 2.25rem;
    padding-right: 0.75rem;
}

.form-select:not([multiple]):not([size]) {
    background-position: left 0.75rem center !important;
}

/* Hebrew RTL text alignment for form elements */
.form-select[dir="rtl"], 
.form-control[dir="rtl"],
[dir="rtl"] .form-select,
[dir="rtl"] .form-control {
    text-align: right;
}

/* Ensure proper RTL support for Hebrew text */
.hebrew-text, .hebrew-interface {
    direction: rtl;
    text-align: right;
}

/* Infinite scroll styles */
.scroll-sentinel {
    height: 10px;
    margin: 2rem 0;
    pointer-events: none;
}

.events-container {
    width: 100%;
}

.events-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    margin-bottom: 20px;
}

/* Login bubble styles */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background-color: transparent;
}

.login-bubble-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1100;
}

.login-bubble {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #1b6ec2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.login-bubble:hover {
    background-color: #155a9e;
}

.user-initials {
    text-transform: uppercase;
}

.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1100;
    display: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
    outline: none;
}

.dropdown-item:active {
    background-color: #e9ecef;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* Remove sidebar layout */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

main {
    flex: 1;
    position: relative;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

@media print {
    html,
    body.seating-print-active {
        width: 100%;
        height: auto;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.seating-print-active > :not(#seating-print-root) {
        display: none !important;
    }

    body.seating-print-active #seating-print-root {
        position: static;
        display: block !important;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        color: #000;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.seating-print-active .seating-print-page {
        position: relative;
        box-sizing: border-box;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        width: 100%;
        height: calc(100vh - 1px);
        margin: 0;
        padding: 0;
        place-items: stretch;
        break-after: page;
        page-break-after: always;
        break-inside: avoid;
        page-break-inside: avoid;
        overflow: hidden;
    }

    body.seating-print-active .seating-print-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    body.seating-print-active .seating-print-dedication {
        position: absolute;
        z-index: 3;
        top: 2mm;
        right: 3mm;
        color: #111827;
        font-family: Arial, sans-serif;
        font-size: 12pt;
        font-weight: 800;
        line-height: 1;
    }

    body.seating-print-active .seating-print-header {
        display: grid;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        gap: 1.5mm;
        min-height: 22mm;
        padding: 6mm 2mm 2mm;
        border-bottom: .25mm solid #667085;
    }

    body.seating-print-active .seating-print-title {
        position: static;
        grid-row: 2;
        margin: 0;
        padding: 0;
        border: 0;
        color: #000;
        background: transparent;
        font-family: Arial, sans-serif;
        font-size: 25pt;
        font-weight: 900;
        line-height: 1;
    }

    body.seating-print-active .seating-print-legend {
        display: flex !important;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5mm 3mm;
        color: #111827 !important;
        font-family: Arial, sans-serif;
        font-size: 9pt !important;
        font-weight: 700;
        line-height: 1.1;
    }

    body.seating-print-active .seating-print-legend > span {
        display: inline-flex;
        align-items: center;
        gap: 1mm;
        white-space: nowrap;
    }

    body.seating-print-active .seating-print-legend .legend-swatch {
        width: 5mm;
        height: 3.5mm;
        border: .25mm solid #667085;
        border-radius: .8mm;
    }

    body.seating-print-active .print-map {
        display: block;
        min-width: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible;
    }

    body.seating-print-active .print-map .layout-element rect,
    body.seating-print-active .print-map .layout-element polygon {
        fill: #fffefa !important;
        stroke: #667085 !important;
    }

    body.seating-print-active .print-map .layout-element.aisle rect,
    body.seating-print-active .print-map .layout-element.entrance rect,
    body.seating-print-active .print-map .layout-element.label rect {
        fill: #fff8dc !important;
    }

    body.seating-print-active .print-map .layout-element.aron-kodesh polygon {
        fill: #fff0ad !important;
        stroke: #8a6a18 !important;
    }

    body.seating-print-active .print-map .layout-element.aron-step polygon {
        fill: #ffe399 !important;
        stroke: #9a7521 !important;
    }

    body.seating-print-active .print-map .layout-element.shtender rect {
        fill: #cfeaff !important;
        stroke: #3977a8 !important;
    }

    body.seating-print-active .print-map .layout-element.table rect {
        fill: #ffe0a8 !important;
        stroke: #a46b22 !important;
        stroke-width: .65 !important;
    }

    body.seating-print-active .print-map .layout-element.mechitza rect {
        fill: none !important;
        stroke: #000 !important;
        stroke-width: 5 !important;
        stroke-dasharray: 0 10 !important;
        stroke-linecap: round !important;
    }

    body.seating-print-active .print-map .layout-element.wall rect,
    body.seating-print-active .print-map .layout-element.wall polygon {
        fill: none !important;
        stroke: #000 !important;
        stroke-width: 5 !important;
    }

    body.seating-print-active .print-map .layout-element.wall polyline {
        fill: none !important;
    }

    body.seating-print-active .print-map .layout-element.wall .wall-core {
        display: none !important;
    }

    body.seating-print-active .print-map .layout-element.wall .wall-outline {
        stroke: #000 !important;
        stroke-width: 5 !important;
    }

    body.seating-print-active .print-map .layout-element text,
    body.seating-print-active .print-map .seat text,
    body.seating-print-active .print-map .grouped-family-label {
        fill: #111827 !important;
        font-weight: 900 !important;
    }

    body.seating-print-active .print-map .furniture .seat rect,
    body.seating-print-active .print-map .bench-frame {
        stroke: #98a2b3 !important;
    }

    body.seating-print-active .print-map .furniture .seat rect {
        stroke-width: .75 !important;
    }

    body.seating-print-active .print-map .bench-frame {
        stroke: #667085 !important;
        stroke-width: 1.25 !important;
    }

    body.seating-print-active .print-map .furniture.bench .seat rect,
    body.seating-print-active .print-map .bench-frame {
        fill: #fff3c4 !important;
    }

    body.seating-print-active .print-map .furniture.plastic-chair .seat rect {
        fill: #d9f7d8 !important;
    }

    body.seating-print-active .print-map .furniture.wooden-chair .seat rect {
        fill: #ffd6a3 !important;
    }

    body.seating-print-active .print-map .seat.assigned rect {
        filter: none !important;
        stroke: #98a2b3 !important;
        stroke-width: .75 !important;
    }

    body.seating-print-active .print-map .seat-family-label,
    body.seating-print-active .print-map .seat-empty-label {
        paint-order: stroke fill !important;
        stroke: #fff !important;
        stroke-width: 1px !important;
    }

    body.seating-print-active .print-map .seat-family-label {
        font-size: 24px !important;
    }

    body.seating-print-active .print-map .grouped-family-label {
        font-size: 30px !important;
    }

    body.seating-print-active .print-map .family-seat-span {
        fill: none !important;
        stroke-width: 1.4 !important;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
    }

    body.seating-print-active .print-map .family-outline-0 {
        stroke: #155e75 !important;
    }

    body.seating-print-active .print-map .family-outline-1 {
        stroke: #9f1239 !important;
    }

    body.seating-print-active .print-map .family-outline-2 {
        stroke: #4338ca !important;
    }

    body.seating-print-active .print-map .family-outline-3 {
        stroke: #166534 !important;
    }

    body.seating-print-active .print-map .family-outline-4 {
        stroke: #92400e !important;
    }

    body.seating-print-active .print-map .seat-empty-label {
        font-size: 22px !important;
    }

    body.seating-print-active .print-map .seat-empty-label .available {
        font-size: 22px !important;
    }

    body.seating-print-active .seating-print-legend .bench {
        background: #fff3c4 !important;
    }

    body.seating-print-active .seating-print-legend .plastic {
        background: #d9f7d8 !important;
    }

    body.seating-print-active .seating-print-legend .wood {
        background: #ffd6a3 !important;
    }

    body.seating-print-active .seating-print-legend .bima {
        background: #fffefa !important;
    }

    body.seating-print-active .seating-print-legend .table-key {
        background: #ffe0a8 !important;
        border-color: #a46b22 !important;
        border-width: .2mm !important;
    }

    body.seating-print-active .seating-print-legend .mechitza {
        background: #d9f5f2 !important;
        border-color: #538a84 !important;
    }
}
