/* Common styles for authentication pages */

/* Container styles */
.auth-content-container {
    place-self: center;
    background: #ffffff;
    border-radius: 24px;
    width: 500px;
    padding: 48px;
    text-align: center;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    place-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Typography */
.auth-content-container h1 {
    line-height: 1.2;
    font-size: 1.75rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 400;
}

.auth-content-container .lead {
    font-size: 1.125rem;
    color: #555;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.auth-content-container .text-muted {
    color: #6c757d;
    font-size: 0.9375rem;
}

/* Form elements */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9375rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus {
    color: #333;
    background-color: #fff;
    border-color: #0066cc;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Buttons */
.btn {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.5;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #8080ff;
    color: white;
}

.btn-primary:hover {
    background-color: #6969ff;
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    background-color: #5252ff;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    color: white;
    text-decoration: none;
}

.btn-secondary:active {
    background-color: #374151;
}

/* Button groups */
.button-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.button-group-stacked {
    flex-direction: column;
}

.button-group-stacked .btn {
    width: 100%;
}

/* Validation */
.validation-summary-errors {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid #fee2e2;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.validation-summary-errors li {
    margin-bottom: 0.25rem;
}

.validation-summary-errors li:last-child {
    margin-bottom: 0;
}

.text-danger {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.375rem;
    display: block;
    font-weight: 500;
}

.field-validation-error {
    color: #b91c1c;
    font-size: 0.875rem;
    margin-top: 0.375rem;
    display: block;
    font-weight: 500;
    animation: fadeIn 0.2s ease-out;
}

.field-validation-error:empty {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-validation-error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.input-validation-error:focus {
    border-color: #dc2626;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Inline validation summary for login page */
.validation-summary-inline {
    background-color: #fef2f2;
    border: 1px solid #f87171;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.08);
    position: relative;
    overflow: hidden;
}

.validation-summary-inline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #ef4444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-summary-inline .validation-icon {
    color: #ef4444;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.validation-summary-inline .validation-messages {
    color: #991b1b;
    font-size: 0.9375rem;
    line-height: 1.5;
    flex: 1;
    font-weight: 500;
}

.validation-summary-inline .validation-messages span {
    display: block;
}

.validation-summary-inline ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.validation-summary-inline li {
    margin-bottom: 0.125rem;
    padding-left: 0;
}

.validation-summary-inline li:last-child {
    margin-bottom: 0;
}

/* Login-specific styles for better UI */
.login-options-content {
    place-self: center;
    background: #ffffff;
    border-radius: 24px;
    width: 500px;
    padding: 48px;
    text-align: center;
    display: flex;
    flex-flow: column;
    gap: 1.5rem;
    place-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Override Bootstrap checkbox styles */
.login-options-content .form-check {
    padding-left: 0;
}

.login-options-content .form-check-input {
    float: none;
    margin-left: 0;
}

.login-options-content h1 {
    line-height: 1.2;
    font-size: 1.75rem;
    color: #333;
    margin: 0 0 1.5rem 0;
    font-weight: 400;
    margin-bottom: .5rem;
}

.login-form {
    width: 100%;
    margin-top: 0.5rem;
}

/* Enhanced login options row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.login-options .form-check {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-options .form-check-input {
    margin: 0 !important;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    position: static;
    vertical-align: middle;
}

.login-options .form-check-label {
    margin: 0;
    padding-left: 0.25rem;
    font-size: 0.9375rem;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
    display: inline-block;
}

.login-options .form-check:hover .form-check-label {
    color: #111827;
}

.forgot-password-link {
    color: #8080ff;
    font-size: 0.9375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.forgot-password-link:hover {
    color: #6969ff;
    background-color: rgba(128, 128, 255, 0.08);
    text-decoration: none;
}

/* Responsive design */
@media only screen and (max-width : 667px) {
    .auth-content-container,
    .login-options-content {
        width: calc(100vw - 2rem);
        padding: 30px 25px;
    }
    
    .auth-content-container h1,
    .login-options-content h1 {
        font-size: 1.5em;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
    .login-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}