/* ==========================================================================
   HAPPYPIP — Login / Register Page
   ========================================================================== */

.hp-auth {
    max-width: 520px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md) var(--space-3xl);
}

/* Force rounded corners on the WooCommerce account container */
.woocommerce-account .woocommerce,
.woocommerce-account .entry-content,
.woocommerce-account .ast-container,
.woocommerce-account .site-content .ast-container {
    border-radius: var(--radius-lg) !important;
    overflow: visible !important;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hp-auth__hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.hp-auth__title {
    font-family: var(--font-heading);
    font-size: var(--text-h1);
    font-weight: 700;
    color: var(--green-dark);
    margin: 0 0 var(--space-xs);
}

.hp-auth__sub {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-body);
    margin: 0 0 var(--space-sm);
}

/* Value props — sunset check circles */
.hp-auth__value-props {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.hp-auth__value-prop {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: var(--text-sub);
    font-weight: 600;
    color: var(--green-dark);
}

.hp-auth__value-prop::before {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--icon-check-white) no-repeat center / 13px 13px, var(--gradient-sunset);
    box-shadow: 0 2px 8px rgba(236, 169, 110, 0.3);
}

/* ==========================================================================
   TRUST BAR
   ========================================================================== */

.hp-auth__trust {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-xl);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
}

.hp-auth__trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--text-muted);
}

.hp-auth__trust-item .hp-ico {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ==========================================================================
   TAB TOGGLE
   ========================================================================== */

.hp-auth__tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    padding: 3px;
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-default);
}

.hp-auth__tab {
    flex: 1;
    font-family: var(--font-heading);
    font-size: var(--text-sub);
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hp-auth__tab.is-active {
    background: var(--gradient-sunset);
    color: #fff;
    box-shadow: 0 2px 8px rgba(236, 169, 110, 0.3);
}

.hp-auth__tab:not(.is-active):hover {
    color: var(--sunset-text);
}

/* ==========================================================================
   FORM PANELS
   ========================================================================== */

.hp-auth__panel {
    display: none;
}

.hp-auth__panel.is-active {
    display: block;
}

/* Social Login — Custom Google button */
.hp-auth__social {
    margin-bottom: var(--space-md) !important;
}

/* Hide any Nextend auto-rendered buttons that leak through */
.hp-auth__social ~ div[id^="nsl-"],
.hp-auth .nsl-container,
.hp-auth [id^="nsl-custom-login-form"],
#nsl-custom-login-form-main,
.woocommerce-form .nsl-container {
    display: none !important;
}

.hp-auth__google-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 20px !important;
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--bg-card) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.hp-auth__google-btn:hover {
    border-color: var(--sunset-light) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
    color: var(--green-dark) !important;
}

.hp-auth__google-icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    display: block !important;
    filter: none !important;
}

.hp-auth__google-btn span {
    font-family: 'Google Sans', var(--font-heading) !important;
    font-size: var(--text-base) !important;
    font-weight: 600 !important;
    color: var(--green-dark) !important;
    line-height: 1 !important;
}

/* "or" Divider */
.hp-auth__divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hp-auth__divider::before,
.hp-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

.hp-auth__divider span {
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.hp-auth__panel form {
    border: 1.5px solid var(--border-default) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--space-xl) !important;
    background: var(--bg-card) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */

.hp-auth__field {
    margin-bottom: var(--space-md);
}

.hp-auth__field label {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: var(--space-xs);
}

.hp-auth__req {
    color: var(--sunset-deep);
}

.hp-auth__field input[type="text"],
.hp-auth__field input[type="email"],
.hp-auth__field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-lg) !important;
    font-family: var(--font-heading);
    font-size: var(--text-base);
    background: var(--bg-input) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.hp-auth__field input[type="text"]:focus,
.hp-auth__field input[type="email"]:focus,
.hp-auth__field input[type="password"]:focus {
    border-color: var(--sunset-mid) !important;
    box-shadow: 0 0 0 3px rgba(236, 169, 110, 0.15) !important;
}

/* ── Remember me + Forgot password row ── */
.hp-auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.hp-auth__remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.hp-auth__remember input[type="checkbox"],
.hp-auth input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--sunset-mid);
    border-radius: 50% !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid var(--border-input);
    background: var(--bg-input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hp-auth__remember input[type="checkbox"]:checked,
.hp-auth input[type="checkbox"]:checked {
    background: var(--sunset-mid);
    border-color: var(--sunset-mid);
}

.hp-auth__remember input[type="checkbox"]:checked::after,
.hp-auth input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-image: var(--icon-check-white-bold);
    background-repeat: no-repeat;
    background-size: 12px 12px;
}

.hp-auth__forgot {
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--sunset-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hp-auth__forgot:hover {
    color: var(--sunset-deep);
}

/* ── Submit button ── */
.hp-auth__submit {
    width: 100%;
    padding: 14px;
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
}

/* ── Age verification checkbox ── */
.hp-auth__field--checkbox {
    margin-bottom: var(--space-lg);
}

.hp-auth__age-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-body);
    line-height: 1.5;
    cursor: pointer;
}

.hp-auth__age-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.hp-auth__age-check a {
    color: var(--sunset-text);
    text-decoration: underline;
}

.hp-auth__age-check a:hover {
    color: var(--sunset-deep);
}

/* ── Sign-up incentive ── */
.hp-auth__incentive {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--sunset-text);
    text-align: center;
    margin: 0;
}

