/* Only the MMU hotels block (mmu/hotels). Vue owns the filters and the hotel list. */
.hotels #fe-block-hotels-app {
    box-sizing: border-box;
    width: min(100% - 32px, 1320px);
    max-width: 1320px;
    margin: clamp(28px, 4vw, 60px) auto 80px;
    padding: 0;
    color: var(--im-ink);
    font-family: var(--im-font);
}

.hotels #fe-block-hotels-app .loadingSpinner {
    padding: 60px 16px;
    color: var(--im-deep);
    text-align: center;
}

.hotels #fe-block-hotels-app .loadingSpinner .fa {
    color: var(--im-accent);
    font-size: 26px;
}

/* Filter bar */
.hotels #fe-block-hotels-app .filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    box-sizing: border-box;
    position: relative;
    /* Keep open dropdowns above the lifted hotel cards. */
    z-index: 3;
    margin: 0 0 clamp(18px, 2.4vw, 30px);
    padding: 16px;
    border: 1px solid var(--im-line);
    border-radius: var(--im-radius);
    background: var(--im-surface);
    box-shadow: var(--im-shadow);
}

.hotels #fe-block-hotels-app .filter .dropdown {
    position: relative;
    z-index: 2;
    width: auto;
    min-width: 0;
    margin: 0;
}

/* The plugin gives the label z-index: 9999, so the open dropdown has to lift its whole box. */
.hotels #fe-block-hotels-app .filter .dropdown.active {
    z-index: 10;
}

.hotels #fe-block-hotels-app .filter .dropdown .select-label {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
    height: 42px;
    padding: 8px 34px 8px 12px;
    overflow: hidden;
    border: 1px solid var(--im-line);
    border-radius: var(--im-radius-sm);
    background: #fff;
    color: var(--im-ink);
    font-family: var(--im-font);
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hotels #fe-block-hotels-app .filter .dropdown.active .select-label {
    border-color: var(--im-accent);
}

.hotels #fe-block-hotels-app .filter .dropdown .select-label::after {
    /* The plugin pins the arrow to a 30px box at the top; center it in the 42px label. */
    top: 50%;
    right: 13px;
    height: auto;
    color: var(--im-accent);
    font-size: 11px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}

/* The plugin opens the list with a fixed 300px height and a 30px offset, which overlaps the
   42px label and leaves an empty white box for short lists. Size it to its content instead. */
.hotels #fe-block-hotels-app .filter .dropdown.active .dropdown-list {
    box-sizing: border-box;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    height: auto;
    max-height: 300px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--im-line);
    border-radius: var(--im-radius-sm);
    background: #fff;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--im-deep) 14%, transparent);
    color: var(--im-ink);
}

.hotels #fe-block-hotels-app .filter .dropdown .dropdown-list li {
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    border-radius: var(--im-radius);
    background: transparent;
    box-shadow: none;
    color: var(--im-ink);
    font-family: var(--im-font);
    font-size: 14px;
    line-height: 1.35;
}

/* The plugin sets its hover shadow with !important. */
.hotels #fe-block-hotels-app .filter .dropdown .dropdown-list li:hover {
    background: color-mix(in srgb, var(--im-accent) 10%, #fff);
    box-shadow: none !important;
    color: var(--im-ink);
}

/* Hotel grid */
.hotels #fe-block-hotels-app .hotel-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    align-items: stretch;
    gap: clamp(18px, 2.4vw, 30px);
    margin: 0;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--im-line);
    border-radius: var(--im-radius);
    background: var(--im-surface);
    box-shadow: var(--im-shadow);
    color: var(--im-ink);
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-image {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    margin: 0;
    overflow: hidden;
    background: color-mix(in srgb, var(--im-deep) 12%, var(--im-surface));
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-image figure {
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The plugin zooms the image by 20% on hover; only a subtle zoom together with the card lift. */
.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-image:hover figure img {
    transform: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .hotels #fe-block-hotels-app .hotel-layout .hotel {
        transition: box-shadow .25s ease, transform .25s ease;
    }

    .hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-image img {
        transition: transform .4s ease;
    }

    .hotels #fe-block-hotels-app .hotel-layout .hotel:hover {
        transform: translateY(-4px);
        box-shadow: var(--im-shadow-hover);
    }

    .hotels #fe-block-hotels-app .hotel-layout .hotel:hover .hotel-image img {
        transform: scale(1.04);
    }
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
    height: auto;
    padding: 20px 22px 22px;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-content h4 {
    margin: 0;
    color: var(--im-deep);
    font-family: var(--im-font-display);
    font-size: clamp(17px, 1.35vw, 19px);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.25;
    overflow-wrap: break-word;
}

