/**
 * Contact Form 7: Mobile OTP Verification popup (Home Contact form, id "5ae98d7").
 */

/* Hide the legacy inline OTP field/button - OTP is entered in the popup instead. */
/* Scoped to whichever .wpcf7-form actually has the telephone_number field,
   rather than guessing CF7's internal wrapper ID (it does NOT use the
   shortcode's hashid "5ae98d7" in the rendered markup, only the numeric
   post ID, which we don't know). */
/* The "your-otp" field sits alone in its own .form-group, so hide that whole
   wrapper (not just the field) to avoid leaving an empty gap in the form. */
.wpcf7-form:has(input[name="telephone_number"]) .form-group:has([data-name="your-otp"]),
.wpcf7-form:has(input[name="telephone_number"]) [data-name="your-otp"],
.wpcf7-form:has(input[name="telephone_number"]) .sbj-send-otp-btn,
.wpcf7-form:has(input[name="telephone_number"]) .sbj-otp-message {
    display: none !important;
}

.sbj-otp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
}

.sbj-otp-modal-overlay.is-open {
    display: flex;
}

.sbj-otp-modal-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.sbj-otp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.sbj-otp-modal-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
}

.sbj-otp-modal-subtitle {
    margin: 0 0 18px;
    font-size: 14px;
    color: #64748b;
}

.sbj-otp-modal-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    letter-spacing: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 14px;
}

.sbj-otp-modal-message {
    display: block;
    min-height: 18px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #16a34a;
}

.sbj-otp-modal-message.error {
    color: #dc2626;
}

.sbj-otp-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sbj-otp-modal-actions .btn {
    flex: 1 1 auto;
    white-space: nowrap;
}
