#opg-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#opg-modal.opg-show {
    display: flex;
}

#opg-modal .opg-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.22);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

#opg-modal .opg-dialog {
    position: relative;
    width: 80vw; /* Adjust to make the modal smaller */
    max-width: 900px; /* Maximum width */
    min-height: 60vh; /* Ensure it has some height */
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Light shadow */
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(460px, 1fr); /* Maintain left-right split */
    overflow: hidden;
    z-index: 2;
    padding: 0;
}

p.opg-note {
    text-align: center !important;
}

/* Make buttons full width like screenshot */
#opg-modal .opg-full-btn {
    width: 100%;
    height: 54px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

/* OTP section spacing */
#opg-modal #opg-otp-step {
    display: none;
    margin-top: 12px;
}

/* OTP input spacing */
#opg-modal #opg-otp-step .opg-pill-input {
    margin-bottom: 10px;
}

/* Fix stack alignment */
#opg-modal .opg-form-wrap {
    display: flex;
    flex-direction: column;
}

#opg-modal .opg-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.22);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

#opg-modal .opg-dialog.opg-dialog-split {
    position: relative;
    width: 80vw !important;
    border-radius: 40px !important;
    max-width: none;
    min-height: 80vh !important;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(460px, 1fr);
    overflow: hidden;
    z-index: 2;
    background: #fff;
}

#opg-modal .opg-side-panel {
    background: linear-gradient(180deg, #f8f8f8 0%, #f2f2f2 100%);
    position: relative;
    overflow: hidden;
}

#opg-modal .opg-side-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.7;
}

#opg-modal .opg-side-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 72px 40px 28px;
}

#opg-modal .opg-side-copy {
    width: 100%;
}

#opg-modal .opg-side-title {
    margin: 0;
    color: #252b59;
    font-size: 72px;
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.03em;
}

#opg-modal .opg-side-title span {
    color: #3c7bf4;
}

#opg-modal .opg-side-subtitle {
    margin: 10px 0 0;
    color: #666b7f;
    font-size: 26px;
    line-height: 1.25;
}

#opg-modal .opg-side-image-wrap {
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    margin-top: 0px;
}

#opg-modal .opg-side-image {
    max-width: 100%;
    max-height: 58vh;
    object-fit: contain;
}

#opg-modal .opg-form-panel {
    position: relative;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 64px 60px;
}

#opg-modal .opg-form-panel .opg-panel {
    display: none;
    width: 100%;
    max-width: 430px;
}

#opg-modal .opg-form-panel .opg-panel.active {
    display: block;
}

#opg-modal .opg-heading-large {
    margin: 0;
    color: #4c7df3;
    font-size: 78px;
    line-height: 0.95;
    font-weight: 700;
    text-align: center;
}

#opg-modal .opg-heading-small {
    margin: 0 0 34px;
    color: #202964;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
}

#opg-modal .opg-form-wrap {
    width: 100%;
}

#opg-modal .opg-input {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #ececec;
    background: #fff;
    color: #222;
    outline: none;
}

#opg-modal .opg-pill-input {
    height: 58px;
    border-radius: 999px;
    padding: 0 28px;
    margin-bottom: 16px;
    font-size: 16px;
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.15);
}

#opg-modal .opg-pill-input:focus,
#opg-modal .opg-phone-number-input:focus,
#opg-modal .opg-country-select:focus {
    border-color: #4c7df3;
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(76, 125, 243, 0.12);
}

#opg-modal .opg-password-wrap {
    position: relative;
}

#opg-modal .opg-password-wrap .opg-password-input {
    padding-right: 88px;
}

#opg-modal .opg-toggle-password {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-58%);
    border: 0;
    background: transparent;
    color: #4c7df3;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Screen 2 */
#opg-modal .opg-phone-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

#opg-modal .opg-country-select {
    width: 130px;
    min-width: 130px;
    height: 58px;
    border: 1px solid #ececec;
    border-radius: 999px;
    background: #fff;
    color: #222;
    padding: 0 16px;
    font-size: 16px;
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.15);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #777 50%),
        linear-gradient(135deg, #777 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 25px,
        calc(100% - 12px) 25px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

#opg-modal .opg-phone-number-input {
    height: 58px;
    border-radius: 999px;
    padding: 0 22px;
    font-size: 16px;
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.15);
    flex: 1;
    margin-bottom: 0;
}

