/* Modal Background */
.reg-widget-modal-bg {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Modal Content */
.reg-widget-modal {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    box-sizing: border-box;
    z-index: 9999;
}

/* When Modal is Opened */
.reg-widget-modal-bg[opened],
.reg-widget-modal[opened] {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.reg-widget-modal-flutter-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.reg-widget-model-close-btn {
    width: 24px;
    height: 24px;
    position: absolute;
    right: 20px;
    top: 26px;
    z-index: 100;
    cursor: pointer;
}

.grecaptcha-logo,
.grecaptcha-badge {
    display: none !important;
    box-shadow: none !important;
}

/* Mobile and Tablet */
@media (max-width: 1023px) {
    .reg-widget-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        top: 0;
        left: 0;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .reg-widget-modal {
        width: 420px;
        height: 720px;
        max-height: calc(100vh - 40px);
        min-height: 560px;
        top: 50%;
        left: 50%;
        margin-left: -210px;
        margin-top: calc(-1 * min(360px, (100vh - 40px) / 2));
        border-radius: 15px;
    }
}