/* Wunschtour: Highlight-Auswahl ([hbtb_wunschtour]) */

.hbtb-wunschtour,
.hbtb-wt-highlights,
.hbtb-wt-summary,
.hbtb-wt-form {
    /* Akzentfarbe – wie im Buchungs-Widget aus Breakdance übernommen */
    --hbtb-accent: var(--bde-button-primary-background-color, #0073aa);
    --hbtb-accent-soft: var(--bde-palette-color-1-ccca3b63-6a17-4e99-ad2d-16d3adbc6b4e, #e6f4ff);
    --hbtb-wt-border: #e2e2e2;
    --hbtb-wt-radius: 14px;
}

[class*="hbtb-wt-"][hidden] {
    display: none !important;
}

/* ---- Toolbar: Suche + Zähler ---- */

.hbtb-wt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.hbtb-wt-search {
    flex: 1 1 220px;
    max-width: 340px;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid var(--hbtb-wt-border);
    border-radius: 999px;
    background: #fff;
    font: inherit;
}

.hbtb-wt-search:focus {
    outline: none;
    border-color: var(--hbtb-accent);
}

.hbtb-wt-counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--hbtb-accent);
    color: #111;
    font-weight: 700;
    white-space: nowrap;
}

.hbtb-wt-counter__min {
    font-weight: 400;
}

.hbtb-wt-limit {
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    background: #fff8e1;
    color: #92400e;
    font-size: 14px;
    line-height: 1.5;
}

/* ---- Karten ---- */

.hbtb-wt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.hbtb-wt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--hbtb-wt-border);
    border-radius: var(--hbtb-wt-radius);
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease, transform .1s ease;
}

.hbtb-wt-card:hover,
.hbtb-wt-card:focus-visible {
    border-color: var(--hbtb-accent);
    background: #fff;
    color: inherit;
}

/* Deutlicher Tastatur-Fokus (ohne Übergang, damit er sofort sichtbar ist). */
.hbtb-wt-card:focus-visible,
.hbtb-wt-more:focus-visible,
.hbtb-wt-summary__remove:focus-visible,
.hbtb-wt-summary__edit:focus-visible {
    outline: 3px solid #111;
    outline-offset: 2px;
}

.hbtb-wt-card:active {
    transform: translateY(1px);
}

.hbtb-wt-card.is-selected {
    border-color: var(--hbtb-accent);
    box-shadow: 0 0 0 2px var(--hbtb-accent);
}

.hbtb-wt-card.is-hidden {
    display: none;
}

/* Obergrenze erreicht: nicht gewählte Karten zurücknehmen (bleiben klickbar für den Hinweis). */
.hbtb-wt-grid.is-maxed .hbtb-wt-card:not(.is-selected) {
    opacity: .55;
}

.hbtb-wt-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f1f1f1;
    overflow: hidden;
}

.hbtb-wt-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hbtb-wt-card__check {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    color: #111;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.hbtb-wt-card__check::before {
    content: "+";
}

.hbtb-wt-card.is-selected .hbtb-wt-card__check {
    background: var(--hbtb-accent);
}

.hbtb-wt-card.is-selected .hbtb-wt-card__check::before {
    content: "\2713";
    font-size: 17px;
}

.hbtb-wt-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px 12px;
}

/* Lange deutsche Wörter („Landungsbrücken“) trennen statt abschneiden. */
.hbtb-wt-card__title,
.hbtb-wt-card__text,
.hbtb-wt-summary__name {
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.hbtb-wt-card__title {
    font-weight: 700;
    line-height: 1.25;
}

.hbtb-wt-card__text {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

/* Kachel „+X weitere Highlights“ */
.hbtb-wt-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 160px;
    margin: 0;
    padding: 16px;
    border: 2px dashed var(--hbtb-wt-border);
    border-radius: var(--hbtb-wt-radius);
    background: #fafafa;
    color: inherit;
    font: inherit;
    text-align: center;
    text-transform: none;
    cursor: pointer;
    transition: border-color .2s ease;
}

.hbtb-wt-more:hover,
.hbtb-wt-more:focus-visible {
    border-color: var(--hbtb-accent);
    background: #fafafa;
    color: inherit;
}

.hbtb-wt-more__count {
    font-size: 24px;
    font-weight: 700;
}

.hbtb-wt-no-results {
    margin: 16px 0 0;
    color: #666;
}

/* ---- Formular + Auswahl nebeneinander ---- */

.hbtb-wt-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 30px;
}

.hbtb-wt-columns .hbtb-booking-form {
    margin: 0;
}

/* ---- Eure Auswahl ---- */

.hbtb-wt-summary {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
}

.hbtb-wt-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

/* Doppelte Klasse, damit globale Theme-Überschriften (Breakdance) nicht gewinnen. */
.hbtb-wt-summary .hbtb-wt-summary__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.hbtb-wt-summary__badge {
    display: inline-flex;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--hbtb-accent);
    color: #111;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.hbtb-wt-summary__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hbtb-wt-summary__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.hbtb-wt-summary__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 42px;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f1f1;
}

.hbtb-wt-summary__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hbtb-wt-summary__name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    line-height: 1.3;
}

.hbtb-wt-summary__remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.hbtb-wt-summary__remove:hover,
.hbtb-wt-summary__remove:focus-visible {
    border-color: var(--hbtb-accent);
    background: var(--hbtb-accent-soft);
    color: #111;
}

.hbtb-wt-summary__empty {
    margin: 0;
    color: #666;
}

.hbtb-wt-summary__edit {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 18px;
    border: 2px solid #111;
    border-radius: 999px;
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

.hbtb-wt-summary__edit:hover {
    background: #111;
    color: #fff;
}


@media (max-width: 900px) {
    .hbtb-wt-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Mobil: Auswahl vor dem Formular, damit man sie vor dem Absenden sieht. */
    .hbtb-wt-columns .hbtb-wt-summary {
        order: -1;
    }
}

@media (max-width: 600px) {
    .hbtb-wt-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hbtb-wt-toolbar {
        justify-content: stretch;
    }

    .hbtb-wt-search {
        max-width: none;
    }

    .hbtb-wt-card__text {
        display: none;
    }

    .hbtb-wt-card__title {
        font-size: 15px;
    }

    .hbtb-wt-card__body {
        padding: 8px 10px 10px;
    }

    .hbtb-wt-more {
        min-height: 0;
        aspect-ratio: auto;
    }
}
