/* Popup del sitio — aviso una vez por día */

body.scp-site-popup-open {
    overflow: hidden;
}

.scp-site-popup {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.scp-site-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.scp-site-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 30, 0.72);
}

.scp-site-popup__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(88vh, 780px);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.scp-site-popup.is-open .scp-site-popup__dialog {
    transform: translateY(0) scale(1);
}

.scp-site-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(90deg, #7c3aed 0%, #6b21a8 100%);
    color: #fff;
    flex-shrink: 0;
}

.scp-site-popup__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.scp-site-popup__title--empty {
    flex: 1;
}

.scp-site-popup__close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.scp-site-popup__close:hover,
.scp-site-popup__close:focus {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

.scp-site-popup__body {
    padding: 22px 24px 24px;
    overflow-y: auto;
    color: var(--scp-text, #222);
}

.scp-site-popup__content > *:first-child {
    margin-top: 0;
}

.scp-site-popup__content > *:last-child {
    margin-bottom: 0;
}

.scp-site-popup__content p,
.scp-site-popup__content ul,
.scp-site-popup__content ol,
.scp-site-popup__content blockquote {
    margin: 0 0 0.85em;
}

.scp-site-popup__content ul,
.scp-site-popup__content ol {
    padding-left: 1.25em;
}

.scp-site-popup__content a {
    color: var(--scp-purple, #6B21A8);
    text-decoration: underline;
}

.scp-site-popup__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.scp-site-popup--media .scp-site-popup__dialog {
    width: auto;
    max-width: min(92vw, 720px);
    max-height: 92vh;
    background: transparent;
    overflow: visible;
    box-shadow: none;
}

.scp-site-popup--media .scp-site-popup__body {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #0b0614;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.scp-site-popup--media .scp-site-popup__content,
.scp-site-popup--media .scp-site-popup__content p,
.scp-site-popup--media .scp-site-popup__content figure {
    margin: 0;
    line-height: 0;
}

.scp-site-popup--media .scp-site-popup__content img {
    display: block;
    width: auto;
    max-width: min(92vw, 720px);
    max-height: 92vh;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.scp-site-popup__close--float {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 1.7rem;
}

.scp-site-popup__close--float:hover,
.scp-site-popup__close--float:focus {
    background: rgba(0, 0, 0, 0.82);
}

.scp-site-popup__content h1,
.scp-site-popup__content h2,
.scp-site-popup__content h3 {
    margin: 0 0 0.5em;
    line-height: 1.25;
    color: var(--scp-dark, #0f0f0f);
}

@media (max-width: 600px) {
    .scp-site-popup {
        padding: 12px;
        align-items: center;
    }

    .scp-site-popup__dialog {
        width: 100%;
        max-height: min(86vh, 640px);
        border-radius: 14px 14px 8px 8px;
    }

    .scp-site-popup--media .scp-site-popup__dialog,
    .scp-site-popup--media .scp-site-popup__content img {
        max-width: calc(100vw - 24px);
        max-height: 86vh;
    }
}
