/* =========================================================
   PackedIn - auth.css
   Page-specific styles for the Sign In / Create Account page.
   Relies on brand tokens & button classes defined in style.css.
   ========================================================= */

.hs-auth-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #fffaf1 0%, #fdf6ea 40%, #ffffff 100%);
    padding: 2.5rem 1rem 4rem;
}

/* ---------- Back link ---------- */
.hs-back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--hs-gray);
    font-size: 0.88rem;
    font-weight: 600;
    transition: color .2s ease;
}

    .hs-back-link:hover {
        color: var(--hs-forest-2);
    }

/* ---------- Wrapper ---------- */
.hs-auth-wrap {
    max-width: 620px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

/* ---------- Brand lockup ---------- */
.hs-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

.hs-brand-icon-lg {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 1.7rem;
    margin-bottom: 0.65rem;
}

.hs-brand-text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hs-brand-name-lg {
    font-size: 1.55rem;
}

/* ---------- Heading ---------- */
.hs-auth-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    text-align: center;
    color: var(--hs-dark);
    margin-bottom: 0.6rem;
}

.hs-auth-sub {
    text-align: center;
    color: var(--hs-gray);
    font-size: 0.98rem;
    max-width: 460px;
    margin: 0 auto 2.5rem;
}

/* ---------- Card ---------- */
.hs-auth-card {
    background: #fff;
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-lg);
    box-shadow: var(--hs-shadow);
    padding: 0;
    overflow: hidden;
}

.hs-auth-tabs {
    border: none;
    padding: 0 1rem;
    border-bottom: 1px solid var(--hs-border);
}

.hs-tab-block {
    width: 100%;
    padding: 1.35rem 0.5rem 1rem;
    border-radius: 0;
}

    .hs-tab-block.active::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 58px;
        height: 3px;
    }

.tab-content {
    padding: 2rem clamp(1.25rem, 4vw, 2.75rem) 2.25rem;
}

/* ---------- Sub-heading inside panes ---------- */
.hs-auth-subheading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--hs-dark);
    margin-bottom: 0.35rem;
}

.hs-wave {
    display: inline-block;
    animation: hs-wave-motion 2.4s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes hs-wave-motion {
    0%, 60%, 100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.hs-auth-subtext {
    color: var(--hs-gray);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

/* ---------- Google button ---------- */
.hs-btn-google {
    background: #fff;
    border: 1.5px solid var(--hs-border);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--hs-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

    .hs-btn-google:hover {
        border-color: var(--hs-forest-2);
        background: var(--hs-green-light);
    }

/* ---------- Divider ---------- */
.hs-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--hs-gray-light);
    font-size: 0.85rem;
    margin: 1.25rem 0;
}

    .hs-divider::before,
    .hs-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--hs-border);
    }

/* ---------- Inputs with icons ---------- */
.hs-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

    .hs-input-icon > i {
        position: absolute;
        left: 0.95rem;
        color: var(--hs-gray-light);
        font-size: 1rem;
        pointer-events: none;
    }

