/* TYPE TESTER (style page, "Test it" tab)
   Layers over main.css, controls.css and range.css.
   The panel follows the license panel (.licenses): green 10% ground, white
   selects, 10px bottom corners. It hangs from the 20px bar under the tabs,
   which stands in for the panel's own black top border. */


.styleControls {
    grid-column: span 3;
    align-self: start;
    position: sticky;
    top: 0;
    z-index: 50;
    margin-top: -20px;
    background-color: rgba(21, 71, 52, 0.1);
    padding: 20px;
    border-radius: 0 0 10px 10px;
}

.styleGroup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 12px;
    align-items: center;
}

.styleGroup + .styleGroup {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(21, 71, 52, 0.35);
}

.styleGroup .name {
    grid-column: span 2;
    font-size: 0.875em;
    color: #154734;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* sliders: icon, then range.css track; the live value replaces the icon while dragging */

.styleSlider {
    position: relative;
    min-width: 0;
}

.styleSlider > i {
    flex: 0 0 16px;
    text-align: center;
}

.styleSlider input[type=range] {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* range.css draws a paper track for dark grounds; on the tint it takes the panel's divider green */
.styleSlider input[type=range]::-webkit-slider-runnable-track,
.styleSlider input[type=range]:focus::-webkit-slider-runnable-track {
    background: rgba(21, 71, 52, 0.35);
}

.styleSlider input[type=range]::-moz-range-track {
    background: rgba(21, 71, 52, 0.35);
}

.styleVal {
    position: absolute;
    left: 8px;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: #154734;
    text-wrap: nowrap;
    display: none;
}

/* case, alignment, reset */

.styleActions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* a group without a line-height slider keeps its actions in the right half: they follow the
   tracking slider straight away (counting children would break once axis rows are added) */
.styleGroup > .styleSlider[class*="Tracking"] + .styleActions {
    grid-column: 2;
}

/* variable styles: an instance menu under the family and style menus, then one full-width
   row per axis with its name, the track and its value, always in view */

.styleGroup .styleInstance {
    grid-column: span 2;
}

.axisRow {
    grid-column: span 2;
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.axisRow .axisName {
    flex: 0 0 4.5em;
    font-size: 0.8em;
    color: #154734;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* as the other sliders: only the track shows, on the panel's own colour */
.axisRow input[type=range] {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.axisRow input[type=range]::-webkit-slider-runnable-track,
.axisRow input[type=range]:focus::-webkit-slider-runnable-track {
    background: rgba(21, 71, 52, 0.35);
}

.axisRow input[type=range]::-moz-range-track {
    background: rgba(21, 71, 52, 0.35);
}

.axisRow .axisVal {
    flex: 0 0 2.5em;
    font-size: 0.8em;
    color: #154734;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.styleToggles {
    display: flex;
    gap: 12px;
    align-items: center;
}

.styleToggles p, .styleToggles i, .styleReset i {
    cursor: pointer;
    transition: 200ms;
}

/* inactive options step back to 50%, as the row prices do; the active one is green */
.styleToggles p, .styleToggles i {
    opacity: 0.5;
}

.styleToggles .activeBtn {
    color: #154734;
    opacity: 1;
}

.styleToggles p.activeBtn {
    font-weight: 700;
}

.styleToggles .bodyColumns {
    margin-left: 12px;
}

.styleReset i:hover {
    color: #154734;
}

/* the sample: a white card, as a font card */

.styleContent {
    grid-column: span 7;
    background-color: #FFF;
    padding: 20px;
    transition: 200ms;
    min-width: 0;
}

.styleContent.inverted {
    background-color: #111;
    color: #FFF;
}

.contentProps {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.contentColor {
    position: relative;
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: 200ms;
}

.contentColor i {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.125em;
}

.contentColor i:last-child {
    top: 8px;
    left: 8px;
}

.contentColor:hover {
    color: #154734;
}

.inverted .contentColor:hover {
    color: #bed600;
}

.contentLanguage select {
    font-family: "Inerta", sans-serif;
    font-size: 1rem;
    font-weight: normal;
    padding: 4px;
    border: 0;
    background-color: #F4F6F2;
    border-radius: 5px;
    cursor: pointer;
}

.demoTitle {
    font-size: 48px;
    margin-bottom: 20px;
    overflow-wrap: break-word;
}

.demoSubtitle {
    font-size: 24px;
    line-height: 1.2;
}

.demoBody {
    font-size: 16px;
    line-height: 1.2;
    text-align: left;
    margin-top: 20px;
}

.demoBody p + p {
    text-indent: 1.8em;
}

.twoColumns {
    column-count: 2;
    column-gap: 40px;
    column-rule: 1px solid;
}

@media only screen and (max-width: 1410px) {
    .styleContent {
        grid-column: span 5;
    }
}

/* 6 columns: the panel lies across the top, one group per column */
@media only screen and (max-width: 1150px) {
    .styleControls {
        grid-column: span 6;
        position: static;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 40px;
    }
    .styleGroup {
        column-gap: 12px;
        align-content: start;
    }
    /* the rule between groups turns vertical and stands in the middle of the 40px gap */
    .styleGroup + .styleGroup {
        position: relative;
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }
    .styleToggles .bodyColumns {
        margin-left: 0;
    }
    .styleGroup + .styleGroup::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: -20px;
        border-left: 1px solid rgba(21, 71, 52, 0.35);
    }
    .styleContent {
        grid-column: span 6;
    }
}

@media only screen and (max-width: 880px) {
    .styleControls {
        grid-column: span 5;
        display: block;
    }
    .styleGroup {
        column-gap: 20px;
    }
    .styleGroup + .styleGroup {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(21, 71, 52, 0.35);
    }
    .styleGroup + .styleGroup::before {
        content: none;
    }
    .styleToggles .bodyColumns {
        margin-left: 12px;
    }
    .styleContent {
        grid-column: span 5;
    }
}

@media only screen and (max-width: 760px) {
    .styleControls {
        grid-column: span 4;
    }
    .styleContent {
        grid-column: span 4;
    }
    .twoColumns {
        column-count: 1;
    }
    .styleToggles .bodyColumns {
        display: none;
    }
    .demoTitle {
        font-size: 40px;
    }
}
