/* Period type switch added to #forms_tabs by hotels-flex.js */

.hf-period-type {
    /* Wizatour theme colors (theme-*.css, loaded with the first form), site theme as fallback */
    --hf-color: var(--accent-color, var(--mdc-theme-primary, #006cb8));
    --hf-color-hover: var(--accent-color, var(--mdc-theme-secondary, #ed1b2f));
    --hf-on-color: var(--text-onprimary-color, var(--text-on-accent, #fff));
    --hf-background: var(--background-color, #fff);
    --hf-muted: var(--muted-text-color, var(--gray-accent, #6e6e6e));

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 0px 0;
    background: var(--hf-background);
}

.hf-period-type__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--hf-muted);
}

/* Material "info" icon; the popup itself is .wz-tooltip from wizatour.css.
   Two classes, so it beats .material-icons (24px), which is added to <head> later with the first form. */
.hf-period-type__label .wz-form-periodtype__info {
    color: var(--hf-color);
    font-size: 1.1rem;
    line-height: 1;
}

.hf-period-type__options {
    display: inline-flex;
}

.hf-period-type__button {
    margin: 0;
    padding: 8px 16px;
    border: 1px solid var(--hf-color);
    border-radius: 0;
    background: var(--hf-background);
    color: var(--hf-color);
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 150ms ease-out, color 150ms ease-out;
}

/* Neighbouring buttons share one border */
.hf-period-type__button + .hf-period-type__button {
    margin-left: -1px;
}

.hf-period-type__button:hover {
    background: color-mix(in srgb, var(--hf-color) 10%, var(--hf-background));
}

.hf-period-type__button--active,
.hf-period-type__button--active:hover {
    background: var(--hf-color);
    color: var(--hf-on-color);
    cursor: default;
}

.hf-period-type__button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--hf-color-hover);
    outline-offset: 2px;
}

@media screen and (max-width: 600px) {
    .hf-period-type__options {
        flex: 1 1 100%;
    }

    .hf-period-type__button {
        flex: 1;
    }
}
