/* ===================================
   Country Gateway Popup
   =================================== */

.country-gateway-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.country-gateway-overlay.active {
    display: flex;
    opacity: 1;
}

.country-gateway-popup {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 36px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    direction: rtl;
}

.country-gateway-overlay.active .country-gateway-popup {
    transform: translateY(0) scale(1);
}

/* Close button */
.country-gateway-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s, color 0.2s;
}

.country-gateway-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* Header */
.country-gateway-header {
    margin-bottom: 28px;
}

.country-gateway-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.country-gateway-header p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Buttons grid */
.country-gateway-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.country-gateway-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    border-radius: 14px;
    border: 2px solid #e8e8e8;
    background: #fafafa;
    text-decoration: none;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.25s ease;
}

.country-gateway-btn:hover {
    border-color: #6c5ce7;
    background: #f0edff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.2);
}

.country-gateway-btn:active {
    transform: translateY(-1px);
}

.country-flag {
    font-size: 2.8rem;
    line-height: 1;
}

.country-name {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .country-gateway-popup {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .country-gateway-header h3 {
        font-size: 1.3rem;
    }

    .country-gateway-buttons {
        gap: 10px;
    }

    .country-gateway-btn {
        padding: 18px 10px;
    }

    .country-flag {
        font-size: 2.2rem;
    }

    .country-name {
        font-size: 0.9rem;
    }
}
