/**
 * FeastFlow — Universal Theme-Specific Restaurant Preloaders
 * CodeCanyon Compliant — Zero inline styles, hardware-accelerated animations
 */

#ff-preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

#ff-preloader.ff-preloader-fade {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ff-preloader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 440px;
    padding: 2.5rem 2rem;
}

/* ════════════════════════════════════════════════════════════════
   THEME 1: MIDNIGHT EMERALD PRELOADER
   ════════════════════════════════════════════════════════════════ */
#ff-preloader.ff-preloader-midnight-emerald,
.ff-preloader-midnight-emerald {
    background-color: #040e08 !important;
    background: radial-gradient(circle at center, #0a2e1f 0%, #051910 50%, #030d08 100%) !important;
    color: #e2e8f0;
}

.ff-preloader-emerald-emblem {
    position: relative;
    width: 90px;
    height: 80px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Animated Steam Wisps */
.ff-emerald-steam {
    position: absolute;
    top: -6px;
    display: flex;
    gap: 8px;
}

.ff-emerald-steam span {
    width: 3px;
    height: 14px;
    background: linear-gradient(to top, #10b981, rgba(16, 185, 129, 0));
    border-radius: 3px;
    animation: ffEmeraldSteam 1.6s infinite ease-in-out;
}

.ff-emerald-steam span:nth-child(2) {
    animation-delay: 0.35s;
    height: 18px;
}

.ff-emerald-steam span:nth-child(3) {
    animation-delay: 0.7s;
}

@keyframes ffEmeraldSteam {
    0% { transform: translateY(0) scaleY(0.7); opacity: 0; }
    50% { opacity: 0.85; }
    100% { transform: translateY(-16px) scaleY(1.3); opacity: 0; }
}

/* Emerald Cloche Dome */
.ff-emerald-cloche {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ff-emerald-cloche-handle {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    margin-bottom: -2px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
}

.ff-emerald-cloche-dome {
    width: 68px;
    height: 34px;
    border: 2.5px solid #10b981;
    border-bottom: none;
    border-radius: 68px 68px 0 0;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.04) 100%);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.ff-emerald-cloche-base {
    width: 82px;
    height: 4px;
    background: #10b981;
    border-radius: 3px;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.ff-preloader-midnight-emerald .ff-preloader-brand-main {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #ffffff;
    font-family: inherit;
    text-transform: uppercase;
}

.ff-preloader-midnight-emerald .ff-preloader-brand-main span {
    color: #10b981;
}

.ff-preloader-midnight-emerald .ff-preloader-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #10b981;
    margin-top: 0.6rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ff-preloader-midnight-emerald .ff-preloader-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}

.ff-preloader-midnight-emerald .ff-preloader-track {
    width: 180px;
    height: 3px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 99px;
    overflow: hidden;
}

.ff-preloader-midnight-emerald .ff-preloader-bar {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
    animation: ffEmeraldBar 1.4s infinite ease-in-out;
}

@keyframes ffEmeraldBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(120%); }
    100% { transform: translateX(250%); }
}

/* ════════════════════════════════════════════════════════════════
   THEME 2: MIDNIGHT VIOLET PRELOADER
   ════════════════════════════════════════════════════════════════ */
#ff-preloader.ff-preloader-midnight-violet,
.ff-preloader-midnight-violet {
    background-color: #080314 !important;
    background: radial-gradient(circle at center, #1e0d3b 0%, #110624 45%, #080314 85%) !important;
    color: #f1f5f9;
}

.ff-preloader-violet-emblem {
    position: relative;
    width: 100px;
    height: 90px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ff-violet-crown {
    font-size: 1.1rem;
    margin-bottom: -4px;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
    animation: ffCrownFloat 2s infinite ease-in-out;
}

@keyframes ffCrownFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.ff-violet-cloche {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ff-violet-cloche-handle {
    width: 9px;
    height: 9px;
    background: #a855f7;
    border-radius: 50%;
    margin-bottom: -2px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.9);
}

.ff-violet-cloche-dome {
    width: 66px;
    height: 33px;
    border: 2px solid #a855f7;
    border-bottom: none;
    border-radius: 66px 66px 0 0;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.25) 0%, rgba(168, 85, 247, 0.05) 100%);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
}

.ff-violet-cloche-base {
    width: 78px;
    height: 3.5px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
}

.ff-violet-orbit-ring {
    position: absolute;
    border: 1px dashed rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    animation: ffVioletOrbit 4s infinite linear;
}

.ff-orbit-1 {
    width: 94px;
    height: 94px;
}

.ff-orbit-2 {
    width: 108px;
    height: 108px;
    border-color: rgba(236, 72, 153, 0.25);
    animation-duration: 6s;
    animation-direction: reverse;
}

@keyframes ffVioletOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ff-preloader-midnight-violet .ff-preloader-brand-main {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.ff-preloader-brand-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #e879f9;
    border: 1px solid rgba(232, 121, 249, 0.4);
    padding: 2px 8px;
    border-radius: 99px;
    margin-top: 4px;
    text-transform: uppercase;
}

.ff-preloader-midnight-violet .ff-preloader-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #c084fc;
    margin-top: 0.8rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ff-preloader-midnight-violet .ff-preloader-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}