/* Stars */
.hotels #fe-block-hotels-app .hotel-layout .hotel .star--wrapper {
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    color: var(--im-accent);
    font-size: 14px;
    line-height: 1;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .star--wrapper :is(.fa-star, .fa-star-half) {
    color: var(--im-accent);
    text-shadow: none;
}

/* The plugin sets the addition ("superior", "Mittelklasse") as tiny superscript text. */
.hotels #fe-block-hotels-app .hotel-layout .hotel .star--wrapper .stars-addition--wrapper {
    margin-left: 0;
    color: color-mix(in srgb, var(--im-ink) 72%, var(--im-surface));
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.3;
    vertical-align: baseline;
}

/* Stars are only drawn for numeric amount classes (amount-3, amount-45 ...); otherwise the addition stands alone. */
.hotels #fe-block-hotels-app .hotel-layout .hotel .star--wrapper:is([class*="amount-1"], [class*="amount-2"], [class*="amount-3"], [class*="amount-4"], [class*="amount-5"]) .stars-addition--wrapper {
    margin-left: 6px;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .desc-hotel {
    margin-top: 4px;
    color: var(--im-ink);
    font-size: 14px;
    line-height: 1.55;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .desc-hotel p {
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    overflow-wrap: break-word;
}

/* Actions */
.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

/* Vue leaves an empty wrapper for every missing link. */
.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:not(:has(a)) {
    display: none;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link {
    flex: 1 1 calc(50% - 5px);
    order: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
}

/* "Current offers of this hotel" is the plugin's third link; keep it on its own row above the buttons. */
.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:nth-child(3) {
    flex-basis: 100%;
    order: 0;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--im-gold);
    border-radius: var(--im-radius-sm);
    background: var(--im-gold);
    color: var(--im-ink);
    font-family: var(--im-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link a:hover {
    border-color: color-mix(in srgb, var(--im-gold) 85%, var(--im-deep));
    background: color-mix(in srgb, var(--im-gold) 85%, var(--im-deep));
    color: var(--im-ink);
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:nth-child(2) a {
    background: transparent;
    color: var(--im-accent);
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:nth-child(2) a:hover {
    border-color: var(--im-accent);
    background: var(--im-accent);
    color: var(--im-on-deep);
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:nth-child(3) a {
    border-color: transparent;
    background: color-mix(in srgb, var(--im-accent) 10%, var(--im-surface));
    color: var(--im-accent);
}

.hotels #fe-block-hotels-app .hotel-layout .hotel .links-hotel .link:nth-child(3) a:hover {
    border-color: var(--im-accent);
    background: var(--im-accent);
    color: var(--im-on-deep);
}

.hotels #fe-block-hotels-app .hotel-layout .error {
    grid-column: 1 / -1;
    padding: 32px 24px;
    border: 1px solid var(--im-line);
    border-radius: var(--im-radius);
    background: var(--im-surface);
    color: var(--im-ink);
    font-size: 16px;
    text-align: center;
}

.hotels #fe-block-hotels-app :is(a, .select-label, .dropdown-list li):focus-visible {
    outline: 3px solid var(--im-accent-light);
    outline-offset: 3px;
}

@media (max-width: 1024px) {
    .hotels #fe-block-hotels-app .filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .hotels #fe-block-hotels-app {
        margin-top: 24px;
        margin-bottom: 56px;
    }

    .hotels #fe-block-hotels-app .filter {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    .hotels #fe-block-hotels-app .hotel-layout .hotel .hotel-content {
        padding: 16px 16px 18px;
    }
}
