/**
 * OTP Form Styles
 */

.wp-otp-login-form {
    --otp-login-form-primary: #25D366;

    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wp-otp-login-form .wp-otp-login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    padding: 4px;
    background: #f3f4f6;
    border-radius: 8px;
    position: relative;
}

.wp-otp-login-form .wp-otp-login-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    color: #6f7899;
    transition: all 0.2s ease;
    border-radius: 6px;
    position: relative;
    z-index: 1;
}

.wp-otp-login-form .wp-otp-login-tab:focus {
    outline: none;
}

.wp-otp-login-form .wp-otp-login-tab:hover:not(.active) {
    color: #666;
}

.wp-otp-login-form .wp-otp-login-tab.active {
    color: #333;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.wp-otp-login-form .wp-otp-login-tab-content {
    display: block;
}

.wp-otp-login-form .wp-otp-login-field {
    margin-bottom: 10px;
}

.wp-otp-login-form .wp-otp-login-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #333;
}

/* intl-tel-input container styles */
.wp-otp-login-form .iti {
    width: 100%;
    position: relative;
}

.wp-otp-login-form .iti__country-container {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
}

.wp-otp-login-form .iti__selected-country {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    transition: background 0.2s ease;
}

.wp-otp-login-form .iti__selected-country:hover {
    background: rgba(0, 0, 0, 0.02);
}

.wp-otp-login-form .iti__selected-country:focus {
    background: rgba(0, 0, 0, 0.05);
}

.wp-otp-login-form .iti__selected-country-primary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wp-otp-login-form .iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover {
    background: transparent;
}

.wp-otp-login-form .iti__selected-dial-code {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #e0e0e0;
}

/* Phone input field */
.wp-otp-login-form .wp-otp-login-input,
.wp-otp-login-form .iti__tel-input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff !important;
    outline: none !important;
    box-sizing: border-box;
    box-shadow: none !important;
}

.wp-otp-login-form .wp-otp-login-input:focus,
.wp-otp-login-form .iti__tel-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    background: #fff !important;
}

.wp-otp-login-form .wp-otp-login-input::placeholder,
.wp-otp-login-form .iti__tel-input::placeholder {
    color: #999;
}

/* Dropdown styles */
.wp-otp-login-form .iti__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    min-width: 280px;
}

.wp-otp-login-form .iti__dropdown-content {
    padding: 8px 0;
}

.iti__search-input {
    padding-left: 55px !important;
    background: #fff !important;
}

.iti__search-input:focus {
    outline: none;
    border: 1px solid #000;
}

.wp-otp-login-form .iti__country-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-otp-login-form .iti__country {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 12px;
}

.wp-otp-login-form .iti__country:hover,
.wp-otp-login-form .iti__country--highlight {
    background: #f5f5f5;
}

