/* Main Wrapper */
.wpcf7 form .cf7otp-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* Flex Rows - Forces items to align left without stretching */
.wpcf7 form .cf7otp-wrapper .cf7otp-captcha-row,
.wpcf7 form .cf7otp-wrapper .cf7otp-otp-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

/* Captcha Image & Refresh */
.wpcf7 form .cf7otp-wrapper .cf7otp-captcha-img {
    height: 55px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    object-fit: contain;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-captcha-refresh {
    height: 42px;
    width: 42px;
    min-width: 42px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #13AFF0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 0 0 auto;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-captcha-refresh:hover {
    background: #13AFF0;
    color: #ffffff;
    border-color: #13AFF0;
}

/* Input Fields - Fixed widths without stretching */
.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-captcha-input,
.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-otp-input {
    height: 42px;
    width: 160px;
    max-width: 140px;
    flex: 0 0 140px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-captcha-input {
    letter-spacing: 2px;
}

.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-otp-input {
    letter-spacing: 4px;
}

.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-captcha-input:focus,
.wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-otp-input:focus {
    border-color: #13AFF0;
    box-shadow: 0 0 0 3px rgba(19, 175, 240, 0.15);
}

/* Button Base Styles - Prevents theme-level stretching */
.wpcf7 form .cf7otp-wrapper button.cf7otp-send-btn,
.wpcf7 form .cf7otp-wrapper button.cf7otp-verify-btn,
.wpcf7 form .cf7otp-wrapper button.cf7otp-resend-btn,
.wpcf7 form .cf7otp-wrapper input[type="button"].cf7otp-send-btn,
.wpcf7 form .cf7otp-wrapper input[type="button"].cf7otp-verify-btn,
.wpcf7 form .cf7otp-wrapper input[type="button"].cf7otp-resend-btn {
    width: auto;
    min-width: 120px;
    height: 42px;
    margin: 0;
    padding: 0 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex: 0 0 auto;
    white-space: nowrap;
    border: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Primary Button (Blue) */
.wpcf7 form .cf7otp-wrapper .cf7otp-send-btn {
    background: #13AFF0;
    color: #ffffff;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-send-btn:hover {
    background: #0e96d1;
}

/* Verify Button (Orange) */
.wpcf7 form .cf7otp-wrapper .cf7otp-verify-btn {
    background: #EF7F1A;
    color: #ffffff;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-verify-btn:hover {
    background: #d46c12;
}

/* Resend Button */
.wpcf7 form .cf7otp-wrapper .cf7otp-resend-btn {
    background: #ffffff;
    color: #13AFF0;
    border: 1px solid #13AFF0;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-resend-btn:hover {
    background: #13AFF0;
    color: #ffffff;
}

/* Disabled States */
.wpcf7 form .cf7otp-wrapper button:disabled,
.wpcf7 form .cf7otp-wrapper input[type="button"]:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    border: 1px solid #cbd5e1;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Notifications */
.wpcf7 form .cf7otp-wrapper .cf7otp-status {
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 16px;
    border-radius: 6px;
    background: #f8fafc;
    border-left: 4px solid #13AFF0;
    color: #334155;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-status.success {
    background: #f0fdf4;
    border-left-color: #22c55e;
    color: #15803d;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-status.error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

.wpcf7 form .cf7otp-wrapper .cf7otp-status.warning {
    background: #fffbe2;
    border-left-color: #EF7F1A;
    color: #b45309;
}

/* Mobile Screens */
@media (max-width: 576px) {
    .wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-captcha-input,
    .wpcf7 form .cf7otp-wrapper input[type="text"].cf7otp-otp-input,
    .wpcf7 form .cf7otp-wrapper button.cf7otp-send-btn,
    .wpcf7 form .cf7otp-wrapper button.cf7otp-verify-btn,
    .wpcf7 form .cf7otp-wrapper button.cf7otp-resend-btn {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
    }
}