﻿/*
 * cnx.css - ConXus text roles (design system, step 1)
 *
 * Load LAST, after pages.css, so these win over older rules of equal specificity.
 *
 * Use one role class per piece of text. When you add a cnx- class to an element,
 * remove its conxus-font size class (xsmall, small, small-medium, medium, large, ...)
 * and "bold" - otherwise the old two-class rule (.conxus-font.small) is more specific
 * and still wins. Plain "conxus-font" can stay.
 *
 * Sizes, weights and colours come from colors.css. Change them there or here,
 * never per page.
 */

/* ==================================================================
   TEXT ROLES
   ================================================================== */

.cnx-page-title,
.cnx-panel-title,
.cnx-section-title,
.cnx-item-title,
.cnx-body,
.cnx-description,
.cnx-meta,
.cnx-label,
.cnx-hint {
    font-family: var(--global-font-family);
    letter-spacing: normal;
    margin: 0;
}

/* "Hello Chip!", "Lists - 81", "Contacts - 1378" */
.cnx-page-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--label);
}

/* Right-panel and popup headings: "Jigsaw puzzles", "User Profile for ...", "My Collections" */
.cnx-panel-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--label);
}

/* Headings inside a panel: "List items - 4", "My Tags", "Community Details" */
.cnx-section-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--label);
}

/* Name of a row or card: list names, contact names, item titles, feed titles */
.cnx-item-title {
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--greyscale-grey-01);
}

/* Normal reading text: recipe steps, feed text, details */
.cnx-body {
    font-size: var(--text-md);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--greyscale-grey-01);
}

/* Short descriptions under a row or card title */
.cnx-description {
    font-size: var(--text-sm);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--greyscale-grey-02);
}

/* Secondary details: "(4 items)", "Shared", dates, "by You", counts */
.cnx-meta {
    font-size: var(--text-xs);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--greyscale-grey-02);
}

/* Form field labels */
.cnx-label {
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--greyscale-grey-01);
}

/* Help text and empty states: "Click on a List name on the left to view its items" */
.cnx-hint {
    font-size: var(--text-sm);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--greyscale-grey-03);
}

/* Text actions: "Show more", "x Reset all". Size comes from the surrounding text. */
.cnx-link {
    color: var(--link);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    text-decoration: none;
}

    .cnx-link:hover {
        text-decoration: underline;
    }

/* ==================================================================
   FORM CONTROLS
   ================================================================== */

/* Text boxes, textareas and dropdowns: typed text and placeholder share one size.
   Remove conxus-font + size classes from the element when adding this. */
.cnx-input {
    font-family: var(--global-font-family);
    font-size: var(--text-md);
    font-weight: var(--weight-regular);
    letter-spacing: normal;
    color: var(--greyscale-grey-01);
}

    .cnx-input::placeholder {
        font-size: inherit;
        color: var(--greyscale-grey-03);
        opacity: 1;
    }

/* Phones: step the headings down one level */
@media (max-width: 480px) {
    .cnx-page-title {
        font-size: var(--text-xl);
    }

    .cnx-panel-title {
        font-size: var(--text-lg);
    }

    .cnx-section-title {
        font-size: var(--text-md);
    }
}
