/**
 * Viozzo Country Plans Popup/Modal Styles
 * Version: 1.0.0
 * Description: Modal popup for "View All Countries" functionality
 */

/* ============================================================================
   MODAL OVERLAY & CONTAINER
   ============================================================================ */

.viozzo-countries-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.viozzo-countries-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.viozzo-modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.viozzo-countries-modal.active .viozzo-modal-content {
    transform: scale(1);
}

/* ============================================================================
   MODAL HEADER
   ============================================================================ */

.viozzo-modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.viozzo-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f3f4f6;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.viozzo-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
    transform: scale(1.05);
}

/* Search Bar - MATCHING SLIDER DESIGN */
.viozzo-modal-search {
    position: relative;
    margin-top: 16px;
}

.viozzo-modal-search input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border: 2px solid #007bff !important;
    border-radius: 25px !important;
    padding: 20px 30px 20px 60px !important;
    color: #222222 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2), 0 0 0 1px #E0E6F5 !important;
    line-height: 1.5 !important;
    -webkit-text-fill-color: #222222 !important;
    font-family: inherit;
}

.viozzo-modal-search input::placeholder {
    color: #4A4A4A !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
}

.viozzo-modal-search input::-webkit-input-placeholder {
    color: #4A4A4A !important;
    opacity: 0.8 !important;
}

.viozzo-modal-search input::-moz-placeholder {
    color: #4A4A4A !important;
    opacity: 0.8 !important;
}

.viozzo-modal-search input:-ms-input-placeholder {
    color: #4A4A4A !important;
    opacity: 0.8 !important;
}

.viozzo-modal-search input:-moz-placeholder {
    color: #4A4A4A !important;
    opacity: 0.8 !important;
}

.viozzo-modal-search input:focus {
    background: rgba(0, 123, 255, 0.15) !important;
    border-color: #007bff !important;
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.4), 0 0 0 3px rgba(0, 123, 255, 0.2) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

.viozzo-modal-search input:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(0, 123, 255, 0.8) !important;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3), 0 0 0 2px rgba(0, 123, 255, 0.15) !important;
    transform: translateY(-1px) !important;
}

.viozzo-modal-search .search-icon {
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #007bff !important;
    font-size: 20px !important;
    z-index: 2 !important;
    animation: globeRotate 4s linear infinite !important;
    display: block !important;
    pointer-events: none !important;
}

@keyframes globeRotate {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ============================================================================
   MODAL BODY
   ============================================================================ */

.viozzo-modal-body {
    padding: 24px 32px 32px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar */
.viozzo-modal-body::-webkit-scrollbar {
    width: 8px;
}

.viozzo-modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.viozzo-modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.viozzo-modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Section Titles */
.viozzo-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
}

/* ============================================================================
   POPULAR COUNTRIES
   ============================================================================ */

.viozzo-popular-countries {
    margin-bottom: 32px;
}

.viozzo-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.viozzo-popular-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #f9fafb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.viozzo-popular-item:hover {
    background: #ffffff;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.viozzo-popular-item .country-flag-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid #e5e7eb;
}

.viozzo-popular-item .country-flag-circle .fi {
    width: 100%;
    height: 100%;
    display: block;
    background-size: cover;
}

.viozzo-popular-item .country-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

/* ============================================================================
   PERFECT FOR YOU SECTION
   ============================================================================ */

.viozzo-perfect-section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.viozzo-perfect-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.viozzo-perfect-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid #f3f4f6;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.viozzo-perfect-item:hover {
    border-color: #007bff;
    background: #f8faff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.viozzo-perfect-item .perfect-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.viozzo-perfect-item .perfect-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viozzo-perfect-item .perfect-icon-placeholder {
    font-size: 24px;
}

.viozzo-perfect-item .perfect-info {
    flex: 1;
}

.viozzo-perfect-item .perfect-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.viozzo-perfect-item .perfect-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.viozzo-perfect-item .perfect-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 12px;
    text-transform: uppercase;
}

.viozzo-perfect-item .perfect-arrow {
    color: #d1d5db;
    font-size: 16px;
    margin-left: 12px;
}

.viozzo-perfect-item:hover .perfect-arrow {
    color: #007bff;
}

/* ============================================================================
   ALL COUNTRIES SECTION
   ============================================================================ */

.viozzo-all-countries {
    margin-top: 32px;
}

/* Region Tabs */
.viozzo-region-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.viozzo-region-tab {
    padding: 10px 20px;
    background: #f3f4f6;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.viozzo-region-tab:hover {
    background: #e5e7eb;
    color: #111827;
}

.viozzo-region-tab.active {
    background: #007bff;
    color: #ffffff;
}

/* Countries List */
.viozzo-countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.viozzo-country-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #ffffff;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.viozzo-country-item:hover {
    border-color: #007bff;
    background: #f8faff;
    transform: translateX(4px);
}

.viozzo-country-item .country-flag-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 14px;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

.viozzo-country-item .country-flag-small .fi {
    width: 100%;
    height: 100%;
    display: block;
    background-size: cover;
}

.viozzo-country-item .country-details {
    flex: 1;
}

.viozzo-country-item .country-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.viozzo-country-item .country-label {
    font-size: 12px;
    color: #6b7280;
}

.viozzo-country-item .country-arrow {
    color: #d1d5db;
    font-size: 14px;
    margin-left: 8px;
}

.viozzo-country-item:hover .country-arrow {
    color: #007bff;
}

/* ============================================================================
   BADGE STYLING
   ============================================================================ */

.viozzo-country-item .for-you-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
}

.viozzo-country-item .hot-deal-badge {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .viozzo-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }

    .viozzo-modal-header {
        padding: 24px 20px 20px;
    }

    .viozzo-modal-body {
        padding: 20px;
        max-height: calc(95vh - 180px);
    }

    .viozzo-popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .viozzo-popular-item {
        padding: 16px 12px;
    }

    .viozzo-popular-item .country-flag-circle {
        width: 48px;
        height: 48px;
    }

    .viozzo-perfect-item {
        padding: 14px 16px;
    }

    .viozzo-perfect-item .perfect-icon-container {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }

    .viozzo-perfect-item .perfect-title {
        font-size: 15px;
    }

    .viozzo-perfect-item .perfect-subtitle {
        font-size: 12px;
    }

    .viozzo-perfect-item .perfect-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .viozzo-region-tabs {
        gap: 6px;
    }

    .viozzo-region-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .viozzo-countries-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .viozzo-popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .viozzo-popular-item .country-name {
        font-size: 12px;
    }
}
