/**
 * Styles for Micromodal implementation in Membes plugin
 */

.wp-membes-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    overflow: hidden;
}

.wp-membes-modal__container {
    background-color: #fff;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    width: 90vw;
    height: 80vh;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}

.wp-membes-modal__header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 20px 0 20px;
}

.wp-membes-modal__content {
    flex: 1;
    padding: 0 20px 20px 20px;
    overflow-y: auto;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.8);
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.wp-membes-modal__content iframe {
    width: 100%;
    height: 100%;
    border: 0;
    flex: 1;
    min-height: 400px;
    display: block;
}

.wp-membes-modal__close {
    background: transparent;
    border: 0;
    font-size: 24px;
    line-heiht: 1;
    cursor: pointer;
    outline: none;
    padding: 0;
    color: #999;
    transition: color 0.2s ease;
}

.wp-membes-modal__close:hover {
    color: #333;
}

/* Animations */
.wp-membes-micromodal-slide {
    display: none;
}

.wp-membes-micromodal-slide.is-open {
    display: block;
}

/* Prevent page shift when modal opens */
html.wp-membes-has-modal-open {
    overflow: hidden;
}

html.wp-membes-has-modal-open body {
    padding-right: var(--scrollbar-width, 0px);
}

.wp-membes-micromodal-slide[aria-hidden="false"] .wp-membes-modal__overlay {
    animation: wp-membes-mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.wp-membes-micromodal-slide[aria-hidden="false"] .wp-membes-modal__container {
    animation: wp-membes-mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.wp-membes-micromodal-slide[aria-hidden="true"] .wp-membes-modal__overlay {
    animation: wp-membes-mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

.wp-membes-micromodal-slide[aria-hidden="true"] .wp-membes-modal__container {
    animation: wp-membes-mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

.wp-membes-micromodal-slide .wp-membes-modal__container,
.wp-membes-micromodal-slide .wp-membes-modal__overlay {
    will-change: transform, opacity;
}

@keyframes wp-membes-mmfadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wp-membes-mmfadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes wp-membes-mmslideIn {
    from {
        transform: translateY(15%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes wp-membes-mmslideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-10%);
        opacity: 0;
    }
}
