/* ============================================================
   HPL Auth Pages — login, lost password, reset password, register
   ============================================================ */

/* ── Page wrapper ─────────────────────────────────────────── */
.hpl-auth-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 70vh;
    padding: 48px 16px 64px;
    background: transparent;
}

/* ── Card ─────────────────────────────────────────────────── */
.hpl-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

@media (max-width: 480px) {
    .hpl-auth-card {
        padding: 32px 24px 28px;
        border-radius: 8px;
    }
}

/* ── Headings ─────────────────────────────────────────────── */
.hpl-auth-heading {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    line-height: 1.2;
}

.hpl-auth-sub {
    margin: 0 0 28px;
    font-size: .92rem;
    color: #6b7280;
    text-align: center;
}

/* ── Form fields ─────────────────────────────────────────── */
.hpl-auth-field {
    margin-bottom: 20px;
}

.hpl-auth-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
}

.hpl-auth-forgot {
    font-size: .8rem;
    font-weight: 400;
    color: #8B0000;
    text-decoration: none;
}

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

.hpl-auth-field input[type="text"],
.hpl-auth-field input[type="email"],
.hpl-auth-field input[type="password"],
.hpl-auth-field input[type="tel"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.hpl-auth-field input:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139,0,0,.12);
    background: #fff;
}

.hpl-auth-field small {
    display: block;
    margin-top: 5px;
    font-size: .78rem;
    color: #9ca3af;
}

/* ── Password show/hide wrapper ─────────────────────────── */
.hpl-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hpl-pw-wrap input {
    flex: 1;
    padding-right: 46px !important;
}

.hpl-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    color: #9ca3af;
    transition: color .15s;
}

.hpl-pw-toggle:hover {
    color: #374151;
}

.hpl-pw-toggle svg {
    width: 18px;
    height: 18px;
}

/* ── Remember me / checkbox ─────────────────────────────── */
.hpl-auth-remember {
    margin-bottom: 24px;
}

.hpl-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 400 !important;
    color: #374151;
    cursor: pointer;
    justify-content: flex-start !important;
}

.hpl-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #8B0000;
    cursor: pointer;
}

/* ── Submit button ───────────────────────────────────────── */
.hpl-auth-submit {
    display: block;
    width: 100%;
    height: 48px;
    background: #8B0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-bottom: 0;
}

.hpl-auth-submit:hover:not(:disabled) {
    background: #700000;
}

.hpl-auth-submit:active:not(:disabled) {
    transform: scale(.98);
}

.hpl-auth-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Messages ────────────────────────────────────────────── */
.hpl-auth-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.hpl-auth-msg--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.hpl-auth-msg--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ── Switch / footer links ───────────────────────────────── */
.hpl-auth-switch {
    margin: 22px 0 0;
    text-align: center;
    font-size: .88rem;
    color: #6b7280;
}

.hpl-auth-switch a {
    color: #8B0000;
    font-weight: 600;
    text-decoration: none;
}

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

.hpl-auth-notice {
    max-width: 440px;
    margin: 32px auto;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: .9rem;
    color: #374151;
    text-align: center;
}

.hpl-auth-notice--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ── Registration card reuse ─────────────────────────────── */
.hpl-register-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 16px 64px;
}

.hpl-register-wrap form {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* Shared field styles with registration.css — mirrors hpl-auth-field */
.hpl-field-group {
    margin-bottom: 20px;
}

.hpl-field-group label {
    display: block;
    margin-bottom: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
}

.hpl-field-group input[type="text"],
.hpl-field-group input[type="email"],
.hpl-field-group input[type="password"],
.hpl-field-group input[type="tel"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.hpl-field-group input:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139,0,0,.12);
    background: #fff;
}

.hpl-field-group small {
    display: block;
    margin-top: 5px;
    font-size: .78rem;
    color: #9ca3af;
}

.hpl-field-group .req {
    color: #8B0000;
}

/* ── Dealer contact panel (shown instead of reg form) ───── */
.hpl-dealer-contact-panel {
    margin-bottom: 20px;
}

.hpl-dealer-contact-inner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 20px 22px;
    font-size: .92rem;
    color: #1c1917;
    line-height: 1.65;
}

.hpl-dealer-contact-inner h2,
.hpl-dealer-contact-inner h3,
.hpl-dealer-contact-inner h4 {
    margin-top: 0;
    color: #1c1917;
    font-size: 1rem;
}

.hpl-dealer-contact-inner p:last-child,
.hpl-dealer-contact-inner ul:last-child {
    margin-bottom: 0;
}

.hpl-dealer-contact-inner a {
    color: #8B0000;
    font-weight: 600;
    text-decoration: none;
}

.hpl-dealer-contact-inner a:hover {
    text-decoration: underline;
}

.hpl-dealer-contact-inner ul {
    padding-left: 18px;
}

/* ── Account type radio cards ────────────────────────────── */
.hpl-account-type {
    display: flex;
    gap: 12px;
}

.hpl-type-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.hpl-type-option:has(input:checked) {
    border-color: #8B0000;
    background: #fff5f5;
}

.hpl-type-option input[type="radio"] {
    margin-top: 3px;
    accent-color: #8B0000;
    flex-shrink: 0;
}

.hpl-type-option strong {
    display: block;
    font-size: .9rem;
    color: #111;
}

.hpl-type-option small {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    margin-top: 2px;
}

/* ── Registration submit + messages ─────────────────────── */
.hpl-btn.hpl-btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    background: #8B0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    margin-top: 8px;
}

.hpl-btn.hpl-btn-primary:hover {
    background: #700000;
}

.hpl-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.hpl-message--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.hpl-message--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.hpl-login-link {
    margin: 20px 0 0;
    text-align: center;
    font-size: .88rem;
    color: #6b7280;
}

.hpl-login-link a {
    color: #8B0000;
    font-weight: 600;
    text-decoration: none;
}

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