/* Region Redirect — Modern, köşeli, app-style */

#rr-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 240ms ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Segoe UI", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#rr-popup-overlay.rr-hidden { display: none !important; }
#rr-popup-overlay.rr-animate-in { opacity: 1; }

.rr-popup {
    position: relative;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 0; /* KÖŞELİ */
    padding: 32px 28px 28px;
    max-width: 420px;
    width: calc(100% - 32px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    text-align: left;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 240ms ease;
}
#rr-popup-overlay.rr-animate-in .rr-popup {
    transform: translateY(0);
    opacity: 1;
}

/* Üst başlık: bayrak + ülke kodu */
.rr-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
.rr-popup-flag {
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
/* Twemoji bayrak boyutu (popup üst) */
.rr-popup-flag img.emoji {
    width: 28px;
    height: 28px;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}
.rr-popup-country {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #0a0a0a;
    text-transform: uppercase;
}

/* Görsel */
.rr-popup-visual {
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rr-popup-visual.rr-hidden { display: none; }
#rr-popup-image {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    border-radius: 0; /* KÖŞELİ */
    object-fit: contain;
}

/* Başlık ve mesaj */
.rr-popup-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #0a0a0a;
    letter-spacing: -0.2px;
}
.rr-popup-message {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.55;
    color: #5a5a5a;
}

/* Ana CTA buton */
.rr-btn-main {
    display: block;
    width: 100%;
    padding: 16px 18px;
    border: none;
    border-radius: 0; /* KÖŞELİ */
    background: #0a0a0a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 160ms ease, transform 100ms ease;
    font-family: inherit;
}
.rr-btn-main:hover { background: #1a1a1a; }
.rr-btn-main:active { transform: scale(0.99); }

/* Alt seçenek etiketi */
.rr-alt-label {
    margin-top: 22px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #999999;
}

/* Tag butonlar - diğer bölgeler */
.rr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rr-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5f5f5;
    color: #0a0a0a;
    border: 1px solid #ececec;
    border-radius: 0; /* KÖŞELİ */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 140ms ease;
    font-family: inherit;
}
.rr-tag:hover {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}
.rr-tag-flag {
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
/* Twemoji bayrak boyutu (tag butonlar) */
.rr-tag-flag img.emoji {
    width: 14px;
    height: 14px;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}
.rr-tag-text {
    font-size: 12px;
    letter-spacing: 0.2px;
}

/* Kapat butonu */
.rr-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #999999;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 140ms ease, background 140ms ease;
}
.rr-popup-close:hover {
    color: #0a0a0a;
    background: #f5f5f5;
}

body.rr-popup-open { overflow: hidden; }

/* ===================== MOBILE — BOTTOM SHEET ===================== */
@media (max-width: 600px) {
    #rr-popup-overlay {
        align-items: flex-end;
        justify-content: stretch;
    }

    .rr-popup {
        max-width: 100%;
        width: 100%;
        padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
        transform: translateY(100%);
        opacity: 1;
        transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
        max-height: 90vh;
        overflow-y: auto;
    }

    #rr-popup-overlay.rr-animate-in .rr-popup {
        transform: translateY(0);
    }

    /* Drag handle (görsel ipucu) */
    .rr-popup::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        background: #d0d0d0;
        margin: -8px auto 18px;
        border-radius: 0;
    }

    .rr-popup-title { font-size: 18px; }
    .rr-popup-message { font-size: 13px; }
    #rr-popup-image { max-height: 120px; }
    .rr-popup-flag { font-size: 24px; }
    .rr-popup-flag img.emoji { width: 24px; height: 24px; }
    .rr-popup-country { font-size: 13px; }

    .rr-btn-main { padding: 15px 16px; font-size: 14px; }
    .rr-tag { padding: 9px 12px; font-size: 12px; }

    .rr-popup-close {
        top: 10px;
        right: 10px;
    }
}
