/**
 * Digiturkonay OTP — iframe modal
 * Site header/footer görünür kalır; panel aradaki alana oturur.
 */
:root {
    --iris-otp-modal-inset-top: clamp(52px, 9vh, 88px);
    --iris-otp-modal-inset-bottom: clamp(60px, 11vh, 104px);
    --iris-otp-modal-inset-x: 16px;
    --iris-otp-modal-max-width: 600px;
    --iris-otp-modal-radius: 14px;
}

.iris-otp-iframe-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 14, 30, 0.45);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding:
        var(--iris-otp-modal-inset-top)
        var(--iris-otp-modal-inset-x)
        var(--iris-otp-modal-inset-bottom);
    box-sizing: border-box;
    pointer-events: auto;
}

body.iris-otp-iframe-modal-open {
    overflow: hidden;
}

.iris-otp-iframe-modal-panel {
    width: 100%;
    max-width: var(--iris-otp-modal-max-width);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--iris-otp-modal-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.28);
    animation: irisOtpModalIn 0.22s ease-out;
}

@keyframes irisOtpModalIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Düz X — tema button stillerini ezmek için span + !important */
.iris-otp-iframe-modal-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 36px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 2px !important;
    right: 4px !important;
    z-index: 10 !important;
    opacity: 0.75;
    transition: none !important;
    transform: none !important;
}

.iris-otp-iframe-modal-close,
.iris-otp-iframe-modal-close:hover,
.iris-otp-iframe-modal-close:focus,
.iris-otp-iframe-modal-close:active {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    opacity: 0.9;
    color: #111827 !important;
}

.iris-otp-iframe-modal-close svg {
    width: 28px;
    height: 28px;
    display: block;
    pointer-events: none;
    stroke: currentColor;
    fill: none;
}

.iris-otp-iframe-modal-frame-wrap {
    flex: 1 1 auto;
    min-height: 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.iris-otp-iframe-modal-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    border: 0;
    display: block;
    background: #ffffff;
}

.iris-otp-iframe-modal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    color: #444;
    z-index: 2;
    pointer-events: none;
}

/* Tablet / geniş ekran — panel daha geniş */
@media (min-width: 768px) {
    :root {
        --iris-otp-modal-inset-x: 24px;
        --iris-otp-modal-max-width: 640px;
    }
}

@media (min-width: 1024px) {
    :root {
        --iris-otp-modal-inset-top: clamp(64px, 8vh, 96px);
        --iris-otp-modal-inset-bottom: clamp(72px, 10vh, 112px);
        --iris-otp-modal-max-width: 680px;
        --iris-otp-modal-inset-x: 32px;
    }
}

/*
 * Mobil — header/footer görünür kalsın; panel siyah çizgi aralığını doldursun.
 * Üst ~header altı, alt ~footer üstü; iframe çevresi 5px.
 */
@media (max-width: 767px) {
    :root {
        /* Header logo görünsün; panel buradan başlar */
        --iris-otp-modal-inset-top: 52px;
        /* Footer logo görünsün; panel buraya kadar iner */
        --iris-otp-modal-inset-bottom: 58px;
        --iris-otp-modal-inset-x: 5px;
        --iris-otp-modal-max-width: 100%;
        --iris-otp-modal-radius: 14px;
    }

    .iris-otp-iframe-modal-overlay {
        align-items: stretch;
        justify-content: center;
        background: rgba(10, 14, 30, 0.42);
        padding:
            var(--iris-otp-modal-inset-top)
            var(--iris-otp-modal-inset-x)
            var(--iris-otp-modal-inset-bottom);
    }

    .iris-otp-iframe-modal-panel {
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        padding: 5px;
        box-sizing: border-box;
        border-radius: var(--iris-otp-modal-radius);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    }

    .iris-otp-iframe-modal-frame-wrap {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .iris-otp-iframe-modal-frame {
        margin-top: 0;
        width: 100%;
        height: 100%;
        flex: 1 1 auto;
        min-height: 0;
    }

    .iris-otp-iframe-modal-close {
        top: 6px !important;
        right: 6px !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        font-size: 40px !important;
    }

    .iris-otp-iframe-modal-close svg {
        width: 32px;
        height: 32px;
    }
}

/* Çok kısa ekranlar (yatay telefon vb.) */
@media (max-width: 767px) and (max-height: 560px) {
    :root {
        --iris-otp-modal-inset-top: 40px;
        --iris-otp-modal-inset-bottom: 44px;
    }
}
