/* Signup Page Styles - Mobile First Approach */

/* Import base auth styles */
@import 'login.css';

/* Signup-specific overrides and additions */

/* Container fixes for signup */
.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Error message list styling */
.error-message ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.error-message li {
    margin-bottom: 5px;
    position: relative;
}

.error-message li::before {
    content: '•';
    color: var(--error-color);
    position: absolute;
    left: -15px;
}

/* Input help text */
.input-help {
    margin-top: 5px;
}

.input-help small {
    color: #666;
    font-size: 0.8rem;
}

/* Enhanced toggle password styling for signup */
.signup-form .toggle-password {
    right: 10px;
}

.signup-form input[type="password"] {
    padding-right: 45px !important;
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #e74c3c;
}

.strength-fill.fair {
    width: 50%;
    background: #f39c12;
}

.strength-fill.good {
    width: 75%;
    background: #3498db;
}

.strength-fill.strong {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
}

.strength-text.weak {
    color: #e74c3c;
}

.strength-text.fair {
    color: #f39c12;
}

.strength-text.good {
    color: #3498db;
}

.strength-text.strong {
    color: #27ae60;
}

/* Checkbox groups */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-group a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.checkbox-group a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Trust indicators */
.trust-indicators {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.trust-item i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}

/* Signup form adjustments */
.signup-form .form-group {
    margin-bottom: 18px;
}

/* Enhanced info section for signup */
.auth-info-section .feature-list {
    margin-bottom: 40px;
}

/* Username validation */
.input-wrapper.valid input {
    border-color: var(--success-color);
    background: #f8fff8;
}

.input-wrapper.invalid input {
    border-color: var(--error-color);
    background: #fff8f8;
}

.input-wrapper .validation-icon {
    position: absolute;
    right: 40px;
    color: var(--success-color);
    opacity: 0;
    transition: var(--transition);
}

.input-wrapper.valid .validation-icon {
    opacity: 1;
}

.input-wrapper.invalid .validation-icon {
    color: var(--error-color);
    opacity: 1;
}

/* Password match indicator */
.password-match {
    margin-top: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition);
}

.password-match.show {
    opacity: 1;
}

.password-match.match {
    color: var(--success-color);
}

.password-match.no-match {
    color: var(--error-color);
}

/* Form validation states */
.form-group.has-error input {
    border-color: var(--error-color);
    background: #fff8f8;
}

.form-group.has-success input {
    border-color: var(--success-color);
    background: #f8fff8;
}

.form-group .field-error {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-group.has-error .field-error {
    display: block;
}

/* Enhanced button states */
.signup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.signup-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Newsletter checkbox styling */
.checkbox-group input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--secondary-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Terms checkbox - required styling */
.checkbox-group.required label {
    position: relative;
}

.checkbox-group.required input[type="checkbox"]:invalid + label::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 16px;
    height: 16px;
    border: 2px solid var(--error-color);
    border-radius: 3px;
    background: #fff8f8;
}

/* Responsive adjustments for signup */
@media (min-width: 768px) {
    .signup-form {
        max-width: 450px;
    }
    
    .trust-indicators {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (min-width: 1024px) {
    .auth-wrapper {
        min-height: 700px;
    }
    
    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Animation for signup form */
.signup-form .form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.signup-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.signup-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.signup-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.signup-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.signup-form .form-group:nth-child(5) { animation-delay: 0.5s; }
.signup-form .form-group:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success state styling */
.signup-success {
    text-align: center;
    padding: 40px 20px;
}

.signup-success .success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

.signup-success .success-icon i {
    font-size: 2rem;
    color: #fff;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