#opg-modal .opg-phone-number-input::placeholder,
#opg-modal .opg-pill-input::placeholder {
    color: #98a1b2;
}

#opg-modal #opg-send-otp-btn {
    width: 100%;
    max-width: unset !important;
    height: 52px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#opg-modal #opg-otp-step {
    display: none;
    margin-top: 16px;
}

#opg-modal #opg-otp-step .opg-pill-input {
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

#opg-modal .opg-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
}

#opg-modal .opg-action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

#opg-modal #opg-verify-otp-btn {
    width: 100%;
    max-width: unset !important;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#opg-modal .opg-btn {
    border: 0;
    border-radius: 999px;
    height: 50px;
    padding: 0 34px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

#opg-modal .opg-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

#opg-modal .opg-btn-primary,
#opg-modal .opg-btn-ghost {
    background: #4c7df3;
    color: #fff;
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.16);
}

#opg-modal .opg-btn-primary:hover,
#opg-modal .opg-btn-ghost:hover {
    opacity: 0.96;
}

#opg-modal .opg-or {
    color: #555;
    font-size: 18px;
}

#opg-modal .opg-text-btn,
#opg-modal .opg-inline-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: #4c7df3;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

#opg-modal .opg-note {
    margin: 14px 0 0;
    color: #1f2957;
    font-size: 12px;
    line-height: 1.5;
}

#opg-modal .opg-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    text-align: center;
}

#opg-modal .opg-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 18px;
    color: #333;
    font-size: 11px;
    line-height: 1.55;
}

#opg-modal .opg-checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex: 0 0 18px;
    accent-color: #4c7df3;
}

body.opg-modal-open {
    overflow: hidden;
}

body.opg-blur-products .site,
body.opg-blur-products #page,
body.opg-blur-products .site-main,
body.opg-blur-products .content-area,
body.opg-blur-products .woocommerce,
body.opg-blur-products main,
body.opg-blur-products header,
body.opg-blur-products footer {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1199px) {
    #opg-modal .opg-dialog.opg-dialog-split {
        grid-template-columns: 44% 56%;
    }

    #opg-modal .opg-side-title {
        font-size: 56px;
    }

    #opg-modal .opg-side-subtitle {
        font-size: 22px;
    }

    #opg-modal .opg-form-panel {
        padding: 48px 36px;
    }

    #opg-modal .opg-heading-large {
        font-size: 64px;
    }
}

@media (max-width: 900px) {
    #opg-modal .opg-dialog.opg-dialog-split {
        grid-template-columns: 1fr;
        min-height: 70vh;
    }
    
    #opg-modal .opg-side-panel {
        min-height: 260px;
    }

    #opg-modal .opg-side-inner {
        padding: 36px 24px 0;
    }

    #opg-modal .opg-side-image {
        max-height: 220px;
    }

    #opg-modal .opg-form-panel {
        padding: 34px 20px 40px;
    }

    #opg-modal .opg-heading-large {
        font-size: 50px;
    }

    #opg-modal .opg-heading-small {
        font-size: 20px;
        margin-bottom: 26px;
    }
}

@media (max-width: 640px) {
    #opg-modal .opg-side-title {
        font-size: 30px;
    }

    #opg-modal .opg-side-subtitle {
        font-size: 18px;
    }

    .opg-side-panel {
        display: none !important;
    }

    #opg-modal .opg-pill-input {
        height: 54px;
        padding: 0 22px;
        font-size: 15px;
    }

    #opg-modal .opg-country-select {
        width: 110px;
        min-width: 110px;
        height: 54px;
        font-size: 15px;
        padding: 0 14px;
    }

    #opg-modal .opg-phone-number-input {
        height: 54px;
        font-size: 15px;
    }

    #opg-modal .opg-password-wrap .opg-password-input {
        padding-right: 78px;
    }

    #opg-modal .opg-toggle-password {
        right: 16px;
        font-size: 13px;
    }

    #opg-modal .opg-action-row {
        gap: 12px;
        flex-wrap: wrap;
    }

    #opg-modal .opg-btn {
        min-width: 120px;
    }

    #opg-modal #opg-send-otp-btn,
    #opg-modal #opg-verify-otp-btn {
        height: 48px;
        font-size: 15px;
    }
}