/*
 * ROUND FLAGS CSS - HOMEPAGE CIRCULAR FLAG DESIGN
 * Makes flag icons circular with beautiful borders and shadows
 * Version: 1.0.0
 * Date: 2024-08-26
 */

/* ========================================
   ROUND FLAG CONTAINER
   ======================================== */

.round-flag-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(12, 224, 107, 0.3);
    transition: all 0.3s ease;
}

.round-flag-container:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(12, 224, 107, 0.6);
}

/* Flag icon inside round container */
.round-flag-container .fi {
    font-size: 36px !important;
    line-height: 1 !important;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(50%);
    transform: scale(1.2);
}

/* ========================================
   SIZE VARIATIONS
   ======================================== */

/* Large round flags */
.round-flag-container.large {
    width: 60px;
    height: 60px;
}

.round-flag-container.large .fi {
    font-size: 38px !important;
}

/* Small round flags */
.round-flag-container.small {
    width: 44px;
    height: 44px;
}

.round-flag-container.small .fi {
    font-size: 28px !important;
}

/* Extra small round flags */
.round-flag-container.xs {
    width: 32px;
    height: 32px;
}

.round-flag-container.xs .fi {
    font-size: 20px !important;
}

/* ========================================
   THEME SUPPORT
   ======================================== */

/* Dark theme */
body:not(.light-theme) .round-flag-container {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body:not(.light-theme) .round-flag-container:hover {
    border-color: rgba(12, 224, 107, 0.6);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Light theme */
body.light-theme .round-flag-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: rgba(12, 224, 107, 0.3);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .round-flag-container {
        width: 44px;
        height: 44px;
    }
    
    .round-flag-container .fi {
        font-size: 28px !important;
    }
    
    .round-flag-container.large {
        width: 50px;
        height: 50px;
    }
    
    .round-flag-container.large .fi {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    .round-flag-container {
        width: 44px;
        height: 44px;
    }
    
    .round-flag-container .fi {
        font-size: 28px !important;
    }
    
    .round-flag-container.large {
        width: 48px;
        height: 48px;
    }
    
    .round-flag-container.large .fi {
        font-size: 30px !important;
    }
}

/* ========================================
   HOMEPAGE SPECIFIC STYLES
   ======================================== */

/* Country items in popular section */
.popular-countries .country-item .round-flag-container {
    margin-bottom: 8px;
}

/* Countries grid flags */
.countries-grid .country-tab .round-flag-container {
    margin-bottom: 12px;
}

/* Country popup flags */
.countries-popup .country-item .round-flag-container {
    margin-right: 12px;
}

/* Search results flags */
.hero-search-result .round-flag-container {
    margin-right: 10px;
    width: 36px;
    height: 36px;
}

.hero-search-result .round-flag-container .fi {
    font-size: 22px !important;
}

/* ========================================
   ANIMATION EFFECTS
   ======================================== */

/* Subtle pulse animation for active flags */
.round-flag-container.active {
    animation: flagPulse 2s ease-in-out infinite;
}

@keyframes flagPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(12, 224, 107, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(12, 224, 107, 0.3);
    }
}

/* Glow effect for featured flags */
.round-flag-container.featured {
    border-color: rgba(12, 224, 107, 0.8);
    box-shadow: 
        0 4px 12px rgba(12, 224, 107, 0.3),
        0 0 0 2px rgba(12, 224, 107, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Loading state */
.round-flag-container.loading {
    opacity: 0.6;
    animation: flagLoading 1.5s ease-in-out infinite;
}

@keyframes flagLoading {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}