/* CF7 Inline OTP Verification Styles - Seamlessly integrated with Contact Form 7 */

/* Verify Button - Matches CF7 button style */
.wsm-verify-phone-btn {
    padding: 8px 16px;
    margin-left: 10px;
    margin-top: 0;
    background: #2271b1;
    color: #fff;
    border: 1px solid #2271b1;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    vertical-align: middle;
    display: inline-block;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 0 #135e96;
}

.wsm-verify-phone-btn:hover {
    background: #135e96;
    border-color: #135e96;
    box-shadow: 0 1px 0 #0a4b78;
}

.wsm-verify-phone-btn:active {
    box-shadow: inset 0 1px 0 #0a4b78;
}

.wsm-verify-phone-btn:disabled {
    background: #8c8f94;
    border-color: #8c8f94;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* OTP Wrapper - Matches CF7 form styling */
.wsm-inline-otp-wrapper {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wsm-inline-otp-wrapper.show {
    display: block;
}

/* OTP Status Message - Matches CF7 message style */
.wsm-otp-status-message {
    margin-bottom: 12px;
    font-weight: 600;
    color: #2271b1;
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 12px;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    border-radius: 2px;
}

.wsm-otp-status-message.success {
    color: #00a32a;
    background: #f0f6fc;
    border-left-color: #00a32a;
}

.wsm-otp-status-message.error {
    color: #d63638;
    background: #fcf0f1;
    border-left-color: #d63638;
}

/* OTP Input Wrapper */
.wsm-otp-input-wrapper {
    margin-top: 10px;
}

.wsm-otp-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* OTP Input Group */
.wsm-otp-input-wrapper > div:first-of-type {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* OTP Input Field - Matches CF7 input style */
.wsm-inline-otp-input {
    width: 180px;
    padding: 8px 12px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    font-weight: 600;
    font-family: "Courier New", Courier, monospace;
    max-width: 200px;
    background: #fff;
    color: #1d2327;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wsm-inline-otp-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.wsm-inline-otp-input:invalid {
    border-color: #d63638;
}

/* Verify OTP Button - Matches CF7 button style */
.wsm-verify-inline-otp-btn {
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border: 1px solid #2271b1;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    transition: all 0.2s ease;
    box-shadow: 0 1px 0 #135e96;
}

.wsm-verify-inline-otp-btn:hover {
    background: #135e96;
    border-color: #135e96;
    box-shadow: 0 1px 0 #0a4b78;
}

.wsm-verify-inline-otp-btn:active {
    box-shadow: inset 0 1px 0 #0a4b78;
}

.wsm-verify-inline-otp-btn:disabled {
    background: #8c8f94;
    border-color: #8c8f94;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* Resend OTP Button - Visible and styled */
.wsm-resend-otp-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wsm-resend-otp-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.wsm-resend-otp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    color: #8c8f94;
    border-color: #8c8f94;
}

.wsm-resend-otp-btn.hidden {
    display: none;
}

/* OTP Timer - Styled to match CF7 */
.wsm-otp-timer {
    display: inline-block;
    margin-left: 10px;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #646970;
    line-height: 1.5;
}

.wsm-otp-timer.active {
    color: #2271b1;
    font-weight: 500;
}

/* OTP Verify Message - Matches CF7 validation style */
.wsm-otp-verify-message {
    margin-top: 10px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 3px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    display: none;
}

.wsm-otp-verify-message.show {
    display: block;
}

.wsm-otp-verify-message.success {
    color: #00a32a;
    background: #f0f6fc;
    border-left: 4px solid #00a32a;
}

.wsm-otp-verify-message.error {
    color: #d63638;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
}

/* Error message placement - Matches CF7 error style */
.wpcf7-form-control-wrap .wsm-otp-error,
.wsm-inline-otp-wrapper .wsm-otp-error {
    display: block;
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 600px) {
    .wsm-verify-phone-btn {
        display: block;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
    
    .wsm-inline-otp-wrapper {
        margin-top: 10px;
        padding: 12px;
    }
    
    .wsm-otp-input-wrapper > div:first-of-type {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wsm-inline-otp-input {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }
    
    .wsm-verify-inline-otp-btn {
        width: 100%;
    }
    
    .wsm-resend-otp-btn {
        width: 100%;
        text-align: center;
    }
}
