/*
 * Tacweb Fahnenrechner — Abstände im Shop.
 *
 * Bewusst sparsam: nur Abstand und Umbruch, keine Farben und keine Schriften.
 * Das Aussehen gehört dem Template des Shops, nicht dem Plugin.
 */

/* Einheit direkt hinter (oder vor) dem Eingabefeld */
.tac-pp-zusatz {
    display: inline-block;
}

.tac-pp-zusatz-einheit {
    margin: 0 .35rem;
}

/* Der Min/Max-Hinweis steht auf eigener Zeile unter dem Feld —
   sonst klebt er an der Einheit ("m1 bis 7 m"). */
.tac-pp-zusatz-minmax {
    display: block;
    margin-top: .15rem;
}

.tac-pp-minmax {
    white-space: nowrap;
}

/* Wert des Schiebereglers */
.tac-pp-reglerwert {
    display: inline-block;
    min-width: 2.5rem;
    margin: 0 .35rem;
    font-variant-numeric: tabular-nums;
}

/* Hinweis, wenn eine Eingabe auf einen erlaubten Wert gerückt wurde */
.tac-pp-korrektur {
    display: block;
    margin-top: .15rem;
    font-size: .85em;
    opacity: .85;
}

/* Felder nebeneinander: "Anordnung" in der Feldtabelle.
   Die Spalten teilen sich die Zeile genau auf — zwei halbe ergeben mit dem
   Abstand zusammen 100 %. Das Eingabefeld füllt seine Spalte; würde man es
   zusätzlich begrenzen, klaffte auf breiten Bildschirmen eine Lücke. */
.tac-pp-reihe {
    display: flex;
    flex-wrap: wrap;
    gap: 0 .75rem;
    align-items: flex-start;
}

.tac-pp-reihe > .tac-pp-breite-halb {
    flex: 1 1 calc(50% - .375rem);
    min-width: 6rem;
}

.tac-pp-reihe > .tac-pp-breite-drittel {
    flex: 1 1 calc(33.333% - .5rem);
    min-width: 5rem;
}

/* Kompakter: ein Maßfeld allein in der Zeile braucht keine Fensterbreite */
.tac-pp-breite-schmal .tac-pp-feld {
    max-width: 12rem;
}

.tac-pp-reihe .tac-pp-feld {
    width: 100%;
}

/* Die Fahnen-Vorschau über den Variationen */
.tac-pp-fahne {
    margin: 0 0 1rem;
    max-width: 20rem;
}

.tac-pp-fahne .tac-fahne-svg {
    overflow: visible;
}

/* Von der Kette ausgeblendete Variationen und Werte */
.tac-pp-aus {
    display: none !important;
}

/* Info-Symbol neben der Überschrift einer Variation */
.tac-pp-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: .4rem;
    color: #8a8a8a;
    cursor: help;
    font-size: 1.05em;
    line-height: 1;
    vertical-align: middle;
    text-transform: none;
    -webkit-tap-highlight-color: transparent;
}

/* größere Tippfläche, ohne das Layout zu verschieben */
.tac-pp-info::after {
    content: "";
    position: absolute;
    top: -12px;
    right: -12px;
    bottom: -12px;
    left: -12px;
}

.tac-pp-info:hover,
.tac-pp-info:focus,
.tac-pp-info.is-aktiv {
    color: #1a1a1a;
    outline: none;
}

/* Info-Fenster: am Desktop als Tooltip am Symbol */
.tac-pp-tip {
    position: absolute;
    z-index: 10000;
    width: 460px;
    max-width: calc(100vw - 16px);
    padding: 16px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    font-size: 13px;
    line-height: 1.4;
    color: #1a1a1a;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s, visibility .15s;
    pointer-events: none;
}

.tac-pp-tip.is-offen {
    opacity: 1;
    visibility: visible;
}

.tac-pp-tip__zu {
    display: none;
}

.tac-pp-tip__titel {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.tac-pp-tip__raster {
    display: flex;
    gap: 14px;
}

.tac-pp-tip__karte {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s;
}

.tac-pp-tip__karte.is-aktiv {
    border-color: #1a1a1a;
}

.tac-pp-tip__karte svg,
.tac-pp-tip__karte img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.tac-pp-tip__karte strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

/* Handy / Touch: Panel von unten mit abgedunkeltem Hintergrund */
.tac-pp-tip-hintergrund {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s, visibility .25s;
}

.tac-pp-tip-hintergrund.is-offen {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tac-pp-tip.is-sheet {
    position: fixed;
    z-index: 10001;
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 16px 16px 0 0;
    padding: 22px 16px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .2);
    opacity: 1;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform .25s ease, visibility .25s;
}

.tac-pp-tip.is-sheet.is-offen {
    transform: none;
    pointer-events: auto;
}

.tac-pp-tip.is-sheet .tac-pp-tip__zu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #1a1a1a;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.tac-pp-tip.is-sheet .tac-pp-tip__titel {
    font-size: 17px;
    padding-right: 48px;
    margin: 4px 0 16px;
}

.tac-pp-tip.is-sheet .tac-pp-tip__raster {
    gap: 10px;
}

.tac-pp-tip.is-sheet .tac-pp-tip__karte {
    padding: 8px;
}

.tac-pp-tip.is-sheet figcaption {
    font-size: 13px;
}
