/*
    header & footer (Figma: Property Axis Website / UI Design Flow, node 532-10613)
    scoped under .pa-header / .pa-footer, loaded in the body after the template css so the resets win
*/

:root {
    --pa-brand-50: #ebeffd;
    --pa-brand-500: #3360ea;
    --pa-brand-600: #2e57d5;
    --pa-brand-900: #152862;
    --pa-gray-50: #f0f1f4;
    --pa-gray-100: #d1d4db;
    --pa-gray-500: #69758c;
    --pa-red-500: #ef4444;
}

.pa-header,
.pa-footer {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    line-height: normal;
}

.pa-header *,
.pa-footer * {
    box-sizing: border-box;
}

/* :where keeps these at element specificity so the classes below can still set their own values */
:where(.pa-header, .pa-footer) p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

:where(.pa-header, .pa-footer) ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pa-header a,
.pa-header a:hover,
.pa-header a:focus,
.pa-footer a,
.pa-footer a:hover,
.pa-footer a:focus {
    text-decoration: none;
}

.pa-header img,
.pa-footer img {
    max-width: none;
}

.pa-header button,
.pa-footer button {
    font-family: inherit;
}

/* ---------------- header ---------------- */

.pa-header {
    position: relative;
    z-index: 1000;
    background: #fff;
}

.pa-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 32px 16px;
    background: #fff;
}

.pa-header__logo {
    display: flex;
    align-items: center;
    align-self: stretch;
}

.pa-header__logo img {
    display: block;
    width: auto;
    height: 50px;
    aspect-ratio: 2569 / 543;
}

.pa-header__nav {
    display: flex;
    align-items: center;
    height: 48px;
}

.pa-header__nav-link,
.pa-header__nav-link:hover,
.pa-header__nav-link:focus {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 400;
    color: var(--pa-gray-500);
    white-space: nowrap;
}

.pa-header__nav-link:hover {
    color: var(--pa-brand-500);
}

.pa-header__nav-link.is-active {
    font-weight: 700;
    color: var(--pa-brand-500);
}

.pa-header__nav-line {
    position: absolute;
    left: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: 5px;
}

.pa-header__actions {
    position: relative;
    flex-shrink: 0;
    width: 236.56px;
}

.pa-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* figma strokes sit inside, so the 1px border comes out of the 16px padding */
    padding: 15px 23px;
    background: #fff;
    border: 1px solid var(--pa-brand-500);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    /* Inter's normal line height at 15px, "normal" rounds differently on pages with extra stylesheets */
    line-height: 18px;
    color: var(--pa-brand-500);
    white-space: nowrap;
    cursor: pointer;
}

.pa-btn-secondary:hover {
    background: var(--pa-brand-50);
}

.pa-text-btn,
.pa-text-btn:hover,
.pa-text-btn:focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
    color: var(--pa-brand-500);
    text-align: left;
    cursor: pointer;
}

.pa-text-btn:hover,
.pa-text-btn:focus-visible {
    background: var(--pa-brand-50);
    outline: none;
}

/* rows with the red unread dot start 4px further left, as in the design */
.pa-text-btn--dot {
    padding-left: 20px;
}

.pa-text-btn__label {
    flex: 1 0 0;
    min-width: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pa-text-btn__icon {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.pa-text-btn__dot {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* the unread dots switch on and off without a reload */
.pa-text-btn__dot[hidden] {
    display: none;
}

.pa-text-btn__soon {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--pa-gray-500);
}

.pa-text-btn--danger,
.pa-text-btn--danger:hover,
.pa-text-btn--danger:focus {
    justify-content: center;
    color: var(--pa-red-500);
}

.pa-text-btn--danger:hover {
    background: #fef2f2;
}

.pa-account-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 236.56px;
    padding: 4px;
    background: #fff;
    border-radius: 12px;
    filter: drop-shadow(1px 1px 2.5px rgba(0, 0, 0, 0.25));
}

.pa-account-menu__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pa-account-menu form {
    margin: 0;
}

.pa-header__toggler {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--pa-gray-100);
    border-radius: 12px;
    font-size: 18px;
    color: var(--pa-brand-500);
    cursor: pointer;
}

.pa-header__mobile {
    display: none;
}

/* ---------------- footer ---------------- */

.pa-footer {
    background: var(--pa-brand-900);
    color: var(--pa-brand-50);
    letter-spacing: 0.3px;
}

