#color-row {
    flex-wrap: nowrap;
}

.color-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#switch-colors-button {
    flex: 0 0 auto;
}

#switch-colors-text {
    display: none;
}

#contrast-ratio {
    font-size: 2.5rem;
}

#results-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
    gap: 1rem;
    margin-block: 1rem;
}

#results-row > * {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;

    text-align: start;
}

.wcag-pass, .wcag-fail {
    display: inline-block;
    padding-inline: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    color: var(--color-status-text);
    font-size: 0.875rem;
}

.wcag-pass {
    background-color: var(--color-success);
}

.wcag-fail {
    background-color: var(--color-danger);
}

.contrast-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: auto;
}

.contrast-preview input {
    outline: 1px solid currentColor;
    color: inherit;
    background-color: transparent;
    border: none;
}

.wcag-large-text {
    font-size: 24px;
}

.wcag-bold-text {
    font-size: 19px;
}

@media (max-width: 500px) {
    #color-row {
        flex-direction: column;
    }

    #color-row > * {
        flex: 0 0 auto;
    }

    #switch-colors-button .icon {
        transform: rotate(90deg);
    }

    #switch-colors-text {
        display: inline;
    }
}
