/* Chiến dịch mời khách đăng ký KOC — app/views/_shared/koc-aff-campaign.php (#98f1040f).
   Banner tự đủ bằng style inline (CSS này nạp không chặn render), file chỉ cần cho popup.
   --koc-aff-css: JS chỉ mở popup khi thấy biến này (CSS chưa nạp thì thôi, không hiện popup vỡ). */
.koc-aff-popup {
    --koc-aff-css: 1;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100010;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity .2s ease;
    font-family: inherit;
}
.koc-aff-popup.is-open {
    display: flex !important;
    opacity: 1;
}
.koc-aff-popup__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(10, 25, 45, .6);
}
.koc-aff-popup__card {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 100%;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    transform: scale(.96);
    transition: transform .2s ease;
}
.koc-aff-popup.is-open .koc-aff-popup__card {
    transform: scale(1);
}
/* Ảnh 720x1080 đã vẽ sẵn khối chữ + nút ở phần dưới (từ ~y=665): chỉ lấy phần ảnh trên 720x640,
   chữ và nút thật nằm ở .koc-aff-popup__body. */
.koc-aff-popup__visual {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 88.89%;
    overflow: hidden;
    background: #eaf5fa;
}
.koc-aff-popup__visual img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: block;
}
/* Nút đóng thật đè đúng chỗ nút X vẽ trong ảnh (tâm ~ 92% ngang, ~28px từ trên ở khung 360-380px). */
.koc-aff-popup__x {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.koc-aff-popup__x svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
}
.koc-aff-popup__body {
    position: relative;
    margin-top: -18px;
    padding: 20px 20px 12px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    text-align: center;
}
.koc-aff-popup__eyebrow {
    color: #2199c4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.koc-aff-popup__title {
    color: #0f2350;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}
.koc-aff-popup__desc {
    color: #444;
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 16px;
}
.koc-aff-popup__cta {
    display: block;
    padding: 13px 16px;
    border-radius: 10px;
    background: #2199c4;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1.3;
}
.koc-aff-popup__cta:hover,
.koc-aff-popup__cta:focus {
    background: #1a86ad;
}
.koc-aff-popup__later {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 15px;
    cursor: pointer;
}
.koc-aff-popup__later:hover {
    color: #333;
}
