/* Components - Wiederverwendbare UI-Komponenten */

/* Custom Cards */
.card-custom {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.card-custom img {
    width: 220px;
    height: 220px;
    object-fit: cover;
}

/* Gallery Image Styles */
.gallery-image {
    height: 256px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.group:hover .gallery-image {
    transform: scale(1.05);
}

#gallery-container {
    transition: opacity 0.5s ease-in-out;
}

/* Gallery Modal Styles */
.gallery-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.gallery-modal-overlay.is-loaded {
    opacity: 1;
    pointer-events: auto;
}

.gallery-modal-content {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.gallery-modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10004;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-modal-close:hover {
    color: #f97316;
    transform: scale(1.2) rotate(90deg);
}

.gallery-modal-nav {
    position: absolute;
    z-index: 10003;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.gallery-modal-nav:hover {
    background-color: #f97316;
    transform: scale(1.1) translateX(-50%);
}

/* Arrow rotation styles - apply to the span.arrow inside nav buttons */
.gallery-modal-nav .arrow {
    display: inline-block;
    transform-origin: center center;
}

.gallery-modal-nav.prev .arrow {
    transform: rotate(90deg);
    padding-bottom: 12px;
    font-size: xxx-large;
}

.gallery-modal-nav.next .arrow {
    transform: rotate(90deg);
    padding-bottom: 12px;
    font-size: xxx-large;
}

.gallery-modal-nav.prev {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse-vertical-up 2s infinite;
}

.gallery-modal-nav.next {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse-vertical-down 2s infinite;
}

.gallery-modal-nav.prev:hover {
    animation-play-state: paused;
    transform: scale(1.1) translateX(-50%);
}

.gallery-modal-nav.next:hover {
    animation-play-state: paused;
    transform: scale(1.1) translateX(-50%);
}

/* Fixed Action Buttons */
.fixed-action-buttons {
    position: fixed;
    left: 20px;
    bottom: 20%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.action-button:hover {
    transform: scale(1.1);
}

.phone-button, .cookie-button {
    background-color: #f97316;
}

.phone-button:hover, .cookie-button:hover {
    background-color: #4275aa;
}

/* Cookie Banner */
#cookie-banner {
    display: none;
    flex-direction: column;
    left: 15px;
    right: 15px;
    bottom: 15px;
    width: auto !important;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#cookie-banner.is-loaded {
    opacity: 1;
    transform: translateY(0);
}

#cookie-banner { 
    display: none !important; 
    pointer-events: none !important; 
}

#cookie-banner.is-loaded { 
    display: flex !important; 
    pointer-events: auto !important; 
}

.cookie-modal-overlay {
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.cookie-modal-overlay.is-loaded {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: opacity 220ms ease;
}

@media (min-width: 768px) {
    #cookie-banner {
        flex-direction: row;
    }
}

/* Cookie Modal Styles */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10002;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.cookie-modal-overlay.is-loaded {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #333;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cookie-modal-overlay.is-loaded .cookie-modal-content {
    transform: scale(1);
    opacity: 1;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cookie-modal-title {
    font-family: 'Inter', sans-serif;
    color: #4275aa;
    margin: 0;
    font-size: 1.25rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s, transform 0.2s;
}

.cookie-modal-close:hover {
    color: #f97316;
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.cookie-option + .cookie-option {
    border-top: 1px solid #eee;
}

.cookie-option div {
    margin-right: 1.5rem;
}

.cookie-option h5 {
    margin-bottom: 0.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #333;
}

.cookie-option p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.cookie-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: rgba(0,0,0,0.03);
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Cookie Toggle Switch */
div.cookie-toggle-switch {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 28px !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input,
#essential-cookies.cookie-toggle-input,
#google-tag-manager-cookie.cookie-toggle-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important; 
    left: 0 !important;
    z-index: 10 !important;
    cursor: pointer !important;
    opacity: 0 !important;
    border: none !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

div.cookie-toggle-switch label.cookie-switch-track {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background: #e5e5e5 !important;
    border-radius: 14px !important;
    border: 1px solid #ccc !important;
    transition: all 300ms ease !important;
    position: relative !important;
    z-index: 1 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
    color: transparent !important;
    box-shadow: none !important;
}

div.cookie-toggle-switch label.cookie-switch-track .cookie-switch-thumb {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    background: #ffffff !important;
    border-radius: 11px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1) !important;
    position: absolute !important;
    left: 3px !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    margin: 0 !important;
    padding: 0 !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:checked + label.cookie-switch-track,
#essential-cookies.cookie-toggle-input:checked + .cookie-switch-track,
#google-tag-manager-cookie.cookie-toggle-input:checked + .cookie-switch-track {
    background: linear-gradient(135deg, #ff8a3a 0%, #f97316 50%, #e65a00 100%) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2) !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:checked + label.cookie-switch-track .cookie-switch-thumb,
#essential-cookies.cookie-toggle-input:checked + .cookie-switch-track .cookie-switch-thumb,
#google-tag-manager-cookie.cookie-toggle-input:checked + .cookie-switch-track .cookie-switch-thumb {
    left: calc(100% - 3px - 22px) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 8px rgba(249,115,22,0.3), 0 1px 3px rgba(0,0,0,0.1) !important;
    transform: translateY(-50%) !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:disabled + label.cookie-switch-track,
#essential-cookies.cookie-toggle-input:disabled + .cookie-switch-track {
    background: linear-gradient(135deg, #ff8a3a 0%, #f97316 50%, #e65a00 100%) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2) !important;
    opacity: 0.8 !important;
    cursor: not-allowed !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:disabled + label.cookie-switch-track .cookie-switch-thumb,
#essential-cookies.cookie-toggle-input:disabled + .cookie-switch-track .cookie-switch-thumb {
    left: calc(100% - 3px - 22px) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 8px rgba(249,115,22,0.3), 0 1px 3px rgba(0,0,0,0.1) !important;
    opacity: 0.9 !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:focus-visible + label.cookie-switch-track,
#essential-cookies.cookie-toggle-input:focus-visible + .cookie-switch-track,
#google-tag-manager-cookie.cookie-toggle-input:focus-visible + .cookie-switch-track {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2), 0 0 0 4px rgba(249,115,22,0.15) !important;
}

div.cookie-toggle-switch input[type="checkbox"].cookie-toggle-input:focus-visible:checked + label.cookie-switch-track,
#essential-cookies.cookie-toggle-input:focus-visible:checked + .cookie-switch-track,
#google-tag-manager-cookie.cookie-toggle-input:focus-visible:checked + .cookie-switch-track {
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2), 0 0 0 4px rgba(249,115,22,0.15) !important;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.toggle-switch .toggle-input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
    position: absolute;
    top: 0; 
    left: 0;
    z-index: 3;
    cursor: pointer;
    opacity: 0;
}

.switch-track {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 200ms ease;
    position: relative;
    z-index: 1;
}

.switch-thumb {
    display: block;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: absolute;
    left: 4px; 
    top: 50%; 
    transform: translateY(-50%);
    transition: all 200ms cubic-bezier(.2,.9,.2,1);
    border: 1px solid rgba(0,0,0,0.1);
}

.toggle-input:checked + .switch-track {
    background: linear-gradient(90deg, #ff8a3a 0%, #f97316 50%, #e65a00 100%);
    border-color: #f97316;
    box-shadow: 0 0 12px rgba(249,115,22,0.4);
}

.toggle-input:checked + .switch-track .switch-thumb {
    left: calc(100% - 4px - 18px);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(249,115,22,0.5);
    transform: translateY(-50%);
}

.toggle-input:focus-visible + .switch-track {
    outline: none;
    box-shadow: 0 0 0 4px rgba(249,115,22,0.3);
}

/* Flexible Control Wrapper */
.flexible-control { 
    padding: 10px 14px; 
    border-radius: 999px; 
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.flexible-control:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.flexible-control .form-check-label { 
    font-size: .95rem; 
    color: #fff; 
    user-select: none;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.flexible-control .form-check-input,
#any-table-ok {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 40px !important;
    height: 22px !important;
    margin: 0 !important;
    background: rgba(255,255,255,0.2) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 999px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.flexible-control .form-check-input::before,
#any-table-ok::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 2px !important;
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    transform: translateY(-50%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

.flexible-control .form-check-input:checked,
#any-table-ok:checked {
    background: linear-gradient(90deg, #ff8a3a 0%, #f97316 50%, #e65a00 100%) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 12px rgba(249,115,22,0.4) !important;
}

.flexible-control .form-check-input:checked::before,
#any-table-ok:checked::before {
    left: calc(100% - 2px - 16px) !important;
    background: #ffffff !important;
    box-shadow: 0 3px 8px rgba(249,115,22,0.5) !important;
}

.flexible-control .form-check-input:focus,
#any-table-ok:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(249,115,22,0.25) !important;
}

.flexible-control .form-check-input:focus:checked,
#any-table-ok:focus:checked {
    box-shadow: 0 0 12px rgba(249,115,22,0.4), 0 0 0 4px rgba(249,115,22,0.25) !important;
}

.flexible-control:hover .form-check-input,
.flexible-control:hover #any-table-ok {
    border-color: rgba(255,255,255,0.5) !important;
}

.flexible-control:hover .form-check-input:checked,
.flexible-control:hover #any-table-ok:checked {
    border-color: #f97316 !important;
    filter: brightness(1.05) !important;
}

.flexible-control .form-check-label {
    color: #ffffff;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* ===== ZONE LEGEND GLASSMORPHISM (Ultra-transparent Aero) ===== */
.zone-legend-container {
    padding: 12px 16px !important;
    border-radius: 16px !important;
    /* Extrem transparent - fast unsichtbar */
    background: rgba(255, 255, 255, 0.008) !important;
    backdrop-filter: blur(32px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(220%) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

/* Kaum sichtbarer innerer Glanz */
.zone-legend-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%);
    border-radius: 16px 16px 0 0;
}

/* Deaktivierter Zustand */
.zone-legend-container.disabled {
    opacity: 0.2 !important;
    pointer-events: none !important;
    background: rgba(255, 255, 255, 0.002) !important;
    backdrop-filter: blur(16px) grayscale(1) brightness(0.7) !important;
    -webkit-backdrop-filter: blur(16px) grayscale(1) brightness(0.7) !important;
    border-color: rgba(255, 255, 255, 0.01) !important;
}

.zone-legend-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.99) !important;
    margin-bottom: 10px !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.zone-legend-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.legend-zone-btn {
    /* Ultra-transparent - kaum sichtbar */
    background: rgba(255, 255, 255, 0.006) !important;
    backdrop-filter: blur(28px) saturate(240%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(240%) !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.98) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

/* Aero-Style innerer Glanz - minimal */
.legend-zone-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0) 100%);
}

