/* Auth Page Section */
.auth-page-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Background images based on body class */
body.login-page .auth-page-section {
    background-image: url("../images/auth/dv_login_bg_mobile.webp");
}

body.register-page .auth-page-section {
    background-image: url("../images/auth/dv_register_bg_mobile.webp");
}

/* Desktop backgrounds */
@media (min-width: 600px) {
    body.login-page .auth-page-section {
        background-image: url("../images/auth/dv_login_bg_desktop.webp");
    }

    body.register-page .auth-page-section {
        background-image: url("../images/auth/dv_register_bg_desktop.webp");
    }
}

/* Auth Container */
.auth-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Auth Form Wrapper */
.auth-form-wrapper {
    border-radius: 20px;
    padding: 0 2rem;
    width: 100%;
    max-width: 500px;
}

.auth-form-wrapper-wide {
    max-width: 700px;
}

@media (min-width: 768px) {
    .auth-form-wrapper {
        padding: 0 3rem;
    }
}

/* Auth Title */
.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: "Source Sans 3", sans-serif;
}

/* Auth Subtitle */
.auth-subtitle {
    text-align: center;
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-subtitle .auth-link-bold {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
}

.auth-subtitle .auth-link-bold:hover {
    text-decoration: underline;
}

/* Auth Form */
.auth-form {
    width: 100%;
}

/* Form Row (for two columns) */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 600px) {
    .auth-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Group */
.auth-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.auth-form-group-full {
    grid-column: 1 / -1;
}

/* Auth Label */
.auth-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-family: "Source Sans 3", sans-serif;
}

/* Auth Input */
.auth-input {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: "Source Sans 3", sans-serif;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.auth-input::placeholder {
    color: #999;
}

/* Select styling */
select.auth-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* Auth Error */
.auth-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* Forgot Password Link */
.auth-forgot-link {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-forgot-link a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

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

/* Submit Button */
.auth-submit-btn {
    padding: 0.5rem 2.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem auto 1rem auto;
    display: block;
    font-family: "Source Sans 3", sans-serif;
}

.auth-submit-btn:hover {
    background: var(--secondary-hover);
}

/* Checkbox Groups */
.auth-checkbox-group {
    margin-bottom: 1rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--white);
    gap: 0.5rem;
}

.auth-checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-checkbox-label span {
    flex: 1;
}

.auth-checkbox-label a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
}

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

/* Footer Link */
.auth-footer-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--white);
    font-size: 0.95rem;
}

.auth-footer-link .auth-link-bold {
    text-decoration: none;
    font-weight: 400 !important;
}

.auth-link-bold span {
    font-weight: 600 !important;
    color: var(--white) !important;
}

.auth-footer-link .auth-link-bold:hover {
    text-decoration: underline;
    color: var(--white) !important;
}

/* Legacy styles for backwards compatibility */
.auth-container {
    width: 80%;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    padding-top: 25px;
    padding-bottom: 25px;
    padding-right: 15px;
    padding-left: 15px;
    background-color: #fff;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 2px 2px 30px rgba(0, 0, 0, 0.15);
    font-family: "Source Sans 3", sans-serif;
}

.auth-btn-container > form {
    width: 100%;
    max-width: 460px;
}

.auth-container > h1 {
    color: var(--font-dark);
    text-align: center;
    font-weight: 600;
}

.auth-container input[type="radio"],
.sub-purch-option input[type="radio"],
.comp-form input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.auth-container .radio-label,
.comp-form .radio-label,
.sub-purch-option .radio-label {
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.auth-container .radio-label:before,
.comp-form .radio-label::before,
.sub-purch-option .radio-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 45%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: #fff;
}

.sub-purch-option input[type="radio"]:checked + .radio-label {
    font-weight: 500;
}

.auth-container input[type="radio"]:checked + .radio-label:before,
.sub-purch-option input[type="radio"]:checked + .radio-label:before,
.comp-form input[type="checkbox"]:checked + .radio-label:before {
    background-color: var(--primary);
    border-color: var(--primary);
}

.auth-container input[type="radio"]:checked + .radio-label:after,
.comp-form input[type="checkbox"]:checked + .radio-label:after,
.sub-purch-option input[type="radio"]:checked + .radio-label::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 45%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--primary);
}

.auth-container input {
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
    border-radius: 50px !important;
}

.auth-container input::placeholder {
    color: var(--primary) !important;
}

.auth-container label,
.comp-form label {
    color: var(--primary) !important;
}

.auth-container > p {
    text-align: center;
}

.auth-btn-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-btn {
    border-radius: 50px;
    border: 2px solid var(--primary);
    font-size: 16px;
    padding: 0.5rem 2rem;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75%;
}

.auth-btn:hover {
    background-color: var(--secondary-hover);
    color: var(--white)!important;
}

.auth-icon-btn {
    background-color: transparent;
}

.auth-icon-btn > img {
    width: 30px;
    height: 32px;
}

.auth-btn > img {
    margin: 0 1rem;
}

.auth-btn-solid {
    background-color: var(--primary);
}
