html {
    position: relative;
    min-height: 100%;
}

.exercise-thumb {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.exercise-photo {
    width: 275px;
    height: 275px;
    object-fit: contain;
}

.muscle-group-card img {
    max-width: 100%;
    height: auto;
}

.chart {
    min-height: 360px;
}

/* Dashboard week: seven equal columns on wide screens, a stacked list on phones. */
.week-grid {
    display: grid;
    gap: .5rem;
    grid-template-columns: 1fr;
}

.week-grid .card {
    min-height: 0;
}

@media (min-width: 768px) {
    .week-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .week-grid .card {
        min-height: 7.5rem;
    }
}

/* My Log: set rows (Set | Previous | Weight | Reps) */
.set-grid {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) 6rem 5rem;
    gap: .5rem;
    padding: .15rem 0;
}

details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

.workout-options-panel {
    min-width: 18rem;
}

/* Calendar month grid */
.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .25rem;
    margin-bottom: .25rem;
}

.calendar-day {
    min-height: 4.5rem;
    padding: .25rem .35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
}

.calendar-day.outside {
    background: var(--bs-tertiary-bg);
    opacity: .6;
}

.calendar-day.today {
    border-color: var(--bs-primary);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.calendar-day .day-number {
    font-weight: 600;
    text-decoration: none;
}

@media (min-width: 768px) {
    .calendar-day {
        min-height: 7rem;
    }
}

.dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    margin-right: .25rem;
    vertical-align: middle;
}

/* Printing reports: just the report, without site chrome. */
@media print {
    header, footer {
        display: none !important;
    }

    main.container {
        max-width: none;
        padding: 0;
    }

    .training-day, .chart {
        break-inside: avoid;
    }
}

/* Autosave feedback (site.js adds/removes these) */
form.saved .form-control,
form.saved .form-select {
    border-color: var(--bs-success);
    transition: border-color .2s;
}

.save-error-toast {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
}

/* htmx adds this class to the element making a request */
.htmx-request {
    opacity: .6;
    transition: opacity 200ms ease-in;
}
