/* ──────────────────────────────────────────────────────────────
   AVIBAL — Global Styles
   ────────────────────────────────────────────────────────────── */

/* اللغة الإنجليزية → Inter */
html[lang="en"] body,
html[lang="en"] .mud-typography {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* اللغة العربية → IBM Plex Sans Arabic */
html[lang="ar"] body,
html[lang="ar"] .mud-typography {
    font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* الخط الافتراضي قبل اختيار اللغة */
body {
    font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ──────────────── Splash Screen ──────────────── */

.avibal-splash {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: #FAFAF7;
    color: #0A2540;
    z-index: 9999;
}

.avibal-splash-logo {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.avibal-splash-bar {
    width: 220px;
    height: 4px;
    background: rgba(10, 37, 64, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.avibal-splash-bar-fill {
    height: 100%;
    width: 40%;
    background: #C9A961;
    border-radius: 2px;
    animation: avibal-splash-progress 1.2s ease-in-out infinite;
}

.avibal-splash-text {
    font-size: 0.8125rem;
    opacity: 0.6;
}

@keyframes avibal-splash-progress {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ──────────────── Blazor Error UI ──────────────── */

#blazor-error-ui {
    background: #B23A48;
    color: #fff;
    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;
    color: #fff;
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
    margin-inline-start: 1rem;
}

/* ──────────────── RTL/LTR Helpers ──────────────── */

[dir="rtl"] .ltr-only { display: none !important; }
[dir="ltr"] .rtl-only { display: none !important; }

/* الأيقونات الاتجاهية تنعكس مع RTL */
[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
}

/* ──────────────── Theme Swatch (MainLayout palette menu) ──────────────── */

.theme-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* ──────────────── Login Page extras ──────────────── */

.login-card {
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* ──────────────── 🆕 S19.7 Phase 4 — LOPA Drag & Drop ────────────────
   Visual classes used by wwwroot/js/lopa-dragdrop.js.
   The .razor file adds these class names on the SVG <g> seat groups and the
   canvas host <div> so JS can attach without touching component internals.
   ──────────────────────────────────────────────────────────────────── */

/* Container for the seat-map SVG — needs `position:relative` for ghost overlay
   and `user-select:none` to prevent text-selection during a drag gesture. */
.lopa-canvas-host {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* SVG element accepts keyboard focus for arrow-key navigation. */
.lopa-svg-host:focus {
    outline: none;
}

/* Each seat group is draggable; grabbing cursor on hover. */
.lopa-seat-draggable {
    cursor: grab;
    transition: filter 120ms ease, transform 120ms ease;
}
.lopa-seat-draggable:hover {
    filter: brightness(1.15);
}

/* Active drag source — fades out so user sees what's moving. */
.lopa-seat-draggable.lopa-dragging {
    cursor: grabbing;
    opacity: 0.45;
    filter: saturate(1.4);
}

/* Drop target hover — highlight with a glow. */
.lopa-seat-draggable.lopa-drop-target {
    filter: brightness(1.3) drop-shadow(0 0 6px rgba(25, 118, 210, 0.6));
    transform: scale(1.08);
}

/* Selected via Shift/Ctrl+click — outline glow. */
.lopa-seat-selected {
    filter: drop-shadow(0 0 0 2px var(--mud-palette-primary)) brightness(1.1);
}

/* Floating ghost element that follows the cursor during drag. */
.lopa-drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.85;
    background: var(--mud-palette-primary);
    color: white;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
}