.hs-input {
    width: 100%;
    border: 1.5px solid var(--hs-border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem 0.7rem 2.6rem;
    font-size: 0.92rem;
    color: var(--hs-dark);
    background-color: #fbfbfa;
}

    .hs-input:focus {
        border-color: var(--hs-forest-2);
        box-shadow: 0 0 0 0.2rem rgba(22, 65, 44, 0.12);
        background-color: #fff;
    }

    .hs-input.is-valid {
        border-color: var(--hs-green);
    }

    .hs-input.is-invalid {
        border-color: #d0453c;
    }

.hs-toggle-eye {
    position: absolute;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: var(--hs-gray-light);
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

    .hs-toggle-eye:hover {
        color: var(--hs-forest-2);
    }

.hs-optional {
    color: var(--hs-gray-light);
    font-weight: 500;
    font-size: 0.75rem;
}

/* ---------- Caps lock warning ---------- */
.hs-caps-warning {
    display: none;
    align-items: center;
    gap: 0.4rem;
    color: var(--hs-gold-dark);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

    .hs-caps-warning.show {
        display: flex;
    }

/* ---------- Field hint (validation feedback) ---------- */
.hs-field-hint {
    font-size: 0.8rem;
    margin-top: 0.4rem;
    min-height: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

    .hs-field-hint.hs-hint-valid {
        color: var(--hs-green);
    }

    .hs-field-hint.hs-hint-invalid {
        color: #d0453c;
    }

/* ---------- Password strength meter ---------- */
.hs-strength-meter {
    margin-top: 0.65rem;
}

.hs-strength-track {
    height: 5px;
    border-radius: 999px;
    background: var(--hs-border);
    overflow: hidden;
}

.hs-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: #d0453c;
    transition: width .25s ease, background .25s ease;
}

.hs-strength-label {
    display: block;
    font-size: 0.76rem;
    color: var(--hs-gray-light);
    margin-top: 0.4rem;
}

/* ---------- Checkbox ---------- */
.hs-check .form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0.15em;
    border: 1.5px solid var(--hs-border);
    border-radius: 5px;
}

    .hs-check .form-check-input:checked {
        background-color: var(--hs-forest-2);
        border-color: var(--hs-forest-2);
    }

    .hs-check .form-check-input:focus {
        box-shadow: 0 0 0 0.2rem rgba(22, 65, 44, 0.12);
        border-color: var(--hs-forest-2);
    }

.hs-check .form-check-label {
    font-size: 0.88rem;
    color: var(--hs-dark);
}

/* ---------- Links ---------- */
.hs-link {
    color: var(--hs-green);
    font-weight: 600;
}

    .hs-link:hover {
        color: var(--hs-forest);
        text-decoration: underline;
    }

.hs-link-sm {
    color: var(--hs-green);
    font-weight: 600;
    font-size: 0.82rem;
}

    .hs-link-sm:hover {
        text-decoration: underline;
    }

/* ---------- Footer text under the form ---------- */
.hs-auth-footer-text {
    text-align: center;
    font-size: 0.88rem;
    color: var(--hs-gray);
    margin: 1.5rem 0 0;
}

/* ---------- Security note ---------- */
.hs-security-note {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.hs-security-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: var(--hs-green-light);
    color: var(--hs-forest-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.hs-security-note strong {
    display: block;
    font-size: 0.92rem;
    color: var(--hs-dark);
    margin-bottom: 0.15rem;
}

.hs-security-note p {
    font-size: 0.85rem;
    color: var(--hs-gray);
    margin: 0;
    max-width: 380px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 575.98px) {
    .hs-back-link {
        position: static;
        display: inline-flex;
        margin-bottom: 1.5rem;
    }

    .hs-auth-body {
        padding-top: 1.5rem;
    }

    .tab-content {
        padding: 1.5rem 1.1rem 1.75rem;
    }

    .hs-security-note {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

        .hs-security-note p {
            max-width: none;
        }
}

/* =========================================================
   Shared modal shell - used by OTP, Forgot & Reset Password
   ========================================================= */

.hs-modal .modal-dialog {
    max-width: 420px;
}

.hs-modal-content {
    border: none;
    border-radius: var(--hs-radius-lg);
    box-shadow: var(--hs-shadow);
    overflow: hidden;
    position: relative;
    background: #fff;
}

.hs-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--hs-cream);
    color: var(--hs-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all .2s ease;
    z-index: 2;
}

    .hs-modal-close:hover {
        background: var(--hs-green-light);
        color: var(--hs-forest-2);
    }

.hs-modal-body {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, #fffaf1 0%, #ffffff 55%);
}

.hs-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--hs-green-light);
    color: var(--hs-forest-2);
    font-size: 1.6rem;
    margin-bottom: 1.1rem;
}

.hs-modal-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--hs-dark);
    margin-bottom: 0.4rem;
}