/* Hover-Glanz Effekt */
.legend-zone-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend-zone-btn:hover::before {
    left: 100%;
}

/* Hover - nur leicht sichtbar */
.legend-zone-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.012) !important;
    backdrop-filter: blur(36px) saturate(260%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(260%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Selected - sanfte Aufhellung */
.legend-zone-btn.selected,
.legend-zone-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.025) !important;
    backdrop-filter: blur(40px) saturate(280%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(280%) !important;
    transform: scale(1.02) !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 20px rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    font-weight: 600 !important;
}

/* Der Punkt (Swatch) neben dem Text */
.legend-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset -1px -1px 3px rgba(0, 0, 0, 0.25) !important;
}

/* Disabled State */
.legend-zone-btn:disabled {
    opacity: 0.15 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.001) !important;
    backdrop-filter: blur(12px) grayscale(1) brightness(0.6) !important;
    -webkit-backdrop-filter: blur(12px) grayscale(1) brightness(0.6) !important;
    transform: none !important;
}

/* Responsive: Stack vertically auf kleineren Bildschirmen */
@media (max-width: 768px) {
    .zone-legend-buttons {
        flex-direction: column !important;
    }
    
    .legend-zone-btn {
        width: 100% !important;
        justify-content: flex-start !important;
    }
}