.wp-otp-login-form .iti__country-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.wp-otp-login-form .iti__dial-code {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Search box in dropdown */
.wp-otp-login-form .iti__search-box {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.wp-otp-login-form .iti__search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.wp-otp-login-form .iti__search-input:focus {
    border-color: var(--otp-login-form-primary);
}

/* Custom scrollbar for dropdown */
.wp-otp-login-form .iti__dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.wp-otp-login-form .iti__dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.wp-otp-login-form .iti__dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.wp-otp-login-form .iti__dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.wp-otp-login-form .wp-otp-login-submit {
    width: 100%;
    padding: 8px 20px;
    background: var(--otp-login-form-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.wp-otp-login-form .wp-otp-login-submit:focus {
    outline: none;
}

.wp-otp-login-form .wp-otp-login-submit:hover {
    background: #20BA5A;
}

.wp-otp-login-form .wp-otp-login-submit:active {
    background: #1A9D4A;
}

.wp-otp-login-form .wp-otp-login-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.wp-otp-login-submit-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wp-otp-login-form .wp-otp-login-icon {
    font-size: 18px;
}

.wp-otp-login-form .wp-otp-login-message {
    font-size: 12px;
    display: none;
    padding-top: 5px;
    text-align: center;
}

.wp-otp-login-form .wp-otp-login-message.success {
    color: #155724;
    display: block;
}

.wp-otp-login-form .wp-otp-login-message-error {
    color: red;
    display: block;
}

/* Registered users notice */
.wp-otp-login-form .wp-otp-login-registered-users-notice {
    margin-top: 16px;
    font-size: 12px;
    color: #6f7899;
    text-align: center;
    line-height: 1.4;
}

/* Autocomplete styles - white background */
.wp-otp-login-form .wp-otp-login-input:-webkit-autofill,
.wp-otp-login-form .wp-otp-login-input:-webkit-autofill:hover,
.wp-otp-login-form .wp-otp-login-input:-webkit-autofill:focus,
.wp-otp-login-form .wp-otp-login-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #333 !important;
    box-shadow: 0 0 0 30px #ffffff inset !important;
    background-color: #ffffff !important;
}

.wp-otp-login-form .wp-otp-login-input:-moz-autofill {
    background-color: #ffffff !important;
    color: #333 !important;
}

/* Submit button loader */
.wp-otp-login-form .wp-otp-login-submit-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wp-otp-login-form .wp-otp-login-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    animation: wp-otp-login-spin 0.8s linear infinite;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 20 20'%3E%3C!-- Icon from Fluent UI System Icons by Microsoft Corporation - https://github.com/microsoft/fluentui-system-icons/blob/main/LICENSE --%3E%3Cpath fill='currentColor' d='M10 3.5A6.5 6.5 0 0 0 3.5 10A.75.75 0 0 1 2 10a8 8 0 1 1 8 8a.75.75 0 0 1 0-1.5a6.5 6.5 0 1 0 0-13'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.4;
}

@keyframes wp-otp-login-spin {
    to {
        transform: rotate(360deg);
    }
}

/* OTP field */
.wp-otp-login-form .wp-otp-login-otp-field {
    margin-top: 20px;
}

/* OTP info */
.wp-otp-login-form .wp-otp-login-otp-info {
    text-align: center;
}

.wp-otp-login-form .wp-otp-login-otp-info-text {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.wp-otp-login-otp-info-contact,
.wp-otp-login-form .wp-otp-login-otp-info-phone {
    margin: 0;
    font-size: 14px;
    color: #6a6a6a;
    font-weight: bold;
}

/* Resend code button */
.wp-otp-login-form .wp-otp-login-resend-btn {
    margin-top: 12px;
    background: #f5f5f5;
    color: #666;
}

.wp-otp-login-form .wp-otp-login-resend-btn:hover:not(:disabled) {
    background: #e0e0e0;
}

.wp-otp-login-form .wp-otp-login-resend-btn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Resend timer text */
.wp-otp-login-form .wp-otp-login-resend-timer {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 0;
}

/* Wrong number link */
.wp-otp-login-form .wp-otp-login-wrong-number {
    margin-top: 2px;
    text-align: center;
    margin-bottom: 0;
}

.wp-otp-login-form .wp-otp-login-wrong-number-link {
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none !important;
    color: darkgreen;
}

.wp-otp-login-form .wp-otp-login-wrong-number-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

.wp-otp-login-tooltips {
    display: flex;
    gap: 7px;
    margin-top: 4px;
}

.wp-otp-login-tooltip {
    font-size: 11px;
    display: none;
}

.wp-otp-login-tooltip-error {
    color: red;
}

.wp-otp-login-tooltip-success {
    color: #155724;
}

/* WhatsApp status label */
.wp-otp-login-whatsapp-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 10px;
    margin-left: 8px;
    line-height: 1;
    vertical-align: middle;
}

.wp-otp-login-whatsapp-status .wp-otp-login-spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
    border-color: #666;
    border-top-color: #333;
    vertical-align: middle;
    margin-right: 6px;
}

.wp-otp-login-whatsapp-status.wp-otp-login-whatsapp-found {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wp-otp-login-whatsapp-status.wp-otp-login-whatsapp-not-found {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}