.authyo-otp-auth-form {
    /* max-width: 500px; */
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.authyo-otp-auth-form .form-group {
    margin-bottom: 15px;
}

.authyo-otp-auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.authyo-otp-auth-form input[type="email"],
.authyo-otp-auth-form input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Phone input wrapper styling */
.phone-input-wrapper {
    display: flex;
    gap: 5px;
    align-items: center;
}

.phone-input-wrapper select {
    width: 30%;
    min-width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.phone-input-wrapper input[type="text"] {
    width: 70%;
    flex: 1;
}

.authyo-otp-auth-form .button {
    width: 100%;
    padding: 12px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.authyo-otp-auth-form .button:hover {
    background-color: #135e96;
}

.authyo-otp-auth-form .button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.authyo-otp-auth-form .message {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
    line-height: 1.4;
}

.authyo-otp-auth-form .message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.authyo-otp-auth-form .message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Additional styling for login message */
#login-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

#login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Resend OTP Section - High specificity for theme compatibility */
.authyo-otp-auth-container .authyo-otp-auth-form .resend-otp-section {
    margin: 15px 0 !important;
    text-align: center !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Alternative Methods Section (shown when SMS fails) */
.authyo-otp-auth-container .authyo-otp-auth-form .alternative-methods-section {
    margin: 15px 0 !important;
    text-align: center !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px !important;
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    border-radius: 4px !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .alternative-methods-section .resend-text {
    margin: 0 0 10px 0 !important;
    font-size: 14px !important;
    color: #856404 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    display: block !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .alternative-methods-section .resend-methods-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
}

@supports not (display: grid) {
    .authyo-otp-auth-container .authyo-otp-auth-form .alternative-methods-section .resend-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }
    
    .authyo-otp-auth-container .authyo-otp-auth-form .alternative-methods-section .alternative-method-btn {
        flex: 1 !important;
        min-width: calc(50% - 4px) !important;
        margin: 0 2px !important;
    }
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-text {
    margin: 0 0 10px 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    display: block !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-methods-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
}

/* Fallback for themes that don't support CSS Grid */
@supports not (display: grid) {
    .authyo-otp-auth-container .authyo-otp-auth-form .resend-methods-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }
    
    .authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn {
        flex: 1 !important;
        min-width: calc(33.333% - 6px) !important;
        margin: 0 3px !important;
    }
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn {
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 36px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #212529 !important;
    text-decoration: none !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:focus {
    outline: 2px solid #007cba !important;
    outline-offset: 2px !important;
    text-decoration: none !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:disabled {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    text-decoration: none !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:active {
    background: #dee2e6 !important;
    border-color: #adb5bd !important;
    text-decoration: none !important;
}

.number-preview {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Resend OTP Button with Timer */
.authyo-otp-auth-form .resend-otp-btn {
    width: 100% !important;
    padding: 10px 15px !important;
    background: #f0f0f1 !important;
    color: #2c3338 !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    display: block !important;
}

.authyo-otp-auth-form .resend-otp-btn:hover:not(:disabled) {
    background: #dcdcde !important;
    border-color: #50575e !important;
}

.authyo-otp-auth-form .resend-otp-btn:disabled {
    background: #f0f0f1 !important;
    color: #8c8f94 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.authyo-otp-auth-form .resend-otp-btn .timer {
    display: inline-block !important;
    font-weight: 500 !important;
}

/* Fallback methods styling */
.fallback-methods {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.fallback-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.fallback-heading {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.fallback-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fallback-btn {
    width: auto;
    padding: 8px 15px;
    font-size: 13px;
    background-color: #f0f0f1;
    color: #2c3338;
    border: 1px solid #8c8f94;
}

.fallback-btn:hover {
    background-color: #dcdcde;
    border-color: #50575e;
}

.fallback-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Theme Override Styles - Ensure compatibility with popular themes */
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn,
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:before,
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:after {
    all: unset !important;
    box-sizing: border-box !important;
}

.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn {
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    width: 100% !important;
    min-height: 36px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: inherit !important;
    margin: 0 !important;
    float: none !important;
    position: relative !important;
    z-index: 1 !important;
}

@media (max-width: 576px) {
    .authyo-otp-auth-form {
        padding: 15px;
    }
    
    .authyo-otp-auth-container .authyo-otp-auth-form .resend-methods-grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    
    .authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }
    
    .fallback-buttons {
        flex-direction: column;
    }
    
    .fallback-btn {
        width: 100%;
    }
}

/* Additional theme compatibility fixes */
.authyo-otp-auth-container .authyo-otp-auth-form .resend-methods-grid * {
    box-sizing: border-box !important;
}

/* Ensure buttons don't inherit theme button styles */
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn,
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:hover,
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:focus,
.authyo-otp-auth-container .authyo-otp-auth-form .resend-method-btn:active {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
} 