#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

/* Collapsible nav sidebar */
.nav-collapsed #nav-sidebar {
    display: none;
}

/* Floor plan fullscreen */
#floor-plan-wrapper:fullscreen {
    background: #fff;
    padding: 0.5rem;
    overflow: auto;
}

/* SVG scroll wrapper for zoom modes */
.svg-scroll-wrapper {
    overflow: overlay;
    max-height: 75vh;
    max-width: 100%;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    scrollbar-width: thin;
    outline: none;
}

/* Webkit thin overlay scrollbars */
.svg-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.svg-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.svg-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}
.svg-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

#floor-plan-wrapper:fullscreen .svg-scroll-wrapper {
    max-height: calc(100vh - 60px);
}

/* Floating property panels over the floor plan */
.floor-plan-panel {
    position: absolute;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    font-size: 0.82rem;
}

.floor-plan-panel .x-small {
    font-size: 0.7rem;
}

.floor-plan-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floor-plan-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    min-width: 480px;
    max-width: 640px;
}

.floor-plan-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
}

.floor-plan-modal .modal-footer {
    border-top: 1px solid #dee2e6;
}

@keyframes floor-plan-pulse {
    0%   { stroke-opacity: 1;   stroke-width: 2; }
    50%  { stroke-opacity: 0.3; stroke-width: 6; }
    100% { stroke-opacity: 1;   stroke-width: 2; }
}

.machine-locate-pulse {
    fill: none;
    stroke: #fd7e14;
    stroke-width: 2;
    pointer-events: none;
    animation: floor-plan-pulse 0.9s ease-in-out infinite;
}

.machine-locator-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    margin-top: 2px;
}

.machine-locator-item {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.82rem;
    border-bottom: 1px solid #f1f3f5;
}

.machine-locator-item:last-child {
    border-bottom: none;
}

.machine-locator-item:hover,
.machine-locator-item.active {
    background: #e7f1ff;
}

.machine-locator-item.unplaced {
    opacity: 0.55;
    cursor: default;
}

.machine-locator-item.unplaced:hover {
    background: transparent;
}

/* Tournament master tabs */
.tournament-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 6px;
}

.tournament-tab {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px 6px 0 0;
    padding: 6px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.12s ease;
    display: inline-flex;
    align-items: center;
    color: #495057;
}

.tournament-tab:hover {
    background: #e9ecef;
}

.tournament-tab.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    font-weight: 600;
}

.tournament-tab.active .badge {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

.tournament-tab-add {
    background: transparent;
    border-style: dashed;
    color: #0d6efd;
}

.tournament-tab-add:hover {
    background: #e7f1ff;
}

.tournament-tab-create {
    background: #fff;
    border: 1px solid #0d6efd;
    border-radius: 6px 6px 0 0;
    padding: 4px 6px;
}

/* Bank board: horizontal scrolling row of vertical columns */
.bank-board {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: flex-start;
}

.bank-column {
    flex: 0 0 280px;
    min-width: 280px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.bank-column-header {
    background: #495057;
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bank-column-header .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.4);
}

.bank-column-header .min-width-0 {
    min-width: 0;
}

.bank-column-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bank-column-footer {
    border-top: 1px solid #dee2e6;
    padding: 6px;
    background: #fff;
    border-radius: 0 0 6px 6px;
}

.bank-machine-card {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 6px;
    transition: box-shadow 0.1s ease;
}

.bank-machine-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.bank-machine-position {
    flex: 0 0 22px;
    height: 22px;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.bank-machine-info {
    flex: 1 1 auto;
    min-width: 0;
}

.bank-machine-name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.1;
}

.bank-machine-sub {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.1;
}

.bank-machine-actions {
    display: flex;
    gap: 2px;
    opacity: 0.4;
    transition: opacity 0.12s ease;
}

.bank-machine-card:hover .bank-machine-actions {
    opacity: 1;
}

/* Move mode */
.bank-column.move-source {
    outline: 2px dashed #fd7e14;
    outline-offset: -2px;
}

.bank-column.move-source .bank-column-header {
    background: #fd7e14;
}

.bank-column.move-target {
    outline: 2px dashed #0d6efd;
    outline-offset: -2px;
    background: #e7f1ff;
}

.bank-column.move-target .bank-column-header {
    background: #0d6efd;
}

.bank-machine-card.moving {
    background: #fff3cd;
    border-color: #fd7e14;
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.25);
}

.bank-machine-card.moving .bank-machine-position {
    background: #fd7e14;
}

.bank-machine-card.moving .bank-machine-actions {
    opacity: 1;
}

/* Machine status indicator dot */
.machine-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    cursor: help;
}

.machine-status-dot.machine-status-good {
    background: #28a745;
}

.machine-status-dot.machine-status-warning {
    background: #ffc107;
}

.machine-status-dot.machine-status-danger {
    background: #dc3545;
}

.machine-status-editor {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
}

.bank-machine-status-panel {
    margin-top: -2px;
    margin-bottom: 4px;
}

.bank-machine-status-panel .machine-status-editor {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}
