/**
 * Dashboard Form Error Display Fixes
 * Removes reserved space for errors and shows them inline only when needed
 */

/* Hide old dashboard-error elements completely */
.dashboard-error {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* New error styles for dynamically created errors */
.dashboard-field-error,
.dashboard-general-error {
    color: #c53030;
    font-size: 0.875rem;
    margin-top: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-general-error {
    padding: 12px 14px;
    background: #fff5f5;
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    border: 1px solid #fed7d7;
}

.dashboard-general-error i {
    flex-shrink: 0;
}

/* Password requirements styling */
.dashboard-password-requirements {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 6px;
    transition: color 0.2s ease;
}

.dashboard-password-requirements.error-state {
    color: #c53030;
}

/* Adjust form actions spacing to be closer to fields */
.dashboard-form-actions {
    margin-top: 20px !important; /* Reduced from 32px */
}

/* Specific spacing for signup form */
.user-dashboard-signup .dashboard-form-actions {
    margin-top: 20px !important; /* Consistent spacing */
}

/* Ensure proper spacing between form groups */
.dashboard-form-group {
    margin-bottom: 16px;
}

/* Last form group should have less margin */
.dashboard-form-group:last-of-type {
    margin-bottom: 0;
}

/* Signup form row spacing */
.signup-form-row {
    margin-bottom: 16px;
}

.signup-form-row .dashboard-form-group {
    margin-bottom: 0;
}

/* Mobile-specific fix to hide signup content section */
@media (max-width: 768px) {
    .user-dashboard-signup .signup-content-section {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    .user-dashboard-signup .signup-form-section {
        width: 100% !important;
        max-width: 100% !important;
    }
}