/* Shared-theme listing styles remain in the theme. Plugin controls and overrides follow. */

.ehga {
    padding: 1rem 0;
    margin: auto;
}

.ehga-date-controls {
    margin: 0 0 58px;
}

.ehga-date-controls>.date-slider__label {
    display: block;
    margin: 0 0 8px;
}

.ehga-date-strip {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    max-width: 100%;
}

.ehga-date-strip>a:not([aria-label]) {
    width: 55px;
    height: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    border: 1px solid #ff681d;
    border-right: 0;
    background: #1d1d1d;
    color: #fff;
    font-family: 'Work Sans',sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
}

.ehga-date-strip>a:nth-last-of-type(2) {
    border-right: 1px solid #ff681d;
    border-radius: 0 3px 3px 0;
}

.ehga-date-strip>a:nth-child(2) {
    border-radius: 3px 0 0 3px;
}

.ehga-date-strip>a[aria-current=date] {
    background: #ff681d;
}

.ehga-date-strip small {
    font-size: 14px;
    text-transform: uppercase;
    line-height: 16px;
}

.ehga-date-strip>[aria-label] {
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 42px;
    margin: 0 12px;
    background: transparent url('/wp-content/themes/escapehunt-core/public/images/icons/date-slider-arrow-left.svg') center no-repeat;
    border: 0;
    color: transparent;
    font-size: 0;
    padding: 0;
}

.ehga-date-strip>[aria-label="Next dates"] {
    background-image: url('/wp-content/themes/escapehunt-core/public/images/icons/date-slider-arrow-right.svg');
}

.ehga-date-strip>button:disabled {
    opacity: .3;
}

.ehga-date-form {
    display: block;
    margin: 0 0 0 4px;
}

.ehga-calendar {
    display: block;
    position: relative;
    width: 57px;
    height: 46px;
    border-radius: 3px;
    background: #ff681d url('/wp-content/themes/escapehunt-core/public/images/icons/calendar.svg') center/18px no-repeat;
    cursor: pointer;
    background-image: none;
}

.ehga-calendar input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.ehga-calendar:focus-within {
    outline: 2px solid white;
    outline-offset: 3px;
}

.ehga-calendar input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.ehga .game-listing__header .header-date {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 900;
    font-family: inherit;
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
}

.ehga .listing-item__times button.trigger {
    padding: 0;
    border: 0;
    font-family: inherit;
}

.ehga .listing-item__times>p {
    font-size: 14px;
}

.ehga .listing-item__detail--type {
    background-image: url('/wp-content/plugins/escapehunt-game-availability/assets/escape-room.svg');
}

.ehga-pagination {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 1.5rem 0;
}

.ehga [role=status]:focus {
    outline: 2px solid #ff681d;
    outline-offset: 4px;
}

.ehga[aria-busy=true] {
    opacity: .6;
}

.ehga-quick .quick-book__form {
    margin-top: 16px;
}

.ehga-quick input,.ehga-quick select {
    color: #222;
    background-color: white;
}

.ehga-quick .input--date {
    background-image: none;
}

.ehga-quick .quick-book__form-item .input--games {
    width: 500px;
}

.ehga-quick .quick-book__form-item input,.ehga-quick .quick-book__form-item select,.ehga-quick .quick-book__form-item button {
    height: 45px;
}

.ehga-quick .quick-book__button--close {
    font-size: 0;
    background-image: none!important;
}

.ehga-quick .quick-book__form-item .input--date {
    background-image: none!important;
}

.ehga-quick .quick-book__button--close:before,.ehga-quick .quick-book__button--close:after {
    content: '';
    position: absolute;
    top: 34px;
    left: 24px;
    width: 22px;
    height: 2px;
    background: white;
    transform: rotate(45deg);
}

.ehga-quick .quick-book__button--close:after {
    transform: rotate(-45deg);
}

.ehga-calendar:before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/wp-content/themes/escapehunt-core/public/images/icons/calendar.svg') center/18px no-repeat;
    filter: brightness(0) invert(1);
    pointer-events: none;
}

.ehga-summary,.ehga-error {
    border: 1px solid #ff681d;
    padding: 16px;
    margin: 0 0 20px;
}

