/* =============================================================
   Angebot-Detailseite – Responsive-Anpassungen der eigenen Bausteine
   (Uebersichtsbox, Impressionen-Tabs, Termine & Preise).
   Wird nach customizer.css geladen; die alten Regeln dort (und im
   Customizer-CSS der DB) arbeiten teils mit festen Breiten und
   !important, daher hier hohe Spezifitaet (#termine) bzw. !important.
   Breakpoints wie Avada: Tablet <= 1024px, Handy <= 640px.
   ============================================================= */

/* ---------- Uebersichtsbox [angebot_overview] ---------- */
/* Steht in einer 2/5-Spalte, die auf dem Tablet ~60% breit bleibt -> volle Breite.
   1020px statt 1024px: Avada stapelt die Spalten dieser Website erst ab 1020px
   (Avada-Einstellung); darueber steht die Box als Seitenspalte neben dem Text. */
@media (max-width: 1020px) {
    body.angebot-template-default .fusion-layout-column:has(.angebot-overview) {
        width: 100% !important;
    }
}

/* ---------- Impressionen: Tabs ---------- */
/* Handy: Tabs zweispaltig statt vier volle Zeilen untereinander. */
@media (max-width: 640px) {
    .impressions .tab-links .nav-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }

    .impressions .tab-links .nav-tabs li {
        flex: 1 1 calc(50% - 4px);
        margin: 0;
    }

    .impressions .tab-links .nav-tabs a {
        width: 100% !important;
        font-size: 16px !important;
        padding: 12px 8px !important;
    }
}

/* ---------- Termine & Preise: Accordion ---------- */
@media (max-width: 1024px) {
    /* Kopfzeile als Raster:  Pfeil | Datum      | Preis
                                    | Status     |          */
    .angebot-template-default #termine .accordion-title {
        display: grid !important;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "toggle datum  preis"
            ".      status preis";
        align-items: center;
        gap: 8px 14px;
        padding: 18px 20px;
    }

    /* Feste Breiten/Abstaende aus customizer.css und teaser.css aufheben
       (u.a. min-width: 450px am Datum -> Ueberlauf auf dem Handy). */
    .angebot-template-default #termine .accordion-title > div {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left;
    }

    .angebot-template-default #termine .accordion-title > div:first-of-type {
        grid-area: datum;
    }

    .angebot-template-default #termine .accordion-title > .termin-verfuegbarkeit {
        grid-area: status;
        gap: 4px 16px;
    }

    .angebot-template-default #termine .accordion-title > .termin-preis {
        grid-area: preis;
        justify-content: flex-end;
    }

    .angebot-template-default #termine .accordion-title > div:last-of-type {
        grid-area: toggle;
        order: 0;
        display: flex;
    }

    .angebot-template-default #termine .accordion-title button {
        padding: 4px 2px;
        line-height: 1;
    }

    /* Inhalt:  Beschreibung (volle Breite)
                Reiseleitung | Tags + Buttons */
    .angebot-template-default #termine .accordion-row {
        display: grid !important;
        grid-template-columns: 1fr auto;
        gap: 20px 30px;
    }

    .angebot-template-default #termine .accordion-row > .accordion-col {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .angebot-template-default #termine .accordion-row > .accordion-col:first-child {
        grid-column: 1 / -1;
    }

    .angebot-template-default #termine .accordion-row > .reiseleitung-col {
        justify-content: flex-start;
    }

    .angebot-template-default #termine .accordion-row > .accordion-col:last-child {
        grid-column: 2;
        align-self: start;
    }

    .angebot-template-default #termine .reiseleitung-col img {
        max-width: 160px !important;
    }
}

@media (max-width: 640px) {
    /* Kopfzeile:  Pfeil | Datum
                         | Status
                         | Preis   */
    .angebot-template-default #termine .accordion-title {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "toggle datum"
            ".      status"
            ".      preis";
        gap: 6px 12px;
        padding: 16px;
    }

    .angebot-template-default #termine .accordion-title .termin-von,
    .angebot-template-default #termine .accordion-title .termin-verfuegbarkeit {
        font-size: 15px !important;
    }

    .angebot-template-default #termine .accordion-title > .termin-preis {
        justify-content: flex-start;
        font-size: 16px !important;
    }

    /* Inhalt einspaltig, Tags + Buttons linksbuendig und volle Breite. */
    .angebot-template-default #termine .accordion-content {
        padding: 4px 16px 20px;
    }

    .angebot-template-default #termine .accordion-row {
        grid-template-columns: 1fr;
    }

    .angebot-template-default #termine .accordion-row > .accordion-col:last-child {
        grid-column: 1;
        align-items: stretch;
        text-align: left;
    }

    .angebot-template-default #termine .termin-accordion__tags {
        justify-content: flex-start;
        margin-bottom: 14px;
    }

    .angebot-template-default #termine .termin-accordion__actions {
        width: 100%;
    }
}

