/*
 * Account-area refresh over the bikmo-v3 skin.
 * layouts/authentication.html.twig is mirrored in node/apps/basecamp/templates/.
 */

:root {
    --refresh-radius: 999px;
    --refresh-radius-card: 12px;
    --refresh-accent: #3cf1c6;
    --refresh-pink: #e0006f;
    --refresh-pink-dark: #b8005b;
    --refresh-ink: #1a1a1a;
    --refresh-muted: #6b6b6b;
    --refresh-line: #e4e4e7;
    --refresh-surface: #f7f7f8;
    --refresh-ok-bg: #e3f6ee;
    --refresh-ok-ink: #0f7a4f;
}

/* The skin's word-break: break-all split card titles mid-word. */
.card .title {
    word-break: normal;
    overflow-wrap: break-word;
}

/* Headings: DIN Bold in sentence case instead of Tungsten Condensed. */
.title--scream,
.title--shout,
.module .module__title {
    font-family: "DIN Bold", DIN, sans-serif;
    font-weight: normal;
    letter-spacing: normal;
    text-transform: none;
}

.title--scream {
    font-size: 2.5rem;
    line-height: 1.15;
}

.title--shout,
.module .module__title {
    font-size: 2rem;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .title--scream {
        font-size: 2rem;
    }

    .title--shout,
    .module .module__title {
        font-size: 1.75rem;
    }
}

/* Header and page menu: white, divided by hairlines. */
.navbar {
    border-bottom: 1px solid var(--refresh-line);
}

.page-menu.card--tile {
    background-color: #fff;
    border-bottom: 1px solid var(--refresh-line);
    padding-top: 0;
    padding-bottom: 0;
}

.page-menu__item a,
.page-menu__item input[type="submit"] {
    display: inline-block;
    padding: 16px 0 14px;
    border-bottom: 2px solid transparent;
    color: #4a4a4a;
    font-size: 0.9375rem;
    text-decoration: none;
}

.page-menu__item a:hover,
.page-menu__item a:focus {
    color: var(--refresh-ink);
}

.page--dashboard .page-menu__item a[href="/dashboard"],
.page--settings .page-menu__item a[href="/settings"],
.page--review .page-menu__item a[href="/product/review"],
.page--refer .page-menu__item a[href="/refer-a-friend"] {
    color: var(--refresh-ink);
    font-family: "DIN Bold", DIN, sans-serif;
    border-bottom-color: var(--refresh-pink);
}

/* Logout is a form button; style it like the menu links beside it. */
.page-menu__item input[type="submit"] {
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    margin: 0;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
}

.page-menu__item input[type="submit"]:hover,
.page-menu__item input[type="submit"]:focus {
    color: var(--refresh-ink);
}

/* Buttons: pills; the first action in a card is the primary one. */
.button {
    border-radius: var(--refresh-radius);
    text-transform: none;
    letter-spacing: 0.01em;
}

.card .button--highlight {
    min-height: 40px;
    padding: 9px 20px;
    border: 1.5px solid var(--refresh-pink);
    background-color: #fff;
    color: var(--refresh-pink);
    font-family: "DIN Bold", DIN, sans-serif;
    font-size: 0.9375rem;
}

.card .button--highlight:hover,
.card .button--highlight:focus {
    background-color: #fff0f6;
    color: var(--refresh-pink-dark);
    border-color: var(--refresh-pink-dark);
}

.card__actions .button--highlight:first-child,
.policy-actions .button--highlight {
    background-color: var(--refresh-pink);
    color: #fff;
}

.card__actions .button--highlight:first-child:hover,
.card__actions .button--highlight:first-child:focus,
.policy-actions .button--highlight:hover,
.policy-actions .button--highlight:focus {
    background-color: var(--refresh-pink-dark);
    color: #fff;
}

.card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Cards: white, hairline border, no coloured base. Page-menu bars (.card--tile, .card--elevation-flat) stay square. */
.card:not(.card--tile):not(.card--elevation-flat) {
    border-radius: var(--refresh-radius-card);
    overflow: hidden;
}

.card--elevation-mid,
.card--elevation-high {
    background-color: #fff;
    border: 1px solid var(--refresh-line);
    box-shadow: none;
}

.card--elevation-mid {
    padding: 8px;
}

.card--elevation-mid > .card__action-area--clickable {
    border-bottom: 0;
}

/* A live policy carries an accent stripe; an expired one sits on grey. */
.page--dashboard .card--elevation-mid:has(.card__status--ok) {
    border-left: 4px solid var(--refresh-accent);
}

.page--dashboard .card--elevation-mid:not(:has(.card__status--ok)) {
    background-color: var(--refresh-surface);
}

.card .title--talk {
    font-family: "DIN Bold", DIN, sans-serif;
    font-size: 1.375rem;
    line-height: 1.25;
}

