/* ============================================================================
   PASSWORD FLOW & GUEST ORDER LOOKUP
   ----------------------------------------------------------------------------
   The three PasswordController views (`customer/password-email`,
   `customer/password-new`, `customer/password-infos`) and the guest order
   lookup (`customer/guest-login`) share the `.frn-auth-form` block so they
   read as the same surface as the sign-in page: same 411px centred column,
   same white background, same field and button treatment.

   Loaded from `_partials/stylesheets.tpl`, just before design-system.css.
   ============================================================================ */

/* `#content.page-content` sets an inherited #7a7a7a; anything in the form that
   should read as primary text has to opt out of it. */
.frn-auth-form {
    color: var(--cText);
}

.frn-auth-form__title {
    margin: 0 0 8px;
    font-family: var(--ffHeading), sans-serif;
    font-size: var(--fz-h2);
    font-weight: var(--fwHeading);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    text-align: center;
    color: var(--cText);
}

.frn-auth-form__intro {
    margin: 0 0 28px;
    font-family: var(--ffPrimary), sans-serif;
    font-size: var(--fz-body);
    line-height: var(--lh-base);
    text-align: center;
    color: var(--cTextLight);
}

.frn-auth-form__intro strong {
    font-weight: 500;
    color: var(--cText);
}

/* ---- fields ---- */

.frn-auth-form__field + .frn-auth-form__field {
    margin-top: 16px;
}

.frn-auth-form .frn-input__label {
    color: var(--cBlack);
}

.frn-auth-form .frn-input__control {
    margin-bottom: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.frn-auth-form .frn-input__control:focus {
    border-color: var(--cBlack);
    box-shadow: 0 0 0 3px rgba(26, 27, 26, .08);
    outline: none;
}

.frn-auth-form__hint {
    display: block;
    margin-top: 6px;
    font-family: var(--ffPrimary), sans-serif;
    font-size: var(--fz-small);
    line-height: var(--lh-base);
    color: var(--cTextLight);
}

/* ---- actions ---- */

.frn-auth-form__actions {
    margin-top: 24px;
}

/* One primary action; "back to login" is the quiet way out, not a second
   button competing with it. The block prefix is needed to outrank
   customer-account.css's `.page-customer-account a { text-decoration: none }`,
   which the password pages' body class matches. */
.frn-auth-form .frn-auth-form__back {
    display: block;
    margin-top: 18px;
    font-family: var(--ffPrimary), sans-serif;
    font-size: var(--fz-14);
    font-weight: 500;
    line-height: 20px;
    text-align: center;
    color: var(--cText);
    text-decoration: underline;
}

.frn-auth-form .frn-auth-form__back:hover,
.frn-auth-form .frn-auth-form__back:focus {
    color: var(--cBlack);
    text-decoration: underline;
}

.frn-auth-form .frn-button:focus-visible,
.frn-auth-form__back:focus-visible {
    outline: 2px solid var(--cBlack);
    outline-offset: 2px;
}

/* ---- alerts ----
   PrestaShop's markup gives the icons a bare `<svg viewBox>` with no intrinsic
   size — unsized they rendered at the column's full 411px — and a hard-coded
   `fill="#fff"`; both are corrected here (a presentation attribute loses to
   any CSS declaration). */

.frn-auth-form__alert {
    margin: 0 0 24px;
    padding: 12px 14px;
    border-radius: 6px;
    list-style: none;
}

.frn-auth-form__alert .item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.frn-auth-form__alert .item + .item {
    margin-top: 8px;
}

.frn-auth-form__alert .item i {
    flex: 0 0 20px;
    line-height: 0;
}

.frn-auth-form__alert .item svg {
    display: block;
    width: 20px;
    height: 20px;
}

.frn-auth-form__alert .item p {
    margin: 0;
    font-family: var(--ffPrimary), sans-serif;
    font-size: var(--fz-14);
    line-height: 20px;
    text-align: left;
}

.frn-auth-form__alert--error {
    background-color: #fdece7;
}

.frn-auth-form__alert--error .item svg path {
    fill: #ee4719;
}

.frn-auth-form__alert--error .item p {
    color: #8c2a0f;
}

.frn-auth-form__alert--success {
    background-color: #e4f4ec;
}

.frn-auth-form__alert--success .item svg path {
    fill: #1b7a4b;
}

.frn-auth-form__alert--success .item p {
    color: #14603a;
}

/* A confirmation screen is only the message plus the way onward, so the alert
   sits closer to its action than a form's would. */
.frn-auth-form--confirmation .frn-auth-form__alert {
    margin-bottom: 24px;
}

/* The auth column is a fixed 411px with no responsive cap of its own. */
@media (max-width: 767.98px) {
    #password .frn-content-block-center,
    #guest-tracking .frn-content-block-center {
        width: 100%;
    }

    .frn-auth-form__intro {
        margin-bottom: 24px;
    }
}

/* ============================================================================
   SIGN-IN & REGISTRATION FORMS
   ----------------------------------------------------------------------------
   The registration form renders `customer/_partials/customer-form.tpl`, which
   borrows the cart's `.frn-cart-page__*` class names. Those carry no spacing of
   their own outside the cart page — so on /registracija the fields ran flush
   into each other and into the tab strip — and from 960px up the cart's total
   wrapper right-aligns its submit at a 250px cap. Everything below re-states the
   sign-in form's rhythm (`.frn-login__field`, 20px) for that markup, scoped to
   `#registration #customer-form` so the cart, checkout and identity pages, which
   style the same class names for themselves, stay untouched.
   ============================================================================ */

#registration #customer-form .frn-cart-page__field {
    padding-top: var(--spaceTopL);
}

/* The consent and newsletter boxes read as one group: closer to each other than
   to the last text field above them. */
