:root {
    --color-primary: #25618F;
    --color-primary-dark: #183E5C;
    --color-primary-light: #7BB1DB;
    --color-sponsored: rgba(201, 185, 120, .8);
    --color-gray-light: #eeeeee;
    --padding-primary: 24px;
    --padding-double: 48px;
    --aspect-ratio-16-9-pct: 56.25%;
    --aspect-ratio-128-67-pct: 52.34%;
}
mark {
    background-color: var(--color-primary-light);
    font-weight: bold;
}
.algolia-article {
    height: 100%;
    text-decoration: none;
}

.algolia-article .info h3 {
    font-size: 1.1em;
    z-index: 1;
    font-weight: bold;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* number of lines to show */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: white !important;
}
.algolia-article .meta {
    margin-top: 8px;
}
.algolia-article .info {
    align-self: end;
    display: flex;
    flex-flow: column;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    background-position: center;
    background-size: cover;
    font-family: "Roboto", sans-serif;
    color: white;
    text-shadow: 1px 1px 2px #000000, 0 0 2px #000000;
    aspect-ratio: 128 / 67;
    background-color: var(--color-primary-dark);
}
/* Polyfill for browsers that don't recognize aspect ratio, such as Mac Safari */
@supports not (aspect-ratio: 2 / 1) {
    .algolia-article .info::before {
        content: "";
        float: left;
        padding-bottom: var(--aspect-ratio-128-67-pct);
        pointer-events: none;
    }
    .algolia-article .info::after {
        content: "";
        display: block;
        clear: both;
        pointer-events: none;
    }
}
.algolia-article .info::after {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, .75))
}

.algolia-article h3 {
    font-size: .8em;
    margin: 0;
}
.algolia-video .info * {
    color: black;
    text-shadow: none;
    z-index: 1;
    margin: 0;
    padding: 8px;
}

.algolia-video .poster {
    display: flex;
    aspect-ratio: 16 / 9;
    width: 100%;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}
/* Polyfill for browsers that don't recognize aspect ratio, such as Mac Safari */
@supports not (aspect-ratio: 2 / 1) {
    .algolia-video .poster::before {
        content: "";
        float: left;
        padding-bottom: var(--aspect-ratio-16-9-pct);
        pointer-events: none;
    }
    .algolia-video .poster::after {
        content: "";
        display: block;
        clear: both;
        pointer-events: none;
    }
}
.algolia-video .poster img {
    width: 25%;
    max-width: 80px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.algolia-video h3 {
    font-size: 1rem;
    margin-bottom: 0;
}

.snippet {
    font-size: .8em;
    margin: 8px 0 0;
}

.algolia-article .tag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: .5rem;
    padding: 0 2px;
    z-index: 1;
}
.algolia-article .sponsored {
    background-color: var(--color-sponsored);
    color: white;
    text-transform: uppercase;
}
.meta {
    text-transform: uppercase;
    font-size: .66rem;
    display: flex;
    justify-content: space-between;
    gap: 0 8px;
}
.meta span:first-of-type {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .9em;
}
.meta span:last-of-type {
    flex: 1 0 max-content;
    text-align: right;
}

.algolia-news {
    display: flex;
    flex-flow: column;
    height: 100%;
    border: 1px solid var(--color-gray-light);
}
.algolia-news article > * {
    padding: 8px;
    margin: 0;
}
.algolia-news article {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    height: 100%;
}
.algolia-brand .mini {
    padding: 24px 8px;
}
.algolia-brand {
    border: 1px solid var(--color-gray-light);
    display: flex;
    flex-flow: column;
    align-items: center;
}
.algolia-brand img {
    max-width: 100%;
}
.algolia-brand .logo {
    padding: 8px;
    margin: -30px 16px 0;
    background-color: white;
    aspect-ratio: 2/1;
    max-width: 245px;
}
.algolia-brand p {
    padding: 8px;
    font-size: .85rem;
}
.ais-Hits-item article, .aa-Item article {
    border: 1px solid var(--color-gray-light);
    display: flex;
    flex-flow: column;
    height: 100%;
    justify-content: space-between;
    box-sizing: border-box;
}
.ais-Hits-item article .meta, .aa-Item article .meta{
    border-top: 1px solid var(--color-gray-light);
    padding: 4px 8px;
}

.ais-Hits-item article .meta, .ais-Hits-item article .snippet, .aa-Item article .meta, .aa-Item article .snippet {
    padding: 8px;
}
.algolia-brand > h4 {
    text-align: center;
    margin: 0;
}

.algolia-video article {
    flex-flow: row;
    height: auto;
}
.algolia-video .poster {
    flex: 0 0 200px;
}
.algolia-video .info {
    flex: 1 0 auto;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
}