.ehga .listing-item__times>.ehga-empty {
    flex-basis: 100%;
    width: 100%;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.ehga-empty p,.ehga-summary p {
    margin: 0 0 8px;
}

.ehga-empty a,.ehga-summary a {
    color: #ff681d;
}

.ehga-error button {
    padding: 8px 16px;
    background: #ff681d;
    color: white;
    border: 0;
    cursor: pointer;
}

.ehga-calendar-caption {
    display: none;
}

.ehga .listing-item__times>.ehga-checkout-error {
    flex-basis: 100%;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: #ff681d;
}

.ehga-pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    background-repeat: no-repeat;
}

.ehga-pagination-previous {
    padding-left: 30px;
    background-image: url('/wp-content/themes/escapehunt-core/public/images/icons/arrow-previous.svg');
    background-position: left center;
}

.ehga-pagination-next {
    padding-right: 30px;
    margin-left: auto;
    background-image: url('/wp-content/themes/escapehunt-core/public/images/icons/arrow-next.svg');
    background-position: right center;
}

.ehga-calendar.ehga-calendar--manual {
    width: 165px;
    background: white;
}

.ehga-calendar.ehga-calendar--manual:before {
    display: none;
}

.ehga-calendar.ehga-calendar--manual input {
    opacity: 1;
    color: #222;
    background: white;
    padding: 8px;
    border: 1px solid #ff681d;
}

@media(max-width:899px) {
    .ehga-date-strip>a:not([aria-label]) {
        width: 38px;
        font-size: 12px;
    }

    .ehga-date-strip small {
        font-size: 12px;
    }

    .ehga-date-strip>[aria-label] {
        margin: 0 5px;
    }

    .ehga-calendar {
        width: 40px;
    }

    .ehga-date-controls {
        margin-bottom: 32px;
    }

    .ehga-quick .quick-book__form-item .input--games {
        width: 100%;
    }

    .ehga .game-listing__header .header-date {
        display: block;
    }

    .ehga .listing-item__times {
        padding-left: 0;
    }

}

@media(max-width:420px) {
    .ehga-date-strip>a:not([aria-label]) {
        width: 30px;
    }

    .ehga-date-strip>[aria-label] {
        margin: 0 3px;
    }

    .ehga-calendar {
        width: 32px;
    }

}

@media(max-width:600px) {
    .ehga .header-date {
        overflow-wrap: anywhere;
        line-height: 1.3;
    }

    .ehga-date-strip {
        max-width: 100%;
        box-sizing: border-box;
    }

    .ehga .listing-item {
        min-width: 0;
    }

    .ehga-quick .quick-book__form-item {
        min-width: 0;
    }

    .ehga-quick .quick-book__form-item input,.ehga-quick .quick-book__form-item select {
        max-width: 100%;
        box-sizing: border-box;
    }

}

@media(max-width:767px) {
    .ehga[data-game="0"] .ehga-date-strip {
        display: grid;
        grid-template-columns: repeat(7,minmax(0,1fr));
        width: 100%;
        row-gap: 12px;
    }

    .ehga[data-game="0"] .ehga-date-strip>a:not([aria-label]) {
        grid-row: 1;
        width: auto;
        min-width: 0;
        height: 56px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .ehga[data-game="0"] .ehga-date-strip small {
        font-size: 14px;
    }

    .ehga[data-game="0"] .ehga-date-strip>[aria-label] {
        grid-row: 2;
        grid-column: 1;
        width: 100%;
        height: 48px;
        margin: 0;
        box-sizing: border-box;
    }

    .ehga[data-game="0"] .ehga-date-strip>[aria-label="Next dates"] {
        grid-column: 7;
    }

    .ehga[data-game="0"] .ehga-date-form {
        grid-row: 2;
        grid-column: 2 / 7;
        margin: 0;
    }

    .ehga[data-game="0"] .ehga-calendar {
        width: 100%;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .ehga[data-game="0"] .ehga-calendar:before {
        inset: auto;
        left: 12px;
        top: 15px;
        width: 18px;
        height: 18px;
    }

    .ehga[data-game="0"] .ehga-calendar-caption {
        display: block;
        color: white;
        font-size: 14px;
        font-weight: 700;
        padding-left: 22px;
        pointer-events: none;
    }

    .ehga[data-game="0"] .ehga-calendar--manual .ehga-calendar-caption {
        display: none;
    }

}
