/* =========================================================
   Prezzomania V2 - Account checkout shell
   Login / registrazione con header, trust bar e footer
   coerenti con indirizzi e pagamento.
   Mobile first.
   ========================================================= */

.account-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #f1f1f1;
    color: #292929;
    font-family: "Montserrat", Arial, sans-serif;
}

/* =========================
   HEADER CHECKOUT
   ========================= */
.checkout-header {
    flex: 0 0 auto;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #dedede;
}

.checkout-header__inner {
    width: min(1180px, calc(100% - 2rem));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.checkout-header__logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 0 1 auto;
}

.checkout-header__logo img {
    display: block;
    width: min(178px, 42vw);
    height: auto;
}

.checkout-header__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    color: #555;
    font-size: 0.8rem;
}

.checkout-header__links a {
    color: #343434;
}

.checkout-secure {
    white-space: nowrap;
}

.checkout-secure::before {
    content: "\1F512";
    margin-right: 0.35rem;
    font-size: 0.78em;
}

.checkout-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #343434;
    text-decoration: none;
    white-space: nowrap;
}

.checkout-cart-link:hover,
.checkout-cart-link:focus-visible {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkout-cart-link__icon {
    position: relative;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkout-cart-link__icon svg {
    width: 23px;
    height: 23px;
}

.checkout-cart-link__badge {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff7a00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
}

/* =========================
   TRUST BAR
   ========================= */
.checkout-benefits {
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #dedede;
}

.checkout-benefits__inner {
    width: min(760px, calc(100% - 2rem));
    min-height: 44px;
    margin: 0 auto;
    padding: 0.55rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem 2.4rem;
}

.checkout-benefit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: #555;
    font-size: 0.78rem;
    white-space: nowrap;
}

.checkout-benefit strong {
    color: #3d3d3d;
    font-weight: 700;
}

.checkout-benefit__icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6a6d70;
}

.checkout-benefit__icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

/* =========================
   ACCOUNT CONTENT
   ========================= */
.account-main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem 3rem;
}

.account-card {
    width: 100%;
    max-width: 500px;
    padding: 1.35rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.account-card--wide {
    max-width: 620px;
}

.account-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
}

.account-copy {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

.account-copy--muted,
.account-help {
    color: #696969;
}

.account-form {
    display: grid;
    gap: 1rem;
}

.account-form-grid {
    display: grid;
    gap: 1rem;
}

.account-field {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.account-field label {
    font-size: 0.82rem;
    font-weight: 600;
}

.account-field input {
    width: 100%;
    height: 50px;
    min-height: 50px;
    padding: 0 0.9rem;
    box-sizing: border-box;
    border: 1px solid #8b8b8b;
    border-radius: 3px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 0.95rem;
    outline: 0;
}

.account-field input:focus {
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14);
}

.account-field input[aria-invalid="true"],
.account-check input[aria-invalid="true"] {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.account-field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.account-field__label-row a {
    color: #4a4a4a;
    font-size: 0.74rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.account-password-control {
    position: relative;
}

.account-password-control input {
    padding-right: 5.3rem;
}

.account-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    padding: 0.2rem 0.25rem;
    border: 0;
    background: transparent;
    color: #4f4f4f;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.account-help {
    margin: -0.25rem 0 0;
    font-size: 0.76rem;
    line-height: 1.45;
}

.account-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #454545;
    font-size: 0.82rem;
    line-height: 1.45;
    cursor: pointer;
}

.account-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 0.05rem;
    accent-color: #ff8a00;
}

.account-check a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.account-check--boxed {
    padding: 0.85rem;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fafafa;
}

.account-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.account-button--primary {
    background: #ff7a00;
    border-color: #ff7a00;
    color: #fff;
}

.account-button--primary:hover,
.account-button--primary:focus-visible {
    background: #e96f00;
    border-color: #e96f00;
    color: #fff;
}

.account-button--secondary {
    background: #fff;
    border-color: #777;
    color: #292929;
}

.account-button--secondary:hover,
.account-button--secondary:focus-visible {
    background: #f6f6f6;
    color: #292929;
}

.account-button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.account-back-link {
    display: block;
    margin-top: 1.25rem;
    color: #4a4a4a;
    font-size: 0.86rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.account-separator {
    position: relative;
    margin: 1.35rem 0;
    text-align: center;
}

.account-separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #e0e0e0;
}

.account-separator span {
    position: relative;
    display: inline-block;
    padding: 0 0.8rem;
    background: #fff;
    color: #777;
    font-size: 0.75rem;
}

.account-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.account-alert--error {
    background: #fff1f0;
    border: 1px solid #f0b8b4;
    color: #9e241c;
}

/* =========================
   CHECKOUT FOOTER
   ========================= */
.checkout-footer {
    flex: 0 0 auto;
    width: 100%;
    background: #fff;
    border-top: 1px solid #dedede;
    color: #555;
}

.checkout-footer__inner {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 2.2rem;
}

.checkout-footer__services h2 {
    margin: 0 0 1.6rem;
    color: #191919;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
}

.checkout-footer__service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    align-items: start;
}

.checkout-footer__service {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    text-align: center;
}

.checkout-footer__service-icon {
    position: relative;
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.checkout-footer__service-icon::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    opacity: 0.18;
    background: currentColor;
}

.checkout-footer__service-icon svg {
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    color: #31363b;
}

