/*-------------------------------------------------------------------------*/
/* Register Module Styling
/*-------------------------------------------------------------------------*/

/* Remove borders from login page container */
.login-page-container {
    border: none !important;
    box-shadow: none !important;
}

/* Enhanced Error Messages with Glass Effect */
.error-feedback {
    background: rgba(220, 53, 69, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 8px;
    color: #fff;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: slideInDown 0.3s ease-out, fadeOut 5s ease-in-out 3s forwards;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

/* Individual Error Messages for Form Fields */
.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    margin-left: 2px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

/* Error states for input fields only */
.login-input-group.error .login-input {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5) !important;
    animation: errorPulse 2s infinite;
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.05);
}

.login-input-group.error .login-icon {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border-right: 1px solid rgba(220, 53, 69, 0.3);
}

.login-input-group.error .login-input::placeholder {
    color: rgba(220, 53, 69, 0.7);
}

/* Hide hint text when error is shown */
.login-input-group.error + .login-field-hint {
    display: none !important;
}

/* Error pulse animation */
@keyframes errorPulse {
    0% {
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    }
}

/* Enhanced error state for required field validation */
.login-input:invalid:not(:placeholder-shown) + .error-message,
.login-input.is-invalid + .error-message {
    opacity: 1;
    transform: translateY(0);
}

.login-input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.login-input:invalid:not(:placeholder-shown) ~ .login-input-group {
    border: 2px solid #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25), 
                0 0 15px rgba(220, 53, 69, 0.4);
}

.error-feedback div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.error-feedback div::before {
    content: '⚠︎';
    font-size: 14px;
    flex-shrink: 0;
}

.error-feedback::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.error-feedback:not(.d-none) {
    display: block !important;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
        pointer-events: none;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Error message text styling for better readability */
.error-feedback .error-text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Success messages with glass effect */
.success-feedback {
    background: rgba(40, 167, 69, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(40, 167, 69, 0.25);
    border-radius: 8px;
    color: #fff;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: slideInDown 0.3s ease-out, fadeOut 5s ease-in-out 3s forwards;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

.success-feedback div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.success-feedback div::before {
    content: '✅';
    font-size: 14px;
    flex-shrink: 0;
}

/* Override Bootstrap border utilities */
.border,
.border-1,
.border-2,
.border-3,
.border-4,
.border-5 {
    border: none !important;
}

.border-top,
.border-end,
.border-bottom,
.border-start {
    border: none !important;
}

/* Remove padding from px-1 and similar classes if they exist */
.px-1,
.px-2,
.px-3,
.px-4,
.px-5 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.p-1,
.p-2,
.p-3,
.p-4,
.p-5 {
    padding: 0 !important;
}

/* Register Fields Container and Grid Layout */
.register-fields-container {
    width: 100%;
}

.register-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .register-fields-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Login Input Group */
.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #120f22;
    border-radius: 6px;
    transition: all 300ms ease;
    overflow: hidden;
}

.login-input-group:focus-within {
    /* Removed box-shadow to eliminate border highlight */
}

.login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #261f3d;
    color: #c9c9c9;
    transition: all 300ms ease;
    font-size: 14px;
    border-radius: 6px;
}

.login-input-group:focus-within .login-icon {
    background-color: #f5e6d3;
    color: #2a1f3d;
}

.login-input {
    flex: 1;
    padding: 8px 15px;
    background: transparent;
    border: none;
    color: #c9c9c9;
    font-family: var(--font-family-primary);
    font-size: 13px;
    outline: none;
    height: 35px;
}

.login-input::placeholder {
    color: #666;
}

/* Login Options */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
    min-height: 24px;
}

.login-options .form-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
    position: relative;
    height: auto;
    max-width: fit-content;
}

.login-options .form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, rgba(88, 70, 140, 0.3), rgba(88, 70, 140, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    vertical-align: top;
    margin-top: -6px;
}

.login-options .form-check-input:checked {
    background: linear-gradient(135deg, #8b7ec8 0%, #9d8fd9 100%);
    border-color: #8b7ec8;
    box-shadow: 0 0 0 2px rgba(139, 126, 200, 0.2), 0 2px 8px rgba(139, 126, 200, 0.3);
}

.login-options .form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: checkmark 0.2s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.login-options .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 126, 200, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
    border-color: #8b7ec8;
}

.login-options .form-check-input:hover:not(:checked) {
    border-color: #5a4f7a;
    background: linear-gradient(135deg, #221b35 0%, #2d2442 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-options .form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-family: var(--font-family-primary);
    cursor: pointer;
    margin: 0;
    padding: 2px 0 0 12px;
    line-height: 16px;
    height: 16px;
    user-select: none;
    display: inline-block;
    vertical-align: top;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.login-forgot-link {
    color: #8b7ec8;
    text-decoration: none;
    font-size: 12px;
    font-family: var(--font-family-primary);
    transition: color 0.3s ease;
}

.login-forgot-link:hover {
    color: #9d8fd9;
    text-decoration: underline;
}

/* Login Field Hints */
.login-field-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(42, 31, 61, 0.3);
    border: 1px solid rgba(139, 126, 200, 0.2);
    border-radius: 4px;
    font-size: 11px;
    color: #a0a0a0;
    font-family: var(--font-family-primary);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.login-field-hint:hover {
    background: rgba(42, 31, 61, 0.4);
    border-color: rgba(139, 126, 200, 0.3);
    color: #b8b8b8;
}

.hint-icon {
    color: #8b7ec8;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.hint-text {
    line-height: 1.3;
    letter-spacing: 0.3px;
}

/* Login Submit Button */
.login-submit-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2a1f3d 0%, #1f1530 50%, #150f22 100%);
    color: #d4c9e0;
    font-weight: 500;
    border-radius: 8px;
    transition: all 300ms ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-family: var(--font-family-primary);
    height: 45px;
    font-size: 14px;
}

.login-submit-button:hover {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 50%, #d4c4a8 100%);
    color: #3d2a5c;
    box-shadow: 0 2px 8px rgba(245, 230, 211, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-fields-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .login-page-container {
        padding: 20px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .login-input-group {
        height: 50px;
    }
    
    .login-input {
        height: 50px;
        font-size: 16px;
    }
    
    .login-icon {
        height: 50px;
        width: 50px;
    }
    
    .login-submit-button {
        height: 50px;
        font-size: 16px;
    }
}