/* QR Scanner Modal */
#qrScannerModal.modal {
    --bs-modal-bg: transparent;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

#qrScannerModal.modal.show {
    opacity: 1;
    visibility: visible;
}

#qrScannerModal .modal-content {
    background: rgba(20, 20, 30, 0.9);
    color: #f0f0f0;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}

#qrScannerModal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

#qrScannerModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
}

#qrScannerModal .modal-title {
    color: #fff;
    font-weight: 600;
}

#qrScannerModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    transition: transform 0.2s ease;
}

#qrScannerModal .btn-close:hover {
    transform: scale(1.1) rotate(90deg);
}

#qrScannerModal .modal-body {
    padding: 1.5rem;
}

#qr-reader-container {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #000;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
    max-height: 60vh;
    overflow: hidden;
}

#qr-reader-container video {
    display: block;
}

#qrScannerModal .form-label {
    color: rgba(255, 255, 255, 0.8);
}

#qrScannerModal .form-select {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 0.5rem;
}

#qrScannerModal .form-select:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: #f97316;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25);
}

#qrScannerModal .form-select option {
    background-color: #333;
}

#qrScannerModal #qrRefreshCameras {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease;
    border-radius: 0.5rem;
}

#qrScannerModal #qrRefreshCameras:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#qrScannerModal .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

#qrScannerModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(0,0,0,0.1);
    padding: 0.75rem 1.5rem;
}

#qrScannerModal .form-select[disabled],
#qrScannerModal .form-select.disabled {
    background-color: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    cursor: not-allowed;
}

#qrScannerModal .modal-dialog {
    max-width: 520px;
    width: 90%;
}

@media (max-width: 480px) {
    #qrScannerModal .modal-dialog {
        max-width: 360px;
        width: 92%;
    }
}

.qr-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255,255,255,0.12);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.token-highlight {
    animation: token-pulse 1s ease-in-out;
    box-shadow: 0 0 0 6px rgba(249,115,22,0.08);
    transition: box-shadow 0.3s ease;
}

.staff-message-success {
    animation: staff-success 1.2s ease-out;
}

#staffTools .form-control-custom:focus {
    box-shadow: 0 0 0 6px rgba(66,117,170,0.06);
    border-color: #f97316;
}

#any-table-ok.cookie-toggle-input:checked + .cookie-switch-track {
    background: linear-gradient(135deg, #ff8a3a 0%, #f97316 50%, #e65a00 100%) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.2) !important;
}

#table-map.map-disabled {
    opacity: 0.4 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

#table-map.map-disabled svg {
    filter: grayscale(0.7) !important;
    transition: filter 0.3s ease !important;
}

.map-zoom:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Shared confirm modal styles */
.confirm-modal-overlay { 
    position: fixed; 
    inset: 0; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    background: rgba(0,0,0,0.45); 
    z-index: 2200; 
}

.confirm-modal-overlay .modal-dialog { 
    max-width: 420px; 
    padding: 12px; 
}