.pa-footer__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 200px;
    overflow: hidden;
    transition: padding 0.35s ease;
}

/* default: phones cropped to a 172px strip, text centred beside them */
.pa-footer__app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    height: 172px;
    overflow: hidden;
    transition: height 0.35s ease;
}

.pa-footer__phones {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    height: 172px;
    transition: height 0.35s ease;
}

.pa-footer__phones img {
    display: block;
    flex-shrink: 0;
    width: 264px;
    object-fit: cover;
}

.pa-footer__phone-1 {
    height: 285px;
}

.pa-footer__phone-2 {
    height: 400px;
}

.pa-footer__app-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    height: 100%;
}

/* hover (Figma Variant2): both phones shown in full, sitting on the divider */
.pa-footer__main--app:hover {
    padding-top: 20px;
    padding-bottom: 20px;
}

.pa-footer__main--app:hover .pa-footer__app {
    height: 400px;
}

.pa-footer__main--app:hover .pa-footer__phones {
    align-items: flex-end;
    height: 400px;
}

.pa-footer__app-title {
    width: 281px;
    font-size: 18px;
    font-weight: 700;
    line-height: 30px;
    color: #fff;
}

.pa-footer__stores {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pa-store-btn,
.pa-store-btn:hover,
.pa-store-btn:focus {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 8px;
    letter-spacing: normal;
    color: #000;
    white-space: nowrap;
}

.pa-store-btn:hover {
    background: var(--pa-brand-50);
}

.pa-store-btn img {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.pa-store-btn__small {
    display: block;
    font-size: 10px;
}

.pa-store-btn__big {
    display: block;
    font-size: 14px;
}

/* ad carousel (Figma Variant3 / Frame 1025): 931x140 banner and a 32px row of dots */
.pa-footer__ads {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 931px;
    max-width: 100%;
}

.pa-footer__ad-frame {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
}

.pa-footer__ad {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pa-footer__ad.is-active {
    opacity: 1;
}

.pa-footer__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
}

.pa-footer__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: var(--pa-gray-50);
    border: 0;
    border-radius: 50%;
    opacity: 0.3;
    cursor: pointer;
}

.pa-footer__dot.is-active {
    opacity: 1;
}

.pa-footer__info {
    display: flex;
    align-items: flex-start;
    gap: 120px;
    width: 100%;
    padding-top: 20px;
    border-top: 5px solid var(--pa-brand-50);
}

.pa-footer__about {
    display: flex;
    flex: 1 0 0;
    flex-direction: column;
    gap: 20px;
    min-width: 1px;
}

.pa-footer__logo {
    display: flex;
    align-items: center;
}

.pa-footer__logo-mark,
.pa-footer__logo-wordmark {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.pa-footer__logo-mark {
    width: 42px;
    height: 38.348px;
}

.pa-footer__logo-wordmark {
    width: 168px;
    height: 38.08px;
}

.pa-footer__logo-mark img,
.pa-footer__logo-wordmark img {
    position: absolute;
    top: 0;
    height: 100%;
}

.pa-footer__logo-mark img {
    left: -1.76%;
    width: 503.52%;
}

.pa-footer__logo-wordmark img {
    left: -25%;
    width: 125%;
}

.pa-footer__about-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

/* explicit colour: some pages set a bare p { color: black } that would beat inheritance */
.pa-footer__about-text p {
    color: var(--pa-brand-50);
}

.pa-footer__links {
    display: flex;
    align-items: flex-start;
    gap: 100px;
}

.pa-footer__col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 180px;
}

.pa-footer__col-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 30px;
    color: var(--pa-brand-50);
}

.pa-footer__col-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.pa-footer__col-links a,
.pa-footer__col-links a:focus {
    font-size: 14px;
    color: var(--pa-brand-50);
    white-space: nowrap;
}

.pa-footer__col-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.pa-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 254px;
}

.pa-footer__copyright {
    font-size: 12px;
    color: var(--pa-brand-50);
    opacity: 0.8;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .pa-footer__main,
    .pa-footer__app,
    .pa-footer__phones,
    .pa-footer__ad {
        transition: none;
    }
}

/* ---------------- smaller screens (design is desktop only) ---------------- */

@media (max-width: 1599px) {
    .pa-footer__main {
        padding: 40px 80px;
    }

    .pa-footer__info,
    .pa-footer__links {
        gap: 60px;
    }

    .pa-footer__bottom {
        padding: 22px 80px;
    }
}

