/*
 * Event hero: buttons with a second, smaller line.
 *
 * A hero button has an optional field "Second line". When it is filled, the element prints
 *   <span class="dgm-hero-btn__text">
 *     <span class="dgm-hero-btn__main">Label</span><span class="dgm-hero-btn__sub">Second line</span>
 *   </span>
 * between the button's icons, and loads this file. One rule set for every hero variant; a button without
 * a second line is not touched. The element loads this file itself, on any site, and it comes before the
 * variant styles in the page, so the four properties that must win carry !important.
 */
[data-event-hero] :is(a, button):has(> .dgm-hero-btn__text) {
    display: inline-flex !important;      /* some variants turn a wrapped button into a block box */
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.625rem !important;      /* 58 px: two lines need more than the 50 px of a one-line button */
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    text-align: left !important;
    white-space: normal;
}
[data-event-hero] :is(a, button):has(> .dgm-hero-btn__text) > i {
    flex: none;
    margin: 0;
}
[data-event-hero] .dgm-hero-btn__text {
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
}
[data-event-hero] .dgm-hero-btn__main {
    display: block;
    line-height: 1.25;
}
[data-event-hero] .dgm-hero-btn__sub {
    display: block;
    font-size: 0.8125rem;                 /* 13 px under a 16 px label */
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.88;
}

/* the other buttons of the same row take the same height, so the row stays even */
[data-event-hero] :has(> :is(a, button) > .dgm-hero-btn__text) > :is(a, button) {
    min-height: 3.625rem !important;
}
