/* /static/css/auth.css */

/*
  This file contains shared styles for all authentication-related pages
  (login, signup, password reset, etc.). It uses the design tokens
  defined in base.css for a consistent look and feel.
*/

/* --- Layout --- */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.auth-wrapper.loaded {
    opacity: 1;
}

.auth-image-panel {
    flex: 1;
    /* A professional, generic background image from Unsplash */
    /* background-image: url('https://images.unsplash.com/photo-1554774853-719586f82d77?q=80&w=2070&auto=format&fit=crop'); */
    background-image: url("../images/business_1.48ab385140d6.jpeg");
    background-size: cover;
    background-position: calc(50% + 100px) center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: var(--spacing-xl);
}

.auth-image-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Elegant, subtle gradient overlay that balances image visibility and text legibility */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 58, 138, 0.72) 100%);
    z-index: 1;
}

.auth-image-panel .content {
    position: relative;
    z-index: 2;
}

.auth-image-panel h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.auth-image-panel p {
    font-size: 1.2rem;
    max-width: 450px;
    opacity: 0.9;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    background-color: var(--background-color);
}

/* --- Form Container & Elements --- */

.auth-container {
    max-width: 400px;
    width: 100%;
    margin: 0;
}

.auth-container h1 {
    padding-left: 0;
    margin-top: 0.25rem;
}

/* --- Responsive Design --- */

@media (max-width: 860px) {
    .auth-image-panel {
        display: none; /* Hide the image panel on smaller screens */
    }

    .auth-form-panel {
        flex-basis: 100%;
    }

    .auth-container {
        /* On mobile, we don't need the extra padding from the panel */
        padding: var(--spacing-md);
    }
}


/* /static/css/auth.css */

/*
  This file contains shared styles for all authentication-related pages
  (login, signup, password reset, etc.). It uses the design tokens
  defined in base.css for a consistent look and feel.
*/

.auth-container {
    max-width: 400px;
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-xl);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
    margin: 0; /* The panel provides the centering and spacing */
}

.auth-container h1 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    font-size: 1.75rem;
    color: var(--dark-gray);
}

.auth-container .subheading {
    text-align: center;
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    color: var(--text-color-light);
}

.auth-form .non-field-errors {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: var(--border-width) solid transparent;
    border-radius: 4px;
    color: #721c24; /* Specific color for error text */
    background-color: #f8d7da; /* Specific color for error background */
    border-color: #f5c6cb; /* Specific color for error border */
}

.auth-form .form-group {
    margin-bottom: var(--spacing-md);
}

.auth-form label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 0.75rem; /* Keeping this specific padding for form inputs */
    border: var(--border-width) solid #ccc; /* A slightly darker border for focus */
    border-radius: 4px;
    box-sizing: border-box;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 2.5rem !important;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--secondary-color);
}

.auth-form .primaryAction,
.primaryAction {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    margin-top: var(--spacing-md);
    transition: background-color 0.2s;
    text-decoration: none; /* For links styled as buttons */
    display: inline-block; /* For links styled as buttons */
    text-align: center;
}

.auth-form .primaryAction:hover,
.primaryAction:hover {
    background-color: var(--primary-color-dark);
}

.auth-links {
    text-align: center;
    margin-top: var(--spacing-lg);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.error-list {
    color: var(--danger-color);
    font-size: 0.875em;
    list-style-type: none;
    padding-left: 0;
    margin-top: 0.25rem;
}


/* --- Checkbox Styling --- */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Creates space between the checkbox and the label */
}

.form-group-checkbox label {
    /* Overrides the default block display and bottom margin for labels */
    margin-bottom: 0;
    font-weight: var(--font-weight-normal); /* Makes the label text normal weight */
}

.form-group-checkbox input[type="checkbox"] {
    width: auto; /* Prevents the checkbox from stretching to 100% width */
}

/* --- Responsive Design --- */

@media (max-width: 860px) {
    .auth-image-panel {
        display: none; /* Hide the image panel on smaller screens */
    }

    .auth-form-panel {
        flex-basis: 100%;
        /* On mobile, we don't need the extra padding from the panel */
        padding: var(--spacing-md);
    }
}