.hs-modal-sub {
    color: var(--hs-gray);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

    .hs-modal-sub strong {
        color: var(--hs-dark);
        font-weight: 700;
    }

/* Body content is centered by default (OTP); forms read better left-aligned */
.hs-modal-body.hs-modal-form {
    text-align: left;
}

    .hs-modal-body.hs-modal-form .hs-modal-icon,
    .hs-modal-body.hs-modal-form .hs-modal-title,
    .hs-modal-body.hs-modal-form .hs-modal-sub {
        text-align: center;
        display: flex;
        margin-left: auto;
        margin-right: auto;
    }

    .hs-modal-body.hs-modal-form .hs-modal-title,
    .hs-modal-body.hs-modal-form .hs-modal-sub {
        display: block;
        text-align: center;
    }

.hs-modal-footer-note {
    margin: 1.25rem 0 0;
    font-size: 0.82rem;
    color: var(--hs-gray);
    text-align: center;
}

.hs-modal-cancel {
    display: block;
    text-align: center;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: var(--hs-gray);
    font-weight: 600;
}

    .hs-modal-cancel:hover {
        color: var(--hs-dark);
    }

/* =========================================================
   OTP / Verification Modal - digit boxes & timer
   ========================================================= */

/* ---------- Digit boxes ---------- */
.hs-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}

.hs-otp-box {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--hs-dark);
    border: 1.5px solid var(--hs-border);
    border-radius: 12px;
    background: #fbfbfa;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

    .hs-otp-box:focus {
        outline: none;
        border-color: var(--hs-forest-2);
        background: #fff;
        box-shadow: 0 0 0 0.2rem rgba(22, 65, 44, 0.14);
    }

    .hs-otp-box.is-filled {
        border-color: var(--hs-green);
        background: var(--hs-green-light);
    }

    .hs-otp-box.is-invalid {
        border-color: #d0453c;
        animation: hs-otp-shake .35s ease;
    }

@keyframes hs-otp-shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.hs-otp-error {
    color: #d0453c;
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 1.2em;
    margin: 0.6rem 0 0.2rem;
}

/* ---------- Timer / resend row ---------- */
.hs-otp-timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0 1.5rem;
    font-size: 0.85rem;
}

.hs-otp-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--hs-gray);
}

    .hs-otp-timer i {
        color: var(--hs-gray-light);
    }

    .hs-otp-timer strong {
        color: var(--hs-dark);
        font-weight: 700;
    }

.hs-otp-resend {
    display: none;
    align-items: center;
    gap: 0.4rem;
    color: var(--hs-green);
    font-weight: 700;
    cursor: pointer;
}

    .hs-otp-resend:hover {
        color: var(--hs-forest);
    }

    .hs-otp-resend.show {
        display: inline-flex;
    }

/* ---------- Submit buttons w/ loading state (OTP verify, reset, etc.) ---------- */
.hs-modal-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hs-modal-spinner {
    display: none;
}

.hs-modal-submit.is-loading .hs-modal-submit-text {
    visibility: hidden;
}

.hs-modal-submit.is-loading .hs-modal-spinner {
    display: inline-block;
    position: absolute;
}

@media (max-width: 400px) {
    .hs-otp-box {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }

    .hs-otp-inputs {
        gap: 0.4rem;
    }

    .hs-modal-body {
        padding: 2.25rem 1.25rem 1.75rem;
    }
}

/* =========================================================
   Forgot Password / Reset Password modals
   ========================================================= */

/* Verification code field styled like a code input (single field, not boxed) */
.hs-code-input {
    width: 100%;
    text-align: center;
    letter-spacing: 0.5em;
    font-weight: 700;
    font-size: 1.05rem;
    padding-left: 0.9rem !important;
}

    .hs-code-input::placeholder {
        letter-spacing: normal;
        font-weight: 500;
        font-size: 0.85rem;
    }

.hs-modal-form .mb-3:last-of-type,
.hs-modal-form .mb-2:last-of-type {
    margin-bottom: 1.5rem !important;
}


/* ---------- Logo mark in the brand lockup ---------- */
.hs-auth-logo {
    display: block;
    width: auto;
    height: 64px;
    margin-bottom: 0.8rem;
}
