/**
 * Loading Modal Module Styles
 * BEM Methodology - Engaging travel-themed loading animation
 */

/* ============================================
   LOADING MODAL - Block
   ============================================ */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    pointer-events: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   OVERLAY - Element
   ============================================ */
.loading-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.95), rgba(142, 68, 173, 0.95));
    backdrop-filter: blur(10px);
    animation: pulseBackground 3s ease-in-out infinite;
}

@keyframes pulseBackground {
    0%, 100% {
        opacity: 0.95;
    }
    50% {
        opacity: 0.98;
    }
}

/* ============================================
   CONTENT - Element
   ============================================ */
.loading-modal__content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

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

/* ============================================
   ANIMATION CONTAINER - Element
   ============================================ */
.loading-modal__animation {
    position: relative;
    height: 250px;
    margin-bottom: 2rem;
    overflow: visible;
}

/* ============================================
   LOCATION PIN CONTAINER - Element
   ============================================ */
.loading-modal__location-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ============================================
   LOCATION PIN SVG - Element
   ============================================ */
.loading-modal__location-pin {
    animation: spinAndDrop 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transform-origin: center 45%;
    display: block;
}

.location-svg {
    width: 100px;
    height: 140px;
    display: block;
}

/* Spinning with drop effect */
@keyframes spinAndDrop {
    0% {
        transform: translateY(-10px) rotate(0deg);
    }
    50% {
        transform: translateY(0px) rotate(180deg);
    }
    100% {
        transform: translateY(-10px) rotate(360deg);
    }
}

/* Pulse the inner circle */
.location-svg circle[fill="white"] {
    animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}


/* ============================================
   DISCOVERY ELEMENTS - Element (landmarks being discovered)
   ============================================ */
.loading-modal__discovery {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.6;
    animation: discoverFloat 6s ease-in-out infinite;
}

.loading-modal__discovery--1 {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.loading-modal__discovery--2 {
    top: 45%;
    right: 20%;
    animation-delay: 1.5s;
    font-size: 2.2rem;
}

.loading-modal__discovery--3 {
    bottom: 25%;
    left: 25%;
    animation-delay: 3s;
    font-size: 2rem;
}

@keyframes discoverFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-15px) scale(1.1);
        opacity: 0.7;
    }
}

/* ============================================
   SEARCH WAVES - Element (scanning effect)
   ============================================ */
.loading-modal__search-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    animation: searchPulse 3s ease-out infinite;
    pointer-events: none;
}

.loading-modal__search-wave--2 {
    animation-delay: 1s;
    border-color: rgba(142, 68, 173, 0.3);
}

.loading-modal__search-wave--3 {
    animation-delay: 2s;
    border-color: rgba(52, 152, 219, 0.2);
}

@keyframes searchPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ============================================
   LANDMARKS - Element
   ============================================ */
.loading-modal__landmarks {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 1rem;
}

.loading-modal__landmark {
    font-size: 3rem;
    animation: popInLandmark 0.8s ease-out both;
}

@keyframes popInLandmark {
    0% {
        transform: scale(0) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) translateY(-5px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ============================================
   TEXT SECTION - Element
   ============================================ */
.loading-modal__text {
    text-align: center;
    margin-bottom: 1.5rem;
}

.loading-modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-modal__title-icon {
    display: inline-block;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 0.7;
    }
}

.loading-modal__message {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0 0 1rem 0;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

/* ============================================
   DOTS ANIMATION - Element
   ============================================ */
.loading-modal__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-modal__dots span {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 50%;
    animation: bounceDot 1.4s ease-in-out infinite;
}

.loading-modal__dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-modal__dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-modal__dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounceDot {
    0%, 80%, 100% {
        transform: scale(0.8) translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2) translateY(-10px);
        opacity: 1;
    }
}

/* ============================================
   FACTS SECTION - Element
   ============================================ */
.loading-modal__facts {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border-left: 4px solid #3498db;
}

.loading-modal__fact {
    font-size: 0.9rem;
    color: #5a6c7d;
    margin: 0;
    font-style: italic;
    animation: slideInFact 0.6s ease-out;
}

@keyframes slideInFact {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .loading-modal__content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .loading-modal__animation {
        height: 180px;
    }
    
    .location-svg {
        width: 75px;
        height: 105px;
    }
    
    .loading-modal__discovery {
        font-size: 1.8rem;
    }
    
    .loading-modal__landmark {
        font-size: 1.5rem;
    }
    
    .loading-modal__title {
        font-size: 1.5rem;
    }
    
    .loading-modal__message {
        font-size: 0.9rem;
    }
    
    .loading-modal__search-wave {
        width: 100px;
        height: 100px;
        margin-left: -50px;
        margin-top: -50px;
    }
}

@media (max-width: 480px) {
    .loading-modal__content {
        padding: 1.5rem 1rem;
    }
    
    .location-svg {
        width: 60px;
        height: 85px;
    }
    
    .loading-modal__title {
        font-size: 1.3rem;
    }
    
    .loading-modal__landmarks {
        display: none; /* Hide landmarks on very small screens */
    }
    
    .loading-modal__discovery {
        font-size: 1.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .loading-modal {
        display: none !important;
    }
}