.confirm-modal-overlay .modal-content { 
    background: linear-gradient(145deg, #0f1724, #1f2937); 
    border-radius: 12px; 
    padding: 16px; 
    border: 1px solid rgba(255,255,255,0.04); 
    color: #e6eef6; 
    transform: scale(.96); 
    opacity: 0; 
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease; 
}

.confirm-modal-overlay.show { 
    display: flex; 
}

.confirm-modal-overlay.show .modal-content { 
    transform: scale(1); 
    opacity: 1; 
}

.confirm-modal-overlay .modal-header { 
    font-weight: 700; 
    font-size: 1rem; 
    margin-bottom: 8px; 
}

.confirm-modal-overlay .modal-body { 
    margin-bottom: 12px; 
    color: #cbd5e1; 
}

.confirm-modal-overlay .modal-footer { 
    display:flex; 
    gap:8px; 
    justify-content:flex-end; 
}

/* Shared toast styles */
.toast-area { 
    position: fixed; 
    right: 20px; 
    bottom: 20px; 
    display:flex; 
    flex-direction:column; 
    gap:8px; 
    z-index:2300; 
}

.toast { 
    min-width: 220px; 
    max-width: 360px; 
    background: linear-gradient(145deg,#0b1220,#16202b); 
    color:#e6eef6; 
    border:1px solid rgba(255,255,255,0.04); 
    padding:10px 12px; 
    border-radius:8px; 
    box-shadow:0 6px 20px rgba(2,6,23,0.6); 
    transform: translateY(6px) scale(.98); 
    opacity:0; 
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 200ms ease; 
    display:flex; 
    align-items:center; 
    justify-content:space-between; 
}

.toast.show { 
    transform: translateY(0) scale(1); 
    opacity:1; 
}

.toast.error { 
    border-left:4px solid #ef4444; 
}

.toast.success { 
    border-left:4px solid #06b6d4; 
}

.toast .toast-message { 
    flex:1 1 auto; 
    padding-right:8px; 
}

.toast .toast-close { 
    background:none; 
    border:none; 
    color:#cbd5e1; 
    cursor:pointer; 
    padding:6px; 
}

/* Password toggle */
.input-group .password-toggle {
    border: none !important;
    background: transparent !important;
    color: #e6eef6 !important;
    padding: 0.45rem 0.6rem !important;
    margin-left: 0.25rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.input-group .password-toggle:focus,
.input-group .password-toggle:active {
    outline: none !important;
    box-shadow: none !important;
}

.input-group .password-toggle .fas {
    color: #e6eef6 !important;
}

.input-group .password-toggle:hover {
    background: rgba(255,255,255,0.03) !important;
}

.input-group > .password-toggle.btn {
    border: none !important;
}

.input-group.position-relative { 
    position: relative; 
}

.input-group.position-relative .password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    transform: translateY(-50%) !important;
    border: none !important;
    background: rgba(255,255,255,0.06) !important;
    color: #e6eef6 !important;
    padding: 0.2rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 36px !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none !important;
    border-left: 1px solid rgba(255,255,255,0.03) !important;
}

.input-group.position-relative .password-toggle .fas {
    color: #ffffff !important;
    font-size: 0.95rem;
}

.input-group.position-relative .password-toggle:hover {
    background: rgba(255,255,255,0.09) !important;
}

.input-group.position-relative { 
    overflow: visible; 
}

.input-group.position-relative .form-control {
    padding-right: 48px !important;
    border-radius: 12px !important;
}

/* Glassmorphism styles */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(2,6,23,0.6);
    color: #e6eef6;
}

.glass-card .card-body { 
    background: transparent; 
}

.glass-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(66,117,170,0.04));
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 6px 18px rgba(2,6,23,0.5);
    color: #10b981;
    font-size: 2.25rem;
}

.glass-icon-danger {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(255,255,255,0.02));
    color: #ef4444;
}

.btn-gradient-primary {
    background: linear-gradient(90deg,#ff8a3a 0%,#f97316 100%);
    border: none;
    color: #fff;
    box-shadow: 0 8px 20px rgba(249,115,22,0.18);
}

.btn-gradient-primary:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.text-light-muted {
    color: rgba(230,238,246,0.92) !important;
}

.glass-card .alert {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.04);
    color: #ffdede;
}

.glass-card a.btn-outline-secondary {
    border-color: rgba(255,255,255,0.08);
    color: #e6eef6;
}

/* Zone-only mode: disable map interactions */
.zone-only-mode #table-map svg {
    pointer-events: none !important;
}

.zone-only-mode #table-map .table {
    pointer-events: none !important;
    cursor: default !important;
}

.zone-only-mode #table-map .table-node {
    cursor: default !important;
}

/* Table map zone-only mode styles */
#table-map .table-node {
    transition: opacity 150ms, filter 150ms, stroke 150ms, stroke-width 150ms;
}