@media (max-width: 1199px) {
    .pa-footer__info {
        flex-direction: column;
        gap: 32px;
    }

    .pa-footer__links {
        flex-wrap: wrap;
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .pa-header__bar {
        padding: 16px;
    }

    .pa-header__logo img {
        height: 36px;
    }

    .pa-header__nav,
    .pa-header__actions {
        display: none;
    }

    .pa-header__toggler {
        display: flex;
    }

    .pa-header__mobile {
        display: block;
        padding: 0 16px 16px;
        border-bottom: 1px solid var(--pa-gray-100);
    }

    .pa-header__mobile .pa-header__nav-link {
        justify-content: flex-start;
    }

    .pa-header__mobile .pa-header__nav-line {
        top: 12px;
        width: 4px;
        height: 24px;
        background: var(--pa-brand-500);
        border-radius: 4px;
    }

    .pa-header__mobile .pa-account-menu__list {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--pa-gray-100);
    }

    .pa-header__mobile .pa-btn-secondary {
        margin-top: 12px;
    }

    .pa-footer__main,
    .pa-footer__main--app:hover {
        padding: 32px 16px;
    }

    .pa-footer__app,
    .pa-footer__main--app:hover .pa-footer__app {
        flex-direction: column-reverse;
        gap: 24px;
        height: auto;
    }

    .pa-footer__app-cta {
        align-items: center;
        text-align: center;
    }

    .pa-footer__phones,
    .pa-footer__main--app:hover .pa-footer__phones {
        align-items: flex-start;
        height: 110px;
    }

    .pa-footer__phones img {
        width: 160px;
    }

    .pa-footer__phone-1 {
        height: 173px;
    }

    .pa-footer__phone-2 {
        height: 242px;
    }

    .pa-footer__ad-frame {
        height: auto;
        aspect-ratio: 931 / 140;
    }

    .pa-footer__bottom {
        padding: 16px;
    }

    .pa-footer__copyright {
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .pa-footer__app-title {
        width: auto;
    }

    .pa-footer__links {
        flex-direction: column;
        gap: 24px;
    }
}

/* ---------- sign in modal (Figma: "sign in modal", node 532-13409) ---------- */

.pa-signin .modal-dialog {
    max-width: 582px;
}

.pa-signin .modal-content {
    overflow: hidden;
    background: #fff;
    /* Figma's stroke sits inside the 582px, so it is drawn as an inset shadow */
    border: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px var(--pa-gray-100), 0 16px 36px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
}

.pa-signin__logo {
    display: flex;
    justify-content: center;
    padding: 24px 16px 16px;
}

.pa-signin__logo img {
    display: block;
    width: 284px;
    max-width: 100%;
    height: auto;
}

/* Figma: 40px sides, 20px + 20px below, 40px between the rows */
.pa-signin__body {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 40px 40px;
}

.pa-signin__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #0b0d13;
    text-align: center;
}

.pa-signin__providers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* Figma: 8px / 16px padding inside the 1px stroke, 67px tall */
.pa-signin__provider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--pa-brand-500);
    border-radius: 8px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    color: #000;
    white-space: nowrap;
    cursor: pointer;
}

.pa-signin__provider:hover {
    background: var(--pa-brand-50);
}

.pa-signin__provider:focus-visible {
    outline: 2px solid var(--pa-brand-500);
    outline-offset: 2px;
}

.pa-signin__provider img {
    display: block;
}

.pa-signin__foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pa-signin__agent,
.pa-signin__terms {
    margin: 0;
    line-height: normal;
    color: var(--pa-gray-500);
    text-align: center;
}

.pa-signin__agent {
    font-size: 14px;
}

.pa-signin__agent a,
.pa-signin__agent a:hover {
    margin: 0 4px;
    font-weight: 700;
    color: #e14938;
}

.pa-signin__terms {
    font-size: 12px;
}

.pa-signin__terms a {
    color: var(--pa-brand-500);
}

@media (max-width: 575px) {
    .pa-signin .modal-dialog {
        margin: 16px;
    }

    .pa-signin__body {
        gap: 28px;
        padding: 0 20px 28px;
    }

    .pa-signin__title {
        font-size: 24px;
    }

    .pa-signin__provider {
        flex: 1 1 100%;
        flex-direction: row;
        justify-content: center;
    }
}
