/* Web frontend (templates/frontend_base.html.twig), on top of Bootstrap 5. Mobile first: subjects mostly use a phone. */

.frontend {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.frontend main {
    flex: 1;
    width: 100%;
    max-width: 36rem;
}

/* Symptom groups: the color comes from the study setup (Color). */
.group-card {
    --group-color: #3d6fb4;
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 3.5rem;
    padding: .75rem 1rem;
    text-align: left;
    text-decoration: none;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-left: .4rem solid var(--group-color);
    border-radius: var(--bs-border-radius);
}

.group-card:hover,
.group-card:focus-visible {
    background: var(--bs-tertiary-bg);
}

.group-card .group-title {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.group-green { --group-color: #2e9e5b; }
.group-orange { --group-color: #e08a1e; }
.group-red { --group-color: #cf3a3a; }
.group-turquoise { --group-color: #2a9bb5; }
.group-grey { --group-color: #8a8f96; }

/* Due: stands out. */
.group-card.group-todo {
    font-weight: 600;
    background: color-mix(in srgb, var(--group-color) 10%, var(--bs-body-bg));
    border-color: var(--group-color);
}

/* Done or outside its time window: grey, but it can still be opened (as before). */
.group-card.group-muted {
    --group-color: #c4c8cd;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
}

/* Questions */
.question legend {
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* A larger thumb: the scale is used with a finger. */
.question .form-range {
    height: 2.5rem;
}

.question .form-range::-webkit-slider-thumb {
    width: 1.75rem;
    height: 1.75rem;
    margin-top: -.6rem;
}

.question .form-range::-moz-range-thumb {
    width: 1.75rem;
    height: 1.75rem;
}

.question .number-field {
    max-width: 8rem;
}

/* Choices: the whole row can be tapped. */
.question .choice {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 3rem;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.question .choice img {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}