.ff-preloader-midnight-violet .ff-preloader-track {
    width: 190px;
    height: 3px;
    background: rgba(168, 85, 247, 0.18);
    border-radius: 99px;
    overflow: hidden;
}

.ff-preloader-midnight-violet .ff-preloader-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 99px;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
    animation: ffVioletBar 1.5s infinite ease-in-out;
}

@keyframes ffVioletBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(130%); }
    100% { transform: translateX(270%); }
}

/* ════════════════════════════════════════════════════════════════
   THEME 3: EDITORIAL LIGHT PRELOADER
   ════════════════════════════════════════════════════════════════ */
#ff-preloader.ff-preloader-editorial-light,
.ff-preloader-editorial-light {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a;
}

.ff-preloader-editorial-emblem {
    margin-bottom: 1.25rem;
}

.ff-editorial-loader-seal {
    width: 76px;
    height: 76px;
    border: 2px solid #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.ff-editorial-loader-seal::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(15, 23, 42, 0.25);
    border-radius: 50%;
    animation: ffEditorialRotate 8s infinite linear;
}

@keyframes ffEditorialRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ff-editorial-loader-dish {
    width: 32px;
    height: 16px;
    border: 2px solid #0f172a;
    border-bottom: none;
    border-radius: 32px 32px 0 0;
    position: relative;
}

.ff-editorial-loader-dish::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #e11d48;
    border-radius: 50%;
}

.ff-preloader-editorial-eyebrow {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #e11d48;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ff-preloader-editorial-light .ff-preloader-brand-main {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    color: #0f172a;
    font-family: inherit;
    text-transform: uppercase;
}

.ff-editorial-loader-rule {
    width: 140px;
    height: 2px;
    background: #e2e8f0;
    margin: 8px auto 0;
    position: relative;
    overflow: hidden;
}

.ff-editorial-rule-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    background: #e11d48;
    animation: ffEditorialRule 1.3s infinite ease-in-out;
}

@keyframes ffEditorialRule {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(110%); }
    100% { transform: translateX(240%); }
}

.ff-preloader-editorial-light .ff-preloader-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #0f172a;
    margin-top: 0.85rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.ff-preloader-editorial-light .ff-preloader-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.ff-preloader-editorial-light .ff-preloader-track {
    width: 180px;
    height: 3px;
    background: #e2ded5;
    border-radius: 99px;
    overflow: hidden;
}

.ff-preloader-editorial-light .ff-preloader-bar {
    width: 40%;
    height: 100%;
    background: #0f172a;
    border-radius: 99px;
    animation: ffEditorialBar 1.4s infinite ease-in-out;
}

@keyframes ffEditorialBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(120%); }
    100% { transform: translateX(250%); }
}
