/* Animated Loading Screens with Clinic Mascot */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-container {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Mascot Styling */
.mascot-container {
    margin-bottom: 30px;
}

.mascot-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Medical Symbol Animations */
.mascot-svg {
    animation: gentle-bounce 2s infinite ease-in-out;
}

.mascot-svg .highlight-1,
.mascot-svg .highlight-2,
.mascot-svg .highlight-3,
.mascot-svg .highlight-4 {
    animation: highlight-pulse 3s infinite ease-in-out;
}

.mascot-svg circle:first-child {
    animation: symbol-glow 2s infinite alternate ease-in-out;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes highlight-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes symbol-glow {
    0% { fill: #0f766e; }
    100% { fill: #14b8a6; }
}

/* Loading Text */
.loading-text {
    margin-bottom: 30px;
}

.loading-title {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(45deg, #0f766e, #115e59);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Dots */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.loading-dots .dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #0f766e, #115e59);
    border-radius: 50%;
    opacity: 0.3;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(15, 118, 110, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0f766e, #115e59);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Sparkle Effects */
.sparkles text {
    font-size: 16px;
    opacity: 0.7;
    animation: sparkle-twinkle 2s infinite ease-in-out;
}

@keyframes sparkle-twinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(0.8) rotate(0deg);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-container {
        max-width: 300px;
        padding: 30px 20px;
        margin: 20px;
    }
    
    .mascot-svg {
        width: 100px;
        height: 100px;
    }
    
    .loading-title {
        font-size: 1.2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loading-overlay,
    .mascot-svg,
    .loading-dots .dot,
    .progress-fill,
    .sparkles text {
        animation: none !important;
        transition: none !important;
    }
    
    .mascot-svg {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .loading-container {
        background: rgba(30, 30, 30, 0.95);
        color: white;
    }
    
    .loading-title {
        background: linear-gradient(45deg, #5eead4, #2dd4bf);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .progress-bar {
        background: rgba(94, 234, 212, 0.2);
    }
}

/* Special Loading States */
.loading-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.loading-error {
    background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
}

.loading-processing {
    background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 100%);
}

/* Floating Elements */
.loading-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-1 6s infinite ease-in-out;
}

.loading-container::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-2 8s infinite ease-in-out reverse;
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-180deg); }
}