/* ==============================
   Global Loading Overlay – مطعم الأصيل
   ============================== */

/* Overlay */
#globalLoadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

#globalLoadingOverlay.active {
    display: flex;
}

/* Spinner ring */
.gl-spinner {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(200, 134, 10, 0.12);
    border-top-color: #C8860A;
    border-radius: 50%;
    animation: gl-spin 0.9s linear infinite;
    position: relative;
}
.gl-spinner::after {
    content: '🍽️';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    animation: gl-pulse 2s ease-in-out infinite;
}

/* Text */
.gl-text {
    color: #F0C060;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    animation: gl-pulse 2s ease-in-out infinite;
}

/* Bouncing dots */
.gl-dots {
    display: flex;
    gap: 5px;
}
.gl-dots span {
    width: 8px;
    height: 8px;
    background: #C8860A;
    border-radius: 50%;
    animation: gl-bounce 1.4s ease-in-out infinite;
}
.gl-dots span:nth-child(2) { animation-delay: 0.16s; }
.gl-dots span:nth-child(3) { animation-delay: 0.32s; }

/* Keyframes */
@keyframes gl-spin {
    to { transform: rotate(360deg); }
}
@keyframes gl-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.04); }
}
@keyframes gl-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-7px); }
}

/* Button loading state */
button.gl-btn-loading,
a.gl-btn-loading,
input[type="submit"].gl-btn-loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
    position: relative !important;
}
