/* ── RoyalXtream Popup Frontend v2.2 ── */

/* OVERLAY – centrado siempre */
.rxpop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow: hidden;
}
.rxpop-overlay.rxpop-visible {
    opacity: 1;
    pointer-events: all;
}

/* MODAL */
.rxpop-modal {
    background: #161616;
    border: 1px solid rgba(240,192,64,0.3);
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
    margin: auto;
    /* Cabe en pantalla siempre */
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}
.rxpop-overlay.rxpop-visible .rxpop-modal {
    transform: translateY(0) scale(1);
}

.rxpop-modal-inner {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

/* BOTÓN CERRAR */
.rxpop-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: all 0.2s;
    line-height: 1;
    backdrop-filter: blur(4px);
}
.rxpop-close:hover {
    background: rgba(0,0,0,0.88);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

/* CARRUSEL */
.rxpop-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    /* Se encoge para dar espacio a los botones */
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rxpop-slide { display: none; flex: 1; min-height: 0; }
.rxpop-slide.active { display: flex; flex-direction: column; }
.rxpop-slide img {
    width: 100%;
    height: 100%;
    /* contain: imagen completa sin recorte */
    object-fit: contain;
    object-position: top;
    display: block;
    flex: 1;
    min-height: 0;
}

.rxpop-dots {
    position: absolute;
    bottom: 10px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 6px;
}
.rxpop-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer; transition: all 0.2s;
}
.rxpop-dot.active { background: #F0C040; transform: scale(1.3); }

/* BODY */
.rxpop-body {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(240,192,64,0.15);
    text-align: center;
    /* Nunca se encoge — siempre visible */
    flex-shrink: 0;
    background: #161616;
}
.rxpop-titulo {
    font-size: clamp(17px, 4vw, 22px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    font-family: sans-serif;
    line-height: 1.3;
    word-break: break-word;
}
.rxpop-sub {
    font-size: clamp(12px, 3vw, 14px);
    color: #aaa;
    line-height: 1.65;
    margin: 0 0 18px;
    word-break: break-word;
    white-space: pre-line;
}

/* BOTÓN */
.rxpop-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #F0C040, #FFD700);
    color: #111 !important;
    font-weight: 700;
    font-size: clamp(13px, 3vw, 15px);
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.25s;
    box-shadow: 0 4px 18px rgba(240,192,64,0.3);
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    text-align: center;
}
.rxpop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(240,192,64,0.42);
}

/* NO MOSTRAR */
.rxpop-noshow {
    display: flex; align-items: center; justify-content: center;
    gap: 7px; margin-top: 14px;
    font-size: 12px; color: #555; cursor: pointer;
}
.rxpop-noshow input { accent-color: #F0C040; cursor: pointer; }
.rxpop-noshow:hover { color: #888; }

/* ── ANUNCIO ── */
.rxpop-modal-anuncio { border-color: rgba(255,120,0,0.4); }
.rxpop-modal-anuncio .rxpop-modal-inner::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FF8C00, #FFD700, #FF8C00, transparent);
}

.rxpop-anuncio-img {
    width: 100%;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}
.rxpop-anuncio-img img {
    width: 100%;
    object-fit: contain;
    object-position: top;
    display: block;
    flex: 1;
    min-height: 0;
}

.rxpop-anuncio-badge {
    display: inline-block;
    background: rgba(255,140,0,0.15);
    border: 1px solid rgba(255,140,0,0.4);
    color: #FFA500;
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    padding: 4px 12px; border-radius: 20px;
    margin-bottom: 12px; text-transform: uppercase;
}
.rxpop-btn-anuncio {
    background: linear-gradient(135deg, #FF8C00, #FFD700);
}

/* RESPONSIVE – solo ajustes menores, siempre centrado */
@media (max-width: 520px) {
    .rxpop-overlay { padding: 12px; }
    .rxpop-modal { max-width: 100%; border-radius: 16px; }
    .rxpop-modal-inner { border-radius: 16px; }
    .rxpop-carousel { border-radius: 16px 16px 0 0; }
    .rxpop-anuncio-img { border-radius: 16px 16px 0 0; }
    .rxpop-body { padding: 16px 16px 22px; }
    .rxpop-close { top: 8px; right: 8px; position: absolute; }
}
