/* Tassenfuzzi Design-Hilfe: Hilfe-Button, Modal, Inaktivitaets-Banner.
   Eigenstaendiges Stylesheet, tastet keine bestehenden Designer-Klassen an. */

.tf-designhelp-launcher {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 28px;
    background: #66bb6a; /* hellgruen */
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 17px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.tf-designhelp-launcher:hover {
    background: #4caf50;
}

.tf-designhelp-launcher .tf-designhelp-icon {
    font-size: 22px;
}

.tf-designhelp-launcher-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    opacity: 0.8;
}

.tf-designhelp-launcher-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

/* Minimierter Zustand: nur noch rundes Icon, nachdem der Kunde weggeklickt hat */
.tf-designhelp-launcher.tf-collapsed {
    padding: 14px;
    gap: 0;
}

.tf-designhelp-launcher.tf-collapsed .tf-designhelp-icon {
    font-size: 20px;
}

/* Honeypot-Feld: fuer echte Nutzer unsichtbar, fuer einfache Bots offen sichtbar im DOM */
.tf-designhelp-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

.tf-designhelp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 16px;
}

.tf-designhelp-overlay.tf-open {
    display: flex;
}

.tf-designhelp-box {
    background: #fff;
    color: #222;
    max-width: 420px;
    width: 100%;
    padding: 24px;
    border-radius: 10px;
    position: relative;
    font-family: inherit;
    max-height: 90vh;
    overflow-y: auto;
}

.tf-designhelp-box h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.tf-designhelp-box p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px;
}

.tf-designhelp-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

#tf-designhelp-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
}

#tf-designhelp-form input[type="text"],
#tf-designhelp-form input[type="email"],
#tf-designhelp-form textarea {
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

#tf-designhelp-form input[type="file"] {
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
}

.tf-designhelp-file-info {
    font-size: 12px;
    color: #555;
    margin: 4px 0 10px;
    min-height: 1em;
    word-break: break-word;
}

.tf-designhelp-file-info.tf-error {
    color: #c0392b;
}

.tf-designhelp-submit {
    width: 100%;
    padding: 10px;
    background: #7a1f2b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.tf-designhelp-submit:hover {
    background: #611722;
}

.tf-designhelp-status {
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 1em;
}

.tf-designhelp-privacy {
    font-size: 11px;
    color: #777;
    margin-top: 10px;
}

.tf-designhelp-privacy a {
    color: #777;
}

/* Inaktivitaets-Banner */
.tf-designhelp-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9997;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e2c8cc;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tf-designhelp-banner.tf-open {
    opacity: 1;
    transform: translateY(0);
}

.tf-designhelp-banner-cta {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: #7a1f2b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.tf-designhelp-banner-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
}

@media (max-width: 480px) {
    .tf-designhelp-launcher span.tf-designhelp-label {
        display: none;
    }
}

/* ---------------------------------------------------------------------
   Fix: Designer-Layout ueberragt das Browserfenster auf normalen
   Laptop-Breiten (z.B. 1366px, 1440px) -- unabhaengig von der
   Design-Hilfe-Funktion, aber im selben, ohnehin schon eingebundenen
   Stylesheet mit erledigt, um KEINE Biztech-Dateien anfassen zu muessen.

   Ursache: .byi-wrap hat position:absolute ohne explizite Breite, wird
   also vom Browser per "shrink-to-fit" auf Basis des Inhalts (u.a. eine
   540px breite Vorschau-Box) berechnet -- das ergibt ca. 1800px, egal
   wie breit das tatsaechliche Fenster ist. Ab ca. 1800px Fensterbreite
   faellt das nicht auf, darunter ragt die Seite seitlich raus.

   Fix: explizite Breite setzen, damit der Designer sich am tatsaechlichen
   Fenster orientiert statt am eigenen (zu breiten) Inhalt. Falls einzelne
   fest-breite Elemente darin (z.B. die Vorschau-Box) selbst nicht
   schrumpfen koennen, scrollt nur der Designer-Bereich horizontal statt
   der ganzen Seite. */
.byi-body .byi-wrap {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
}
