/*
 * SCRUM-1029 / SCRUM-1311: the homepage seasonal block (MAFoodiesSeasonalShowcaseView):
 * a banner for the day's first theme on a vichy (gingham) tablecloth in its palette, and
 * 'En ce moment' chips for the others. Bootstrap 3 has no utility for any of it.
 *
 * Only features the site's stylesheet already relies on: no color-mix(), so each palette
 * spells its colours out. The check colour is translucent, so where the two bands cross
 * it doubles into the darker gingham square.
 */
.lf-seasonal {
    margin-top: 15px;
}

/* Palettes (MAFoodiesSeasonalPalette): check, cloth, copy card, ink, kicker. */
.lf-seasonal-palette-rouge {
    --lf-check: rgba(200, 32, 43, 0.34);
    --lf-cloth: #ffffff;
    --lf-card: rgba(255, 255, 255, 0.92);
    --lf-ink: #3a0b0e;
    --lf-kicker: #651117;
}

.lf-seasonal-palette-amber {
    --lf-check: rgba(233, 169, 58, 0.34);
    --lf-cloth: #fffaf0;
    --lf-card: rgba(255, 250, 240, 0.92);
    --lf-ink: #3b2608;
    --lf-kicker: #6f4d17;
}

.lf-seasonal-palette-fir {
    --lf-check: rgba(47, 107, 79, 0.34);
    --lf-cloth: #f4faf6;
    --lf-card: rgba(244, 250, 246, 0.92);
    --lf-ink: #0f2a1d;
    --lf-kicker: #193d2c;
}

.lf-seasonal-palette-burgundy {
    --lf-check: rgba(125, 31, 53, 0.34);
    --lf-cloth: #fdf6f7;
    --lf-card: rgba(253, 246, 247, 0.92);
    --lf-ink: #2e0a13;
    --lf-kicker: #46101d;
}

.lf-seasonal-palette-sea {
    --lf-check: rgba(43, 108, 143, 0.34);
    --lf-cloth: #f3f8fb;
    --lf-card: rgba(243, 248, 251, 0.92);
    --lf-ink: #0c2433;
    --lf-kicker: #153a4f;
}

.lf-seasonal-palette-gold {
    --lf-check: rgba(201, 162, 39, 0.34);
    --lf-cloth: #fffbea;
    --lf-card: rgba(255, 251, 234, 0.92);
    --lf-ink: #33280a;
    --lf-kicker: #604d13;
}

/* The banner: the whole tablecloth is one link to the theme's hub. */
.lf-seasonal-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 280px;
    padding: 28px 28px 28px 32px;
    border-radius: 6px;
    overflow: hidden;
    color: var(--lf-ink);
    background-color: var(--lf-cloth);
    background-image:
        repeating-linear-gradient(0deg, var(--lf-check) 0, var(--lf-check) 18px, transparent 18px, transparent 36px),
        repeating-linear-gradient(90deg, var(--lf-check) 0, var(--lf-check) 18px, transparent 18px, transparent 36px);
}

.lf-seasonal-banner:hover,
.lf-seasonal-banner:focus {
    color: var(--lf-ink);
    text-decoration: none;
}

.lf-seasonal-banner:focus {
    outline: 3px solid #2c3e50;
    outline-offset: 2px;
}

.lf-seasonal-copy {
    position: relative;
    display: block;
    max-width: 30em;
    padding: 18px 20px;
    border-radius: 4px;
    background-color: var(--lf-card);
    box-shadow: 0 1px 0 var(--lf-check);
}

.lf-seasonal-kicker {
    display: block;
    color: var(--lf-kicker);
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lf-seasonal-title {
    display: block;
    margin: 8px 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.02;
}

.lf-seasonal-subtitle {
    display: block;
    font-size: 15px;
    line-height: 1.45;
}

/* The site's red, at the shade white text reads on (AA). */
.lf-seasonal-cta {
    display: inline-block;
    margin-top: 14px;
    padding: 11px 16px;
    border-radius: 4px;
    color: #fff;
    background-color: #b4473f;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.lf-seasonal-banner:hover .lf-seasonal-cta,
.lf-seasonal-banner:focus .lf-seasonal-cta {
    background-color: #963a33;
}

/* The optional stock photo, on a round plate (MAFoodiesSeasonalBannerPhoto). */
.lf-seasonal-plate {
    display: block;
    flex: none;
    width: 230px;
    height: 230px;
    margin-left: 12px;
    padding: 12px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 10px 24px rgba(40, 30, 10, 0.22), inset 0 0 0 2px var(--lf-check);
}

.lf-seasonal-plate picture {
    display: block;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.lf-seasonal-plate img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * The credit: one discreet line at the banner's foot, in the bottom padding, on no
 * background. The palette's ink, faded: white would vanish into the pale tablecloth.
 */
.lf-seasonal-credit {
    position: absolute;
    right: 14px;
    bottom: 7px;
    max-width: calc(100% - 28px);
    overflow: hidden;
    color: var(--lf-ink);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0.7;
}

@media (max-width: 767px) {
    .lf-seasonal-title {
        font-size: 34px;
    }
}

/*
 * Phones: one column, the photo full width on top, the copy overlapping only its foot,
 * the call to action full width and the credit a line under the copy. 599px is also in
 * the photo's sizes attribute (MAFoodiesSeasonalShowcaseView::PHOTO_SIZES).
 */
@media (max-width: 599px) {
    .lf-seasonal-banner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding: 14px;
    }

    .lf-seasonal-plate {
        order: -1;
        width: auto;
        height: auto;
        margin: -14px -14px -20px;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .lf-seasonal-plate picture {
        border-radius: 0;
    }

    .lf-seasonal-plate img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .lf-seasonal-credit {
        position: static;
        max-width: none;
        margin-top: 8px;
        text-align: right;
    }

    .lf-seasonal-copy {
        max-width: none;
        background-color: var(--lf-cloth);
        box-shadow: 0 2px 10px rgba(40, 30, 10, 0.18);
    }

    .lf-seasonal-title {
        font-size: 30px;
    }

    .lf-seasonal-cta {
        display: block;
        text-align: center;
    }
}

/* 'En ce moment': one pill link per theme, wrapping onto as many lines as it needs. */
.lf-seasonal-heading {
    margin-top: 20px;
    font-size: 22px;
}

.lf-seasonal-chips > li {
    display: inline-block;
    max-width: 100%;
    margin: 0 8px 8px 0;
}

.lf-seasonal-chip {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #cfd6de;
    border-radius: 999px;
    color: #2c3e50;
    background-color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

.lf-seasonal-chip:hover,
.lf-seasonal-chip:focus {
    border-color: #b4473f;
    color: #b4473f;
    text-decoration: none;
}