#registration #customer-form .frn-cart-page__field--checkbox {
    padding-top: var(--spaceTopS);
}

#registration #customer-form .frn-cart-page__field:not(.frn-cart-page__field--checkbox) + .frn-cart-page__field--checkbox {
    padding-top: var(--spaceTopL);
}

/* The base `.frn-checkbox` is a flex row holding one 14px line, which only works
   for a bare label: consent copy carries inline policy links, and as flex items
   the whitespace around them is dropped ("Sutinku suprivatumo politika"). Both
   controls inside are absolutely positioned, so plain block flow lays the
   sentence out correctly; the mark then needs pinning to the first line.
   #customer-form also renders on the account's personal-information page. */
#customer-form .frn-checkbox,
#authentication #login-form .frn-checkbox {
    display: block;
    font-size: var(--fz-body);
    line-height: var(--lh-base);
}

#customer-form .frn-checkbox__checkmark,
#authentication #login-form .frn-checkbox__checkmark {
    top: 3px;
}

/* Policy links sit inside the consent sentence, so they carry no leading gap
   (the base rule spaces links appended after a label). */
#customer-form .frn-checkbox a {
    margin-left: 0;
}

/* The checkout's guest/sign-in/register strip reuses `.frn-login__tabs` at
   three-up in a narrower column, so the larger label is scoped to the two
   two-up auth pages rather than set on the component. */
#authentication .frn-login__tabs,
#registration .frn-login__tabs {
    font-size: var(--fz-button);
}

/* ux_validation prepends its form-level error box to the form, straight under
   the tabs. Each field row carries its own 20px top padding, so the box takes
   the same gap above and leaves the gap below to the next row. */
#authentication .frn-login .ux-val-form-errors,
#registration .frn-login .ux-val-form-errors {
    margin-top: 20px;
    margin-bottom: 0;
}

/* The forgot-password link shares this row with the 14px "remember me" label;
   at the shared --fz-button 16px it read as the heavier of the two. The
   underline comes back because customer-account.css's
   `.page-customer-account a { text-decoration: none }` — a body class these
   pages carry — outranks `.frn-button--text`; it draws in currentColor, which
   is already --cBlack here. */
#authentication #login-form .frn-login__field--x2 .frn-button__text {
    font-size: var(--fz-body);
}

#authentication #login-form .frn-login__field--x2 .frn-button--text,
#authentication #login-form .frn-login__field--x2 .frn-button--text:hover,
#authentication #login-form .frn-login__field--x2 .frn-button--text:focus {
    color: var(--cBlack);
    text-decoration: underline;
}

/* "Remember me" pairs a 21px checkbox with a text button that still carries
   `.frn-button`'s 48px pill height, so centring the two padded ~14px of dead
   space above and below the checkbox. Collapsing the link to its own line box
   puts this row on the registration form's 20/32 rhythm. */
#authentication #login-form .frn-login__field--x2 {
    padding-top: var(--spaceTopL);
}

#authentication #login-form .frn-login__field--x2 .frn-button {
    height: auto;
}

#authentication #login-form .frn-login__field--x2 .frn-button__text {
    line-height: 21px;
}

#registration #customer-form .frn-cart-page__total-wrapper {
    display: block;
    padding-top: var(--spaceTopXxl);
}

#registration #customer-form .frn-cart-page__bottom-action {
    width: 100%;
    padding-top: 0;
}

#registration #customer-form .frn-cart-page__bottom-action .frn-button {
    min-width: 0;
    width: 100%;
}

/* ============================================================================
   SOCIAL LOGIN — ets_onepagecheckout OAuth buttons
   ----------------------------------------------------------------------------
   Markup comes from this theme's `modules/ets_onepagecheckout/.../social.tpl`
   override, used on the sign-in page, the registration form and the checkout
   sign-in block. The vendor's social.css loads before the theme chain, so these
   rules win without needing !important; the override deliberately drops the
   vendor class names so almost nothing of it still matches.

   Sized to the primary pill above them (48px tall, 24px radius) so the whole
   stack reads as one column of choices. Brand colours are fixed by Facebook's
   and Google's identity guidelines and are not theme tokens.
   ============================================================================ */
.frn-social-login {
    margin: 0;
    text-align: left;
}

.frn-social-login__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 16px;
    color: var(--cTextLight);
    font-size: var(--fz-small);
}

.frn-social-login__divider::before,
.frn-social-login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--bdcPrimary);
}

.frn-social-login__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.frn-social-login__item {
    margin: 0;
}

.frn-social-login__button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 var(--spaceRightM);
    border: 1px solid transparent;
    border-radius: 24px;
    font-family: inherit;
    font-size: var(--fz-button);
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.frn-social-login__icon {
    display: flex;
    flex: 0 0 auto;
}

.frn-social-login__icon svg {
    width: 20px;
    height: 20px;
}

.frn-social-login__button--facebook {
    background-color: #1877f2;
    color: #fff;
}

.frn-social-login__button--facebook:hover {
    background-color: #166fe5;
}

/* Google requires its mark on a light surface with a visible outline rather than
   on a brand-blue fill, so this button is outlined where Facebook's is solid. */
.frn-social-login__button--google {
    background-color: #fff;
    border-color: var(--bdcPrimary);
    color: var(--cText);
}

.frn-social-login__button--google:hover {
    background-color: #f6f7f7;
    border-color: var(--bdcPrimaryDark);
}

.frn-social-login__button--paypal {
    background-color: #003087;
    color: #fff;
}

.frn-social-login__button--paypal:hover {
    background-color: #00256b;
}

.frn-social-login__button:focus-visible {
    outline: 2px solid var(--cText);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .frn-social-login__button {
        transition: none;
    }
}