/* =============================================================
   Feinschliff (Feedback 15.10.26)
   ============================================================= */

/* ---------- Swiper-/Carousel-Pfeile ---------- */
/* Avada-Pfeile (Fotos, Highlights, Feedback ...) und die eigenen
   Impressionen-Carousels nutzen dieselben Avada-Variablen. Desktop 50px,
   auf Tablet (34px) und Handy (28px) deutlich kleiner. */
@media (max-width: 1024px) {
    body.angebot-template-default {
        --slider_nav_box_dimensions-width: 34px;
        --slider_nav_box_dimensions-height: 34px;
        --slider_arrow_size: 22px;
    }

    /* Icon mittig: customizer.css/impressionen.css verschieben die Pfeil-Icons
       fix um 2px (passend fuer die 44px-Icons auf dem Desktop); bei den
       kleineren Icons sass der Pfeil dadurch zu weit aussen und zu hoch.
       Leicht (0.5px) zur offenen Seite, damit er optisch mittig wirkt. */
    .angebot-template-default .awb-swiper-button .awb-icon-angle-left,
    .angebot-template-default .impr-carousel .awb-icon-angle-left {
        transform: translate(0.5px, -1px);
    }

    .angebot-template-default .awb-swiper-button .awb-icon-angle-right,
    .angebot-template-default .impr-carousel .awb-icon-angle-right {
        transform: translate(-0.5px, -1px);
    }
}

@media (max-width: 640px) {
    body.angebot-template-default {
        --slider_nav_box_dimensions-width: 28px;
        --slider_nav_box_dimensions-height: 28px;
        --slider_arrow_size: 18px;
    }
}

/* ---------- Impressionen: Feedback ---------- */
/* customizer.css zwingt alle Impressionen-Container auf 16:9 (mit
   !important); laengere Zitate wurden dadurch oben/unten abgeschnitten. */
@media (max-width: 1024px) {
    .impressions .imp-container.feedback,
    .impressions .imp-container.feedback .swiper-wrapper,
    .impressions .imp-container.feedback .swiper-wrapper > .fusion_builder_column {
        aspect-ratio: auto !important;
        height: auto !important;
    }
}

/* Handy: weniger seitlicher Innenabstand (Post-Card: 10%), damit das Zitat
   nicht in einer schmalen Spalte steht; Platz fuer die 32px-Pfeile bleibt. */
@media (max-width: 640px) {
    .impressions .imp-container.feedback .swiper-slide .fusion-column-wrapper {
        padding: 28px 44px !important;
    }

    /* Zitat und Name sind zusaetzlich auf 80% Breite begrenzt. */
    .impressions .imp-container.feedback .fusion-text {
        max-width: none;
    }
}

/* ---------- Termine & Preise ---------- */
/* Tablet: Buttons so breit wie die Tag-Zeile darueber. */
@media (max-width: 1024px) {
    .angebot-template-default #termine .accordion-row > .accordion-col:last-child {
        align-items: stretch;
    }

    .angebot-template-default #termine .termin-accordion__actions {
        width: auto;
    }
}

@media (max-width: 640px) {
    /* Kopfzeile ruhiger: Datum und Preis gleich (15px, fett), Status als
       Nebeninformation (14px, normal). Vorher 16/15/16px in drei Staerken
       und das Datum gesperrt. */
    .angebot-template-default #termine .accordion-title .termin-von,
    .angebot-template-default #termine .accordion-title .termin-von b,
    .angebot-template-default #termine .accordion-title > .termin-preis {
        font-size: 15px !important;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.4 !important;
    }

    .angebot-template-default #termine .accordion-title .termin-verfuegbarkeit,
    .angebot-template-default #termine .accordion-title .termin-verfuegbarkeit span {
        font-size: 14px !important;
        font-weight: 400;
        line-height: 1.4 !important;
    }

    .angebot-template-default #termine .accordion-title .termin-flug-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    /* Tags (Reiseform, Reisecode) ueber die volle Breite verteilt. */
    .angebot-template-default #termine .termin-accordion__tags > * {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }
}
