/* Form Validation Common Styles */

/* Error Messages */
.error-messages {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.error-messages ul {
    margin: 0;
    padding-left: 20px;
}

.error-messages li {
    margin-bottom: 5px;
}

/* Validation Message Container */
.validation-message {
    display: none;
    color: #dc3545;
    margin: 10px 0;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.validation-message strong {
    font-weight: bold;
}

/* Success Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.validation-success {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}


/* Button States */
.btn-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-processing {
    background: #6c757d !important;
    border-color: #6c757d !important;
}

/* Form Layout Enhancements */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

/* Input Group Styling */
.inputgroup {
    position: relative;
    margin-bottom: 15px;
}

.inputfield {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}



/* Password Strength Indicator */
.password-strength {
    margin-top: 5px;
    font-size: 12px;
}

.password-weak {
    color: #dc3545;
}

.password-medium {
    color: #ffc107;
}

.password-strong {
    color: #28a745;
}

/* Google Login Button */
.google-login-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
}

.google-login-btn:hover {
    background: #357ae8;
    transform: translateY(-1px);
}

.google-login-btn:active {
    transform: translateY(0);
}

.google-icon {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.login-divider span {
    background: #fff;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* Form Links */

.form-links a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .inputfield {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .google-login-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .validation-message {
        font-size: 14px;
    }
}

/* Checkbox Styling */
.termscheckbox {
    margin: 20px 0;
}

.termscheckbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.termscheckbox label {
    font-size: 16px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Animation */
.form-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.btn.greenbutton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn.greenbutton:active {
    transform: translateY(0);
}

/* Focus States for Accessibility */
.btn:focus,
.inputfield:focus,
.google-login-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .validation-message,
    .error-messages {
        display: none !important;
    }
}
