/* ============================================================
   Loading Overlay - Lottie Şef Animasyonu
   ============================================================ */

.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeInUp 0.45s ease;
}

/* ============================================================
   LOTTİE ŞEF ANİMASYONU
   ============================================================ */

.chef-lottie-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
}

.chef-lottie-container {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 60%,
        rgba(255, 160, 30, 0.09) 0%,
        transparent 70%);
    filter: drop-shadow(0 6px 28px rgba(255, 140, 0, 0.18));
}

/* Lottie yüklenemezse yedek spinner */
.chef-fallback-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f4f6;
    border-top-color: #FF8000;
    border-radius: 50%;
    animation: spinnerRotate 1s linear infinite;
    margin: 88px auto;
}

/* ============================================================
   YÜKLEME METNİ
   ============================================================ */

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.3px;
    position: relative;
    text-align: center;
    transition: opacity 0.35s ease;
}

.loading-text::after {
    content: '';
    animation: dots 1.2s steps(4, end) infinite;
}

.loading-subtext {
    font-size: 13px;
    color: #9ca3af;
    margin-top: -10px;
    animation: fadeInOut 2s ease-in-out infinite;
}

/* ============================================================
   İLERLEME ÇUBUĞU
   ============================================================ */

.loading-progress {
    width: 220px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF8000, #FFA500, #FF8000);
    background-size: 200% 100%;
    animation: progressMove 1.5s ease-in-out infinite;
    border-radius: 2px;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes textPulse {
    0%, 100% { opacity: 1;   transform: translateY(0);   }
    50%      { opacity: 0.8; transform: translateY(-2px); }
}

@keyframes dots {
    0%, 20%   { content: '';    }
    40%       { content: '.';   }
    60%       { content: '..';  }
    80%, 100% { content: '...'; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1;   }
}

@keyframes progressMove {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%);  }
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* ============================================================
   DARK MODE
   ============================================================ */

@media (prefers-color-scheme: dark) {
    .page-loading-overlay {
        background: rgba(17, 24, 39, 0.97);
    }
    .loading-text    { color: #f9fafb; }
    .loading-subtext { color: #6b7280; }
}

/* ============================================================
   MOBİL UYUM
   ============================================================ */

@media (max-width: 480px) {
    .chef-lottie-container {
        width: 200px;
        height: 200px;
    }
    .loading-text    { font-size: 15px; }
    .loading-subtext { font-size: 12px; }
    .loading-progress { width: 180px; }
}

/* ============================================================
   INLINE LOADING
   ============================================================ */

.inline-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.inline-loading .spinner-small {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #FF8000;
    border-radius: 50%;
    animation: spinnerRotate 1s linear infinite;
}

.inline-loading p {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}