.hp-auth__incentive .hp-ico {
    width: 16px;
    height: 16px;
}

/* ── Loyalty Rewards Card ── */
.hp-auth__loyalty {
    background: var(--gradient-sunset);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: var(--space-lg);
}

.hp-auth__loyalty-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.hp-auth__loyalty-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.hp-auth__loyalty-title {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-sub);
    font-weight: 700;
    color: var(--green-dark);
}

.hp-auth__loyalty-sub {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-label);
    color: rgba(30, 58, 47, 0.6);
}

.hp-auth__loyalty-perks {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(30, 58, 47, 0.1);
}

.hp-auth__loyalty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 58, 47, 0.08);
}

.hp-auth__loyalty-row:last-child {
    border-bottom: none;
}

.hp-auth__loyalty-label {
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--green-dark);
}

.hp-auth__loyalty-value {
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 700;
    color: var(--green-dark);
}

.hp-auth__loyalty-bottom {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(30, 58, 47, 0.1);
    text-align: center;
}

.hp-auth__loyalty-bottom strong {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-sub);
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 2px;
}

.hp-auth__loyalty-bottom span {
    font-family: var(--font-body);
    font-size: var(--text-label);
    color: rgba(30, 58, 47, 0.5);
}

/* ── Turnstile widget ── */
.hp-auth__turnstile {
	margin-bottom: var(--space-md);
	display: flex;
	justify-content: center;
}

/* ── Guarded submit — disabled until Turnstile verifies ── */
.hp-auth__submit--guarded:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

/* ── Back to Sign In link ── */
.hp-auth__back-link {
	text-align: center;
	margin-top: var(--space-md);
}

.hp-auth__back-link a {
	font-family: var(--font-heading);
	font-size: var(--text-sub);
	font-weight: 600;
	color: var(--sunset-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hp-auth__back-link a:hover {
	color: var(--sunset-deep);
}

/* ── Name fields side by side ── */
.hp-auth__row--names {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-md);
	margin-bottom: 0;
}

.hp-auth__row--names .hp-auth__field {
	margin-bottom: var(--space-md);
}

/* ── Privacy / personal data note (below button) ── */
.hp-auth__privacy-note {
	margin-top: var(--space-sm);
	text-align: center;
}

.hp-auth__privacy-note .woocommerce-privacy-policy-text,
.hp-auth__privacy-note p {
	font-family: var(--font-body) !important;
	font-size: var(--text-label) !important;
	color: var(--text-muted) !important;
	line-height: 1.4;
	margin: 0;
}

.hp-auth__privacy-note a {
	color: var(--sunset-text);
}

/* ── Note (password will be emailed) ── */
.hp-auth__note {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    font-style: italic;
}

/* ==========================================================================
   CONFIRMATION (lost password sent, email verification)
   ========================================================================== */

.hp-auth__confirm {
    text-align: center;
    padding: var(--space-lg) 0;
}

.hp-auth__confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.hp-auth__confirm-icon .hp-ico {
    width: 40px;
    height: 40px;
}

.hp-auth__confirm-text {
    font-family: var(--font-body);
    font-size: var(--text-sub);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   QUOTE
   ========================================================================== */

.hp-auth__quote {
    text-align: center;
    padding: var(--space-2xl) 0 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border-default);
}

.hp-auth__quote blockquote {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-style: italic;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.hp-auth__quote-author {
    font-style: normal;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   ASTRA + WOOCOMMERCE OVERRIDES
   ========================================================================== */

/* Hide Astra page title on account page */
.woocommerce-account .entry-title,
.woocommerce-account .page-title,
.woocommerce-account .ast-archive-description,
.woocommerce-account .entry-header {
    display: none !important;
}

/* ==========================================================================
   WOOCOMMERCE OVERRIDES — kill default WC form styles on this page
   ========================================================================== */

.hp-auth .woocommerce-form-row {
    padding: 0;
    margin: 0;
}

.hp-auth .u-columns,
.hp-auth .u-column1,
.hp-auth .u-column2 {
    display: block;
    width: 100%;
    float: none;
    padding: 0;
    margin: 0;
}

.hp-auth .woocommerce-form h2 {
    display: none;
}

.hp-auth .woocommerce-form .form-row {
    padding: 0;
    margin: 0 0 var(--space-md);
}

.hp-auth .woocommerce-LostPassword {
    display: none;
}

.hp-auth .woocommerce-button,
.hp-auth .button {
    display: none;
}

.hp-auth .woocommerce-form-login__rememberme {
    display: none;
}

/* WooCommerce notices — inherits universal style from global.css */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 540px) {
    .hp-auth {
        padding: var(--space-xl) var(--space-sm) var(--space-2xl);
    }

    .hp-auth__value-props {
        gap: var(--space-sm);
    }

    .hp-auth__value-prop {
        font-size: var(--text-badge);
        gap: 4px;
    }

    .hp-auth__value-prop::before {
        width: 16px;
        height: 16px;
        font-size: 9px;
        line-height: 16px;
    }

    .hp-auth__loyalty {
        padding: 18px;
    }

    .hp-auth__loyalty-logo {
        width: 28px;
        height: 28px;
    }

    .hp-auth__trust {
        flex-wrap: wrap;
        gap: var(--space-sm) var(--space-md);
        justify-content: center;
    }

    .hp-auth__row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .hp-auth__row--names {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
