/* Static content pages (About, Help, Get Involved) in the customer layout: legacy's content in white cards on the white
   page, headings with the teal accent legacy draws in red. The back-office HTML inside a card keeps its own tags. */

.tb-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 48px 56px;
}

.tb-content-card {
    padding: 32px;
    background: #fff;
    border: 1px solid var(--tb-line);
    border-radius: 8px;
    text-align: center;
}

.tb-content-card h1,
.tb-content-card h2 {
    margin-bottom: 16px;
    color: var(--tb-ink);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* The one light teal accent in a page title; section titles carry none. */
.tb-content-card h1 span,
.tb-content-card h2 span {
    border-bottom: 0;
    color: inherit;
    text-decoration: none;
}

.tb-content-card h1 span {
    color: var(--tb-teal-ink);
    font-weight: 300;
}

/* Legacy's base styles capitalise and underline page headings; content cards follow the new look instead. */
/* The design system's portal page title. */
.tb-content-card h1 {
    font-size: 30px;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-transform: uppercase;
}

@media (max-width: 759px) {
    .tb-content-card h1 {
        font-size: 24px;
    }
}

.tb-content-card h3 {
    font-size: 18px;
    font-weight: 600;
}

.tb-content-card p,
.tb-content-text {
    color: var(--tb-ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* Long text stays readable on wide screens. */
.tb-content-card > p,
.tb-content-card > .tb-content-text {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.tb-content-card a:not(.tb-content-button) {
    color: var(--tb-teal-ink);
}

.tb-content-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.tb-content-button {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 22px;
    background: var(--tb-teal-fill);
    border-radius: 8px;
    color: var(--tb-teal-fill-text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tb-content-button:hover {
    color: var(--tb-teal-fill-text);
    transform: var(--tb-lift);
}

.tb-content-button.secondary {
    background: #fff;
    border: 1px solid var(--tb-line-strong);
    color: var(--tb-ink);
}

/* About us: the team. */
.tb-content-step-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--tb-line-soft);
    text-align: left;
}

.tb-content-step-row:last-of-type {
    border-bottom: 0;
}

.tb-content-step-row img {
    max-width: 120px;
    justify-self: center;
}

.tb-contact-block {
    padding: 14px 0;
    border-bottom: 1px solid var(--tb-line-soft);
    color: var(--tb-ink-soft);
    font-size: 14px;
}

.tb-contact-block:last-child {
    border-bottom: 0;
}

.tb-contact-block h3 {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--tb-ink-faint);
    text-transform: uppercase;
}

.tb-contact-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.tb-contact-problem,
.tb-contact-card .validation-errors {
    padding: 10px 14px;
    background: #fdecea;
    border-radius: 8px;
    color: #8a1c13;
    font-size: 13px;
    list-style: none;
}

.tb-contact-sent {
    padding: 10px 14px;
    background: var(--tb-teal-tint);
    border-radius: 8px;
    color: var(--tb-teal-ink);
    font-size: 13px;
}

/* Practitioner details: Login's title and the speciality, the contact details in cards side by side, then the
   qualifications and biography cards. */
.tb-practitioner-heading {
    text-align: center;
}

.tb-practitioner-speciality {
    margin: 8px 0 0;
    color: var(--tb-ink-soft);
    font-weight: 600;
}

.tb-practitioner-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* A card's own border, not the contact block's divider. */
.tb-practitioner-contact .tb-contact-block {
    padding: 20px 16px;
    border: 1px solid var(--tb-line);
}

.tb-practitioner .tb-content-card h2 {
    font-size: 16px;
    text-transform: uppercase;
}

.tb-practitioner-contact address {
    margin: 0;
}

.tb-practitioner-qualifications th {
    font-size: 13px;
    color: var(--tb-ink-faint);
    text-transform: uppercase;
}

.tb-practitioner-biography {
    white-space: pre-line;
}

/* Nutri-Science: the ingredients under their groups, filtered in the page; an ingredient's sections. Each group or
   section is its own box, so the page card drops its border and the title sits on the page, as Login's. */
.tb-content-card.tb-nutri,
.tb-content-card.tb-nutri-detail {
    padding: 0;
    border: 0;
}

.tb-nutri-group,
.tb-nutri-section,
.tb-nutri-more {
    margin-top: 16px;
    padding: 20px 24px;
    border: 1px solid var(--tb-line);
    border-radius: 8px;
}

.tb-nutri-group h2,
.tb-nutri-section h2 {
    font-size: 16px;
    text-transform: uppercase;
}

/* A box ends at its text, without the last paragraph's or list's margin. */
.tb-nutri-section .tb-content-text > :last-child,
.tb-nutri-more .tb-content-text > :last-child,
.tb-practitioner .tb-content-card > :last-child {
    margin-bottom: 0;
}

/* The Back button above the title. */
.tb-nutri-detail > .tb-content-actions:first-child {
    margin: 0 0 24px;
}

/* Back-office lists read as plain lines, without bullets. The marker is a zero-width space, not none: Safari drops a
   list's semantics for VoiceOver when its markers are none, and back-office HTML cannot carry role="list". */
.tb-nutri-section ul,
.tb-nutri-more ul {
    padding-left: 0;
    list-style-type: "\200B";
}

.tb-nutri-search {
    max-width: 100%;
    margin: 12px 0;
}

.tb-nutri .tb-category-filter,
.tb-nutri-detail .tb-category-filter {
    margin: 12px 0 20px;
}

.tb-nutri-group ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tb-nutri [hidden] {
    display: none !important;
}

.tb-nutri-more summary {
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

.tb-nutri-more .tb-content-text {
    margin-top: 10px;
}

@media (max-width: 575.98px) {
    .tb-content {
        padding: 18px 16px 32px;
    }

    .tb-content-card {
        padding: 24px 16px;
    }

    .tb-content-step-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
