/**
 * BBB Payouts Authentication Styles
 * Styles for login, signup, and PIN field functionality
 */

/* PIN Field Styles */
.bbb-payouts-pin-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.bbb-payouts-pin-input {
    width: 50px !important;
    height: 50px !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1a202c !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

.bbb-payouts-pin-input::-webkit-outer-spin-button,
.bbb-payouts-pin-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.bbb-payouts-pin-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    background: #f7fafc !important;
}

.bbb-payouts-pin-input:valid {
    border-color: #48bb78 !important;
    background: #f0fff4 !important;
}

.bbb-payouts-pin-container.complete .bbb-payouts-pin-input {
    border-color: #48bb78 !important;
    background: #f0fff4 !important;
}

/* Responsive PIN fields */
@media (max-width: 480px) {
    .bbb-payouts-pin-container {
        gap: 8px;
    }
    
    .bbb-payouts-pin-input {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }
}

/* Login/Signup Form Styles */
.bbb-payouts-login-wrapper,
.bbb-payouts-signup-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.bbb-payouts-login-container,
.bbb-payouts-signup-container {
    width: 100%;
    max-width: 450px;
}

.bbb-payouts-signup-container {
    max-width: 600px;
}

.bbb-payouts-login-card,
.bbb-payouts-signup-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bbb-payouts-login-header,
.bbb-payouts-signup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
}

.bbb-payouts-login-header h1,
.bbb-payouts-signup-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.bbb-payouts-login-header p,
.bbb-payouts-signup-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.bbb-payouts-login-form,
.bbb-payouts-signup-form {
    padding: 40px 30px;
}

/* Form Sections */
.bbb-payouts-form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.bbb-payouts-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bbb-payouts-form-section h3 {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

/* Form Groups */
.bbb-payouts-form-group {
    margin-bottom: 20px;
}

.bbb-payouts-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .bbb-payouts-form-row {
        grid-template-columns: 1fr;
    }
}

.bbb-payouts-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
}

/* Input Wrapper */
.bbb-payouts-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bbb-payouts-input-wrapper i {
    position: absolute;
    left: 15px;
    color: #a0aec0;
    z-index: 2;
}

.bbb-payouts-input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.bbb-payouts-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Regular inputs without wrapper */
.bbb-payouts-form-group input:not(.bbb-payouts-pin-input),
.bbb-payouts-form-group select,
.bbb-payouts-form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.bbb-payouts-form-group input:focus,
.bbb-payouts-form-group select:focus,
.bbb-payouts-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Password Toggle */
.bbb-payouts-password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

.bbb-payouts-password-toggle:hover {
    color: #667eea;
}

/* Password Strength */
.bbb-payouts-password-strength {
    margin-top: 10px;
}

.bbb-payouts-strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bbb-payouts-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.bbb-payouts-strength-text {
    font-size: 12px;
    font-weight: 600;
}

/* Login Method Toggle */
.bbb-payouts-login-toggle {
    margin-bottom: 25px;
}

.bbb-payouts-toggle-buttons {
    display: flex;
    background: #f7fafc;
    border-radius: 8px;
    padding: 4px;
}

.bbb-payouts-toggle-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbb-payouts-toggle-btn.bbb-payouts-active {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bbb-payouts-toggle-btn i {
    margin-right: 8px;
}

/* Login Methods */
.bbb-payouts-login-method {
    display: none;
}

.bbb-payouts-login-method.bbb-payouts-active {
    display: block;
}

/* Checkbox Styles */
.bbb-payouts-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bbb-payouts-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

.bbb-payouts-checkbox-label input[type="checkbox"] {
    display: none;
}

.bbb-payouts-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.bbb-payouts-checkbox-label input[type="checkbox"]:checked + .bbb-payouts-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.bbb-payouts-checkbox-label input[type="checkbox"]:checked + .bbb-payouts-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

/* Submit Buttons */
.bbb-payouts-login-btn,
.bbb-payouts-signup-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.bbb-payouts-login-btn:hover,
.bbb-payouts-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.bbb-payouts-login-btn:disabled,
.bbb-payouts-signup-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Help Text */
.bbb-payouts-help-text {
    color: #718096;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Links */
.bbb-payouts-login-links,
.bbb-payouts-signup-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.bbb-payouts-login-links a,
.bbb-payouts-signup-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.bbb-payouts-login-links a:hover,
.bbb-payouts-signup-links a:hover {
    text-decoration: underline;
}

/* Notifications */
.bbb-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.bbb-notification-show {
    transform: translateX(0);
}

.bbb-notification-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.bbb-notification-message {
    flex: 1;
    font-weight: 500;
}

.bbb-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #a0aec0;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbb-notification-error {
    border-left: 4px solid #f56565;
}

.bbb-notification-error .bbb-notification-message {
    color: #c53030;
}

.bbb-notification-success {
    border-left: 4px solid #48bb78;
}

.bbb-notification-success .bbb-notification-message {
    color: #2f855a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bbb-payouts-login-wrapper,
    .bbb-payouts-signup-wrapper {
        padding: 10px;
    }
    
    .bbb-payouts-login-form,
    .bbb-payouts-signup-form {
        padding: 30px 20px;
    }
    
    .bbb-payouts-login-header,
    .bbb-payouts-signup-header {
        padding: 30px 20px;
    }
    
    .bbb-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Focus styles for accessibility */
.bbb-payouts-pin-input:focus,
.bbb-payouts-login-btn:focus,
.bbb-payouts-signup-btn:focus,
.bbb-payouts-toggle-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading states */
.bbb-payouts-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bbb-payouts-btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

