/**
 * Custom Login & Registration Page Styles
 */

/* Override Astra container for auth pages */
.page-template-page-login .site-content,
.page-template-page-register .site-content,
.page-template-page-lost-password .site-content {
    background: #f5f5f5;
}

.page-template-page-login #primary,
.page-template-page-register #primary,
.page-template-page-lost-password #primary,
.page-template-page-login .ast-container,
.page-template-page-register .ast-container,
.page-template-page-lost-password .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

.custom-auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
}

.custom-auth-box {
    width: 400px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.custom-auth-box h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.auth-form label .required {
    color: #e74c3c;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    border-color: var(--ast-global-color-0, #0073aa);
    outline: none;
}

/* Password field */
.password-field-wrap {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.password-toggle:hover {
    color: #666;
}

/* Options row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--ast-global-color-0, #0073aa);
}

.forgot-password {
    color: var(--ast-global-color-0, #0073aa);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--ast-global-color-0, #0073aa);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit-btn:hover {
    background: color-mix(in srgb, var(--ast-global-color-0, #0073aa) 85%, black);
}

/* Link to other page */
.auth-switch {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: var(--ast-global-color-0, #0073aa);
    text-decoration: none;
    font-weight: 500;
}

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

/* Messages */
.auth-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.auth-message ul {
    margin: 0;
    padding: 0 0 0 18px;
}

.auth-message li {
    margin-bottom: 4px;
}

.auth-message li:last-child {
    margin-bottom: 0;
}

/* Back link */
.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--ast-global-color-0, #0073aa);
    text-decoration: none;
    font-size: 14px;
}

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

.back-link i {
    margin-right: 5px;
}

/* Terms checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.terms-checkbox input {
    margin-top: 2px;
    flex-shrink: 0;
}

.terms-checkbox a {
    color: var(--ast-global-color-0, #0073aa);
}

/* Responsive */
@media (max-width: 480px) {
    .custom-auth-box {
        padding: 30px 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
