/* ========================================================== */
/* Cruise Compass — Schnellsuche (Frontend, Basis-Layout)      */
/* Neutrale Struktur; Farben/Skin über das Custom-CSS-Feld.    */
/* ========================================================== */

.cc-quicksearch { width: 100%; }

.cc-quicksearch__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.cc-quicksearch__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 180px;
    min-width: 160px;
    position: relative;
}

.cc-quicksearch__field > label {
    margin-bottom: 4px;
    font-weight: 600;
}

.cc-quicksearch__submit { flex: 0 0 auto; }

.cc-quicksearch__submit button {
    padding: 10px 24px;
    cursor: pointer;
}

/* ========================================================== */
/* Multiselect-Dropdown                                        */
/* ========================================================== */

.cc-ms { position: relative; }

.cc-ms__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.cc-ms__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cc-ms__caret {
    flex: 0 0 auto;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: .6;
}

.cc-ms__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    width: 280px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.cc-ms__head {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.cc-ms__search {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.cc-ms__apply {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.cc-ms__list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    /* Höhe auf ~5 Zeilen begrenzen + Scroll */
    max-height: 200px;
    overflow-y: auto;
}

.cc-ms__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.cc-ms__option:hover { background: #f2f5f9; }

.cc-ms__text { flex: 1 1 auto; }

/* Haken „hinter" dem selektierten Eintrag (rechtsbündig) */
.cc-ms__check {
    flex: 0 0 auto;
    margin-left: auto;
    width: 16px;
    text-align: center;
    color: #0174C6;
    opacity: 0;
}

.cc-ms__option.is-selected .cc-ms__check { opacity: 1; }
.cc-ms__check::before { content: "✓"; font-weight: 700; }

/* ========================================================== */
/* Reisezeitraum — 3-Schritt-Picker                            */
/* ========================================================== */

.cc-period { position: relative; }

.cc-period__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.cc-period__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cc-period__panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1000;
    width: 720px;
    max-width: 92vw;
    padding: 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    color: #333;
}

/* Stepper */
.cc-period__steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.cc-period__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    gap: 2px;
    background: none;
    border: none;
    cursor: default;
    font: inherit;
    color: inherit;
    position: relative;
}

button.cc-period__step { cursor: pointer; }

.cc-period__num {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 2px solid #bbb;
    color: #777;
    font-weight: 700;
}

.cc-period__step.is-active .cc-period__num { border-color: #0174C6; color: #0174C6; }
.cc-period__step.is-done .cc-period__num { border-color: #2e7d32; background: #2e7d32; color: #fff; }

.cc-period__steplabel { font-size: 12px; }
.cc-period__stepval { font-size: 12px; color: #666; }

.cc-period__hint {
    background: #eef4fb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Kalender (3 Monate) */
.cc-cal { display: flex; align-items: flex-start; gap: 6px; }

.cc-cal__nav {
    flex: 0 0 auto;
    align-self: center;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 28px; height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.cc-cal__months { display: flex; gap: 16px; flex: 1 1 auto; }

.cc-cal__month { flex: 1 1 0; }

.cc-cal__title { text-align: center; font-weight: 600; margin-bottom: 6px; }

.cc-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cc-cal__wd { text-align: center; font-size: 11px; color: #999; padding: 2px 0; }

.cc-cal__empty { }

.cc-cal__day {
    background: none;
    border: none;
    padding: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.cc-cal__day:hover { background: #eef4fb; }
.cc-cal__day.is-disabled { color: #ccc; cursor: default; }
.cc-cal__day.is-inrange { background: #eef4fb; }
.cc-cal__day.is-start,
.cc-cal__day.is-end { background: #0174C6; color: #fff; }

/* Aufenthaltsdauer */
.cc-period__durations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-period__dur {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
}

.cc-period__dur:hover { background: #eef4fb; }
.cc-period__dur.is-selected { background: #0174C6; border-color: #0174C6; color: #fff; }

/* Mobil: alles gestapelt, Kalender einspaltig */
@media (max-width: 782px) {
    .cc-quicksearch__field,
    .cc-quicksearch__submit { flex: 1 1 100%; }
    .cc-quicksearch__submit button { width: 100%; }
    .cc-period__panel { width: 92vw; }
    .cc-cal__months { flex-direction: column; }
}