.checkout-footer__service-icon--blue { color: #75b8ef; }
.checkout-footer__service-icon--green { color: #79dc90; }
.checkout-footer__service-icon--yellow { color: #eedc65; }

.checkout-footer__service p {
    margin: 0;
    color: #5c5c5c;
    font-size: 0.9rem;
    line-height: 1.45;
}

.checkout-footer__service p strong {
    color: #4b4b4b;
    font-weight: 700;
}

.checkout-footer__links {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid #dedede;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.8rem;
}

.checkout-footer__links a,
.checkout-footer__cookies a {
    color: #393939;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkout-footer__links a {
    font-size: 0.84rem;
}

.checkout-footer__cookies {
    margin-top: 1.25rem;
    text-align: center;
}

.checkout-footer__cookies a {
    font-size: 0.78rem;
}

@media (min-width: 576px) {
    .account-main {
        padding-top: 2.5rem;
        padding-bottom: 3.5rem;
    }

    .account-card {
        padding: 1.7rem;
    }

    .account-title {
        font-size: 1.55rem;
    }

    .account-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .checkout-header__inner {
        min-height: 84px;
    }

    .checkout-header__links {
        font-size: 0.88rem;
    }

    .checkout-footer__service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }

    .checkout-footer__inner {
        padding-top: 2.4rem;
        padding-bottom: 2.6rem;
    }
}

@media (max-width: 639.98px) {
    .checkout-header__inner {
        width: calc(100% - 2rem);
        min-height: 68px;
        gap: 0.7rem;
    }

    .checkout-header__logo img {
        width: min(142px, 42vw);
    }

    .checkout-cart-link__badge {
        right: -4px;
    }

    .checkout-header__links {
        gap: 0.35rem 0.65rem;
        font-size: 0.72rem;
    }

    .checkout-secure {
        display: none;
    }

    .checkout-cart-link > span:first-child {
        display: none;
    }

    .checkout-benefits__inner {
        width: calc(100% - 2rem);
        gap: 0.55rem 1rem;
    }

    .checkout-benefit {
        font-size: 0.69rem;
    }

    .checkout-benefit__icon {
        width: 21px;
        height: 21px;
        flex-basis: 21px;
    }

    .checkout-benefit__icon svg {
        width: 20px;
        height: 20px;
    }

    .account-main {
        padding: 1.25rem 0.75rem 2rem;
    }

    .account-card,
    .account-card--wide {
        max-width: 100%;
        padding: 1.15rem;
    }

    .checkout-footer__inner {
        width: calc(100% - 1.5rem);
        padding: 1.6rem 0 1.8rem;
    }

    .checkout-footer__services h2 {
        margin-bottom: 1.25rem;
        font-size: 1.2rem;
    }

    .checkout-footer__service-grid {
        gap: 1.2rem;
    }

    .checkout-footer__service {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .checkout-footer__service-icon {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    .checkout-footer__service-icon svg {
        width: 39px;
        height: 39px;
    }

    .checkout-footer__links {
        margin-top: 1.5rem;
        padding-top: 1.1rem;
        gap: 0.65rem 1rem;
    }

    .checkout-footer__links a {
        font-size: 0.78rem;
    }

    .checkout-footer__cookies {
        margin-top: 1rem;
    }

    .checkout-footer__cookies a {
        font-size: 0.72rem;
    }
}

/* =========================================================
   Header checkout - typography aligned with cart V2
   2026-09-15
   ========================================================= */
.checkout-header,
.checkout-header__links,
.checkout-header__links a,
.checkout-secure,
.checkout-cart-link,
.checkout-benefit {
    font-family: var(--pm-font-family);
}

.checkout-header__links {
    font-size: var(--pm-font-size-base); /* 1rem / 16px */
    line-height: 1.35;
}

.checkout-benefit {
    font-size: 0.95rem;
    line-height: 1.35;
}

@media (min-width: 768px) {
    .checkout-header__links {
        font-size: var(--pm-font-size-base);
    }
}

@media (max-width: 639.98px) {
    .checkout-header__links {
        font-size: 0.9rem;
    }

    .checkout-benefit {
        font-size: 0.85rem;
    }
}

/* =========================================================
   Account checkout shell typography - unified 2026-09-15
   Same scale as address/payment.
   ========================================================= */
.account-page {
    --pm-account-text: .95rem;
    --pm-account-text-mobile: .90rem;
    --pm-account-meta: .84rem;
    font-size: var(--pm-account-text);
}

.checkout-header__links,
.checkout-header__links a,
.checkout-secure,
.checkout-cart-link,
.checkout-benefit,
.account-copy,
.account-field input,
.account-button {
    font-size: var(--pm-account-text) !important;
    line-height: 1.4;
}

.account-field label,
.account-check,
.account-back-link {
    font-size: .90rem !important;
}

.account-help,
.account-field__label-row a,
.account-password-toggle,
.account-separator span,
.account-alert {
    font-size: var(--pm-account-meta) !important;
}

@media (max-width: 767.98px) {
    .account-page {
        --pm-account-text: var(--pm-account-text-mobile);
        --pm-account-meta: .80rem;
    }

    .checkout-header__links,
    .checkout-header__links a,
    .checkout-cart-link,
    .checkout-benefit,
    .account-copy,
    .account-field input,
    .account-button,
    .account-field label,
    .account-check,
    .account-back-link {
        font-size: var(--pm-account-text-mobile) !important;
    }

    .checkout-benefit {
        white-space: normal;
    }
}