/* Status: a small tinted label. */
.card__status {
    margin: 12px 12px 0 0;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #ececee;
    color: #4a4a4a;
    font-family: "DIN Bold", DIN, sans-serif;
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card__status--ok {
    background-color: var(--refresh-ok-bg);
    color: var(--refresh-ok-ink);
}

/* Policy facts on a card: label over value, in columns. */
.card--elevation-mid .list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px 24px;
    padding-top: 14px;
    border-top: 1px solid var(--refresh-line);
}

.card--elevation-mid .list > .list__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.card--elevation-mid .list__key {
    color: var(--refresh-muted);
    font-family: DIN, sans-serif;
    font-size: 0.8125rem;
}

.card--elevation-mid .list__value {
    color: var(--refresh-ink);
    font-family: "DIN Bold", DIN, sans-serif;
    font-size: 1rem;
}

/* Section headings */
.subtitle--shout {
    margin-top: 2rem;
    font-family: "DIN Bold", DIN, sans-serif;
    font-size: 1.5rem;
    letter-spacing: normal;
    text-transform: none;
}

/* Empty states */
.subtitle--shout + p {
    color: var(--refresh-muted);
    margin-bottom: 2rem;
}

/* Dashboard greeting: on white, with a smaller avatar. */
.page--dashboard .card--elevation-flat {
    background-color: #fff;
}

.page--dashboard .card--elevation-flat .card__action-area--container {
    min-height: 0 !important;
}

.page--dashboard .card--elevation-flat .layout--constrained {
    margin-top: 24px !important;
}

.page--dashboard .profile {
    display: flex;
    align-items: center;
    gap: 18px;
}

.page--dashboard .profile__picture {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}

.page--dashboard .profile__picture span {
    font-size: 1.375rem;
}

.page--dashboard .profile .title--scream {
    margin: 0;
    font-size: 2rem;
}

/* Policy page header: grey band, status beside the title, compact facts. */
.page--policy .card--elevation-flat {
    background-color: var(--refresh-surface);
    border-bottom: 1px solid var(--refresh-line);
}

/* The skin sets display and cell widths on .layout with higher specificity. */
.page--policy .policy-hero {
    display: flex !important;
    flex-flow: row wrap;
    align-items: center;
    gap: 12px 16px;
    padding-bottom: 24px;
}

.page--policy .policy-hero > * {
    margin: 0;
}

.page--policy .policy-hero > .layout__cell:nth-child(2) {
    order: 1;
    width: auto !important;
    flex: 0 1 auto;
}

.page--policy .policy-hero > .card__status {
    order: 2;
    float: none;
}

.page--policy .policy-hero > .layout__cell:nth-child(3) {
    order: 3;
    flex: 1 0 100%;
}

.policy-hero .list {
    max-width: 480px;
}

.policy-hero .list__item {
    padding: 3px 0;
}

.policy-hero .key-value {
    display: grid;
    grid-template-columns: 140px 1fr;
    justify-content: start;
    width: 100%;
    font-size: 0.875rem;
}

.policy-hero .key-value__key {
    color: var(--refresh-muted);
}

.page--policy .policy-hero .key-value__value {
    color: var(--refresh-ink);
    text-align: left;
    justify-self: start;
}

/* Settings dial-code select */
.input--smallwidth {
    min-width: 9rem;
    white-space: nowrap;
}

/* Policy actions: a grid, since the skin's floated cells left holes. */
.policy-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    padding-top: 16px;
}

.policy-actions > .layout__cell {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
}

.policy-actions > .layout__cell > .layout--breath {
    height: 100%;
    padding: 0;
}

.policy-actions .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
}

.policy-actions .card > .card__action-area--clickable {
    color: var(--refresh-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.policy-actions .card .title--talk {
    margin-bottom: 4px;
    color: var(--refresh-ink);
    font-size: 1.25rem;
}

.policy-actions .card > .card__action-area--container {
    margin-top: auto;
    padding-top: 16px;
}

/* The template renders an empty card__content. */
.policy-actions .card > .card__content {
    padding: 0;
}

/* Policy documents: one list of rows. */
.policy-documents {
    padding-top: 16px;
}

.policy-documents > .layout--breath {
    padding: 0;
    text-align: left;
}

.policy-documents .text-link {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--refresh-line);
    color: var(--refresh-ink);
    font-family: "DIN Bold", DIN, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.policy-documents > .layout--breath:first-child .text-link {
    border-top: 1px solid var(--refresh-line);
}

.policy-documents .text-link:hover,
.policy-documents .text-link:focus {
    color: var(--refresh-pink);
}

.policy-documents .text-link img {
    width: 1.5rem !important;
    height: 1.5rem !important;
    flex: 0 0 auto;
    opacity: 0.6;
}

@media (min-width: 1024px) {
    .policy-documents {
        border-left: 1px solid var(--refresh-line);
        padding-left: 32px;
    }
}

@media (max-width: 767px) {
    .policy-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .policy-documents {
        margin-top: 24px;
    }
}
