/*
 * Plugin styles, deliberately minimal: the site design comes from the sitepackage, and
 * everything here is either layout the plugin needs to work or a neutral default that
 * is easy to override.
 */
.courses-list__items {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.courses-card {
    border: 1px solid #e3e7ea;
    border-radius: 4px;
    padding: 1rem;
    background: #fff;
}

.courses-card__image {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: .75rem;
}

.courses-card__title {
    margin: 0 0 .5rem;
    font-size: 1.125rem;
}

.courses-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .125rem .75rem;
    margin: 0 0 .75rem;
    font-size: .9375rem;
}

.courses-meta dt {
    color: #5a6570;
}

.courses-meta dd {
    margin: 0;
}

.courses-button {
    display: inline-block;
    padding: .5rem 1.25rem;
    border: 0;
    border-radius: 3px;
    background: #005995;
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.courses-button:hover,
.courses-button:focus {
    background: #00456f;
}

.courses-form__row {
    margin-bottom: 1rem;
    max-width: 32rem;
}

.courses-form__row label {
    display: block;
    margin-bottom: .25rem;
}

.courses-form__row--check label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}

.courses-form__row input[type="text"],
.courses-form__row input[type="email"],
.courses-form__row input[type="tel"],
.courses-form__row input[type="date"],
.courses-form__row select,
.courses-form__row textarea {
    width: 100%;
    padding: .5rem;
    border: 1px solid #b7c0c8;
    border-radius: 3px;
    font: inherit;
}

.courses-form__error {
    display: block;
    margin-top: .25rem;
    color: #b3261e;
    font-size: .875rem;
}

/* The honeypot must be unreachable for people but present for a bot: not
   display:none, which some bots skip, but out of the viewport. */
.courses-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.courses-message {
    padding: 1rem;
    border-left: 4px solid #005995;
    background: #f2f4f6;
}

.courses-message--success {
    border-left-color: #1e7b34;
}

.courses-message--warning {
    border-left-color: #c07500;
}

.courses-pagination__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    list-style: none;
}

.courses-pagination__info,
.courses-loadmore__info {
    color: #5a6570;
    font-size: .875rem;
}

.courses-pagination__current {
    font-weight: bold;
}

.courses-category {
    margin-bottom: 1.5rem;
}

.courses-category__image,
.courses-detail__image {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: .75rem;
}

.courses-category__title {
    margin: 0 0 .25rem;
}

.courses-category__description {
    margin: 0;
    color: #5a6570;
}

.courses-detail__gallery {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    margin-bottom: 1rem;
}

/* The flash message announces marked fields, so the marking has to be visible: a red
   label, a red border and the message below the input. */
.courses-form__row--error label {
    color: #b3261e;
    font-weight: bold;
}

.courses-form__row--error input,
.courses-form__row--error select,
.courses-form__row--error textarea {
    border-color: #b3261e;
    border-width: 2px;
}

/* Plus-minus for the participant count: the number field stays a number field, the
   buttons sit beside it. */
.courses-stepper {
    display: inline-flex;
    align-items: stretch;
    gap: .25rem;
}

.courses-stepper__button {
    width: 2.5rem;
    border: 1px solid #b7c0c8;
    border-radius: 3px;
    background: #f2f4f6;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.courses-stepper__button:hover,
.courses-stepper__button:focus {
    background: #e3e7ea;
}

.courses-form__row .courses-stepper__value {
    width: 4.5rem;
    text-align: center;
}
