/* ─────────────────────────────────────────────────
   Campaign Popup — Overlay + Modal
   1080×1350 (4:5 dikey oran), responsive
   ───────────────────────────────────────────────── */

/* Overlay */
.cpopup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    opacity: 0;
    visibility: hidden;
    transition:
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        -webkit-backdrop-filter 0.4s ease,
        opacity 0.3s ease,
        visibility 0s 0.4s;
}

.cpopup-overlay.cpopup-visible {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition:
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        -webkit-backdrop-filter 0.4s ease,
        opacity 0.3s ease,
        visibility 0s 0s;
}

/* Kapanış animasyonu */
.cpopup-overlay.cpopup-closing {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    opacity: 0;
    visibility: hidden;
    transition:
        background 0.3s ease,
        backdrop-filter 0.3s ease,
        -webkit-backdrop-filter 0.3s ease,
        opacity 0.3s ease,
        visibility 0s 0.35s;
}

.cpopup-overlay.cpopup-closing .cpopup-modal {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
}

/* Modal */
.cpopup-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 5;
    max-height: 85vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);

    /* Slide-up + fade-in */
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition:
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpopup-visible .cpopup-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Medya (görsel veya video) */
.cpopup-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Link içindeki video/görsel tıklamayı engellemesin — link'e iletsin */
.cpopup-link .cpopup-media {
    pointer-events: none;
}

/* Tıklanabilir link wrapper */
.cpopup-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

/* Kapatma butonu */
.cpopup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cpopup-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.cpopup-close:active {
    transform: scale(0.95);
}

.cpopup-close svg {
    pointer-events: none;
}

/* ─── RESPONSIVE ──────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
    .cpopup-modal {
        max-width: 380px;
        border-radius: 10px;
    }
}

/* Mobil */
@media (max-width: 670px) {
    .cpopup-overlay {
        align-items: flex-end;
        padding-bottom: 12px;
    }

    .cpopup-modal {
        width: 92%;
        max-width: none;
        max-height: 88vh;
        border-radius: 14px;

        /* Mobilde aşağıdan yukarı gelsin */
        transform: translateY(60px);
    }

    .cpopup-visible .cpopup-modal {
        transform: translateY(0);
    }

    .cpopup-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
    }
}

/* Küçük mobil */
@media (max-width: 400px) {
    .cpopup-modal {
        width: 95%;
        max-height: 90vh;
    }
}

/* Landscape mobil */
@media (max-height: 500px) and (orientation: landscape) {
    .cpopup-modal {
        max-height: 90vh;
        aspect-ratio: auto;
        max-width: 280px;
    }

    .cpopup-overlay {
        align-items: center;
        padding-bottom: 0;
    }
}
