/**
 * BLACKLINE TRAVEL MADEIRA — Premium System Loader & Waiting Screen
 * Ultra-luxury dark aesthetic with centered logo, orbital gradient rings, and micro-animations.
 */

:root {
    --bl-loader-bg: rgba(4, 7, 11, 0.94);
    --bl-loader-cyan: #0cb2db;
    --bl-loader-cyan-glow: rgba(12, 178, 219, 0.45);
    --bl-loader-text: #eef4f8;
    --bl-loader-subtext: #8fa0ac;
    --bl-loader-ring: rgba(12, 178, 219, 0.18);
}

/* Fullscreen Loader Overlay */
.blackline-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bl-loader-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s ease;
    user-select: none;
}

.blackline-loader-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Central Stage Container */
.blackline-loader-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 90vw;
    padding: 30px;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blackline-loader-overlay.active .blackline-loader-stage {
    transform: scale(1) translateY(0);
}

/* Logo & Orbital Spinner Wrapper */
.blackline-loader-brand-wrap {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}

/* Ambient Radial Glow behind logo */
.blackline-loader-aura {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--bl-loader-cyan-glow) 0%, rgba(12, 178, 219, 0) 70%);
    animation: blAuraPulse 3s ease-in-out infinite;
    pointer-events: none;
}

/* Outer Rotating Laser Orbital */
.blackline-loader-orbital {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--bl-loader-cyan);
    border-right-color: rgba(12, 178, 219, 0.3);
    box-shadow: 0 0 16px var(--bl-loader-cyan-glow);
    animation: blSpin 1.6s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

/* Secondary counter-rotating orbital ring */
.blackline-loader-orbital-secondary {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-bottom-color: #7be5fa;
    border-left-color: rgba(123, 229, 250, 0.2);
    animation: blSpinReverse 2.4s linear infinite;
}

/* Static Glass Backdrop Pill for Logo */
.blackline-loader-logo-card {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(10, 15, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(12, 178, 219, 0.1);
    z-index: 2;
    overflow: hidden;
}

/* Centered Blackline Brand Logo */
.blackline-loader-logo {
    width: 82px;
    max-height: 70px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 12px rgba(12, 178, 219, 0.4));
    animation: blLogoFloat 3.2s ease-in-out infinite;
}

/* Typography Container */
.blackline-loader-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.blackline-loader-brand-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #ffffff 30%, #7be5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.blackline-loader-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--bl-loader-subtext);
    margin: 0;
    min-height: 20px;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease;
}

/* Sleek Progress Track Bar */
.blackline-loader-progress-track {
    width: 160px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    margin-top: 14px;
    overflow: hidden;
    position: relative;
}

.blackline-loader-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--bl-loader-cyan), #fff, var(--bl-loader-cyan), transparent);
    box-shadow: 0 0 10px var(--bl-loader-cyan);
    animation: blProgressWave 1.8s ease-in-out infinite;
}

/* Micro-animations */
@keyframes blSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes blSpinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes blAuraPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes blLogoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.03); }
}

@keyframes blProgressWave {
    0% { left: -50%; width: 30%; }
    50% { left: 30%; width: 55%; }
    100% { left: 110%; width: 30%; }
}

/* Small / Inline loader variant for buttons or small cards */
.bl-inline-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: blSpin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* Accessible Modal Dialog Overlay */
.blackline-accessible-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 16px;
    box-sizing: border-box;
}

.blackline-accessible-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.blackline-accessible-modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(12, 178, 219, 0.15);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f8fafc;
    font-family: inherit;
}

.blackline-accessible-modal-overlay.active .blackline-accessible-modal-card {
    transform: scale(1) translateY(0);
}

.blackline-accessible-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blackline-accessible-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.02em;
}

.blackline-accessible-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.blackline-accessible-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.blackline-accessible-modal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

.blackline-accessible-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
