/* Site popup — tema ile uyumlu, sade */

.by-popup {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    pointer-events: none;
    visibility: hidden;
}

.by-popup.is-open {
    pointer-events: auto;
    visibility: visible;
}

.by-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 1, 3, 0.62);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.by-popup.is-open .by-popup__backdrop {
    opacity: 1;
}

.by-popup__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    background: var(--white, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.by-popup.is-open .by-popup__dialog {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.by-popup__dialog--video {
    max-width: 44rem;
}

.by-popup__media-wrap {
    position: relative;
    background: var(--dark, #000103);
}

.by-popup__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.by-popup__dialog--image .by-popup__close {
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark, #000103);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.by-popup__close:hover {
    background: rgba(0, 0, 0, 0.65);
}

.by-popup__dialog--image .by-popup__close:hover {
    background: #fff;
}

.by-popup__media {
    line-height: 0;
}

.by-popup__media img {
    display: block;
    width: 100%;
    max-height: min(72vh, 32rem);
    object-fit: cover;
}

.by-popup__media-link {
    display: block;
}

.by-popup__embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.by-popup__embed iframe,
.by-popup__embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.by-popup__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem 1.125rem;
    border-top: 1px solid var(--gray-200, #e2e8f0);
}

.by-popup__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--dark, #000103);
    flex: 1;
    min-width: 0;
}

.by-popup__meta-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.by-popup__skip {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500, #64748b);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.by-popup__skip:hover {
    color: var(--dark, #000103);
}

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

@media (max-width: 575.98px) {
    .by-popup {
        align-items: flex-end;
        padding: 0;
    }

    .by-popup__dialog,
    .by-popup__dialog--video {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }

    .by-popup__meta {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.875rem 1rem 1rem;
    }

    .by-popup__meta-actions {
        width: 100%;
        justify-content: space-between;
    }

    .by-popup__media img {
        max-height: 50vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .by-popup__backdrop,
    .by-popup__dialog {
        transition: none;
    }
}
