.iba-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.iba-modal.is-open {
    display: flex;
}

.iba-modal__backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.iba-modal.is-open .iba-modal__backdrop {
    opacity: 1;
}

.iba-modal__dialog {
    position: relative;
    margin: auto;
    width: 100%;
    max-width: 56rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.iba-modal.is-open .iba-modal__dialog {
    transform: none;
    opacity: 1;
}
.iba-modal__ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.iba-modal__ratio > video,
.iba-modal__ratio > iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 98%;
    height: 98%;
    border: 0;
    margin: auto;
    transform: translate(-50%, -50%);
    border-radius: 12px;
}

.iba-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    border-radius: 9999px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.iba-modal__close:hover,
.iba-modal__close:focus {
    background: rgba(0, 0, 0, 0.8);
    outline: none;
}
.iba-modal__body {
    padding: 1.75rem 2rem 2rem;
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.6;
    max-height: 65vh;
    overflow-y: auto;
}
.iba-modal__dialog > .iba-modal__body:first-of-type {
    padding-top: 3rem;
}

.iba-modal__body > :first-child {
    margin-top: 0;
}

.iba-modal__body > :last-child {
    margin-bottom: 0;
}

.iba-modal__body h1,
.iba-modal__body h2,
.iba-modal__body h3,
.iba-modal__body h4 {
    margin: 0 0 0.75rem;
    line-height: 1.25;
    color: #111827;
}

.iba-modal__body h2 {
    font-size: 1.5rem;
}

.iba-modal__body h3 {
    font-size: 1.25rem;
}

.iba-modal__body p {
    margin: 0 0 1rem;
}

.iba-modal__body a {
    color: #2563eb;
    text-decoration: underline;
}

.iba-modal__body ul,
.iba-modal__body ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.iba-modal__body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}
body.iba-modal-open {
    overflow: hidden;
    padding-right: 6px;
}
