/* Interactive World Map Styles */

.iwm-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #be7602 0%, #d88c1a 50%, #be7602 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(190, 118, 2, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.iwm-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.iwm-search-wrapper {
    position: relative;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.iwm-search-wrapper::before {
    content: '';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23be7602'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    pointer-events: none;
}

#iwm-search {
    width: 100%;
    padding: 18px 60px 18px 25px;
    font-size: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(190, 118, 2, 0.1) inset;
    outline: none;
    transition: all 0.4s ease;
    font-weight: 500;
    text-align: right;
    direction: rtl;
}

#iwm-search:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    background: white;
}

#iwm-search::placeholder {
    color: #be7602;
    opacity: 0.6;
}

#iwm-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border: 2px solid rgba(190, 118, 2, 0.1);
}

#iwm-search-results::-webkit-scrollbar {
    width: 8px;
}

#iwm-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#iwm-search-results::-webkit-scrollbar-thumb {
    background: #be7602;
    border-radius: 10px;
}

.iwm-search-result {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
    font-size: 16px;
    font-weight: 500;
}

.iwm-search-result:last-child {
    border-bottom: none;
    border-radius: 0 0 18px 18px;
}

.iwm-search-result:first-child {
    border-radius: 18px 18px 0 0;
}

.iwm-search-result:hover {
    background: linear-gradient(90deg, #fff5e6, #ffffff);
    color: #be7602;
    padding-right: 30px;
    font-weight: 600;
}

#iwm-map {
    width: 100%;
    height: 650px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.2);
    background: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.iwm-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.iwm-popup-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iwm-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.iwm-popup-close:hover {
    background: rgba(0,0,0,0.2);
    transform: rotate(90deg);
}

.iwm-popup-body {
    padding: 30px;
}

.iwm-popup-body img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.iwm-popup-body h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
}

.iwm-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.iwm-read-more {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #be7602 0%, #8a5501 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(190, 118, 2, 0.4);
}

.iwm-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(190, 118, 2, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .iwm-container {
        padding: 15px;
    }
    
    #iwm-map {
        height: 400px;
    }
    
    .iwm-popup-body {
        padding: 20px;
    }
    
    .iwm-popup-body h3 {
        font-size: 22px;
    }
}

/* Leaflet adjustments */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

/* Country labels with flags */
.country-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 1000 !important;
}

.country-flag-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)) !important;
    padding: 6px 14px !important;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(190, 118, 2, 0.1) !important;
    white-space: nowrap;
    font-size: 14px !important;
    font-weight: 700 !important;
    border: 2px solid rgba(190, 118, 2, 0.2);
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-flag-label:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(190, 118, 2, 0.3) !important;
}

.country-flag-label img {
    display: inline-block !important;
    vertical-align: middle;
    border-radius: 3px;
    width: 22px !important;
    height: auto !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.country-name {
    color: #000000 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}
