/* ============================================================
   Datenschutz-Generator — Hinweisschild Videoüberwachung
   ============================================================ */

/* Die Vorschau ist das Produkt der Seite und bekommt den Platz; das
   Formular braucht nur Adressblock-Breite. */
.ds-layout {
    display: grid;
    grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
    gap: 32px;
    max-width: 1720px;
    align-items: start;
}
@media (max-width: 980px) {
    .ds-layout { grid-template-columns: 1fr; }
    .ds-preview-col { position: static; }
}

.ds-form-card,
.ds-preview-card {
    background: var(--lp-card);
    border: 1px solid var(--lp-border);
    border-radius: var(--dt-radius-card);
    padding: 28px 32px;
}
/* Formular-Sektionen */
.ds-sec + .ds-sec {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--lp-border);
}
.ds-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: var(--dt-fs-section);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.005em;
    color: var(--dt-text);
}
.ds-sec-n {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(31, 111, 235, 0.12);
    color: var(--lp-primary);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-sec-opt {
    color: var(--lp-muted);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* Sticky Vorschau-Spalte + Toolbar */
.ds-preview-col {
    position: sticky;
    top: 16px;
}
.ds-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lp-border);
}
.ds-preview-card .ds-hint {
    text-align: center;
    margin-top: 12px;
}
.ds-preview-scaler .ds-sign {
    box-shadow: 0 6px 22px rgba(20, 30, 50, 0.13);
}
.ds-format-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(31,111,235,0.10);
    color: var(--lp-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ds-form-card input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 4px;
    font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ds-link {
    display: inline-block;
    background: none;
    border: 0;
    padding: 4px 0;
    margin: 0 0 14px;
    color: var(--lp-error-border, #c92a2a);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}
.ds-link[hidden] { display: none; }

.ds-btn-primary:active { transform: translateY(1px); }
.ds-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}
.ds-hint {
    margin: 8px 0 0;
    color: var(--lp-muted);
    font-size: 12.5px;
}

/* ----------------------------------------------------------
   Vorschau-Skalierung: das Schild ist intern A4-quer (1123×794),
   die Vorschau-Karte skaliert es runter, damit es ins Layout passt.
---------------------------------------------------------- */
.ds-preview-scaler {
    overflow: hidden;
    border-radius: 6px;
    background: #f0f2f6;
    padding: 12px;
}

/* ----------------------------------------------------------
   Das eigentliche Hinweisschild
   Maße bei 96dpi: 1123 × 794 px = 297 × 210 mm (A4 quer)
---------------------------------------------------------- */
.ds-sign {
    /* feste Größe für stabilen PDF-Export */
    width: 1123px;
    height: 794px;
    background: #ffffff;
    color: #1a1a1a;
    border: 4px solid #1a1a1a;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 420px 1fr;
    grid-template-rows: 1fr 18px;
    grid-template-areas:
        "left  right"
        "foot  foot";
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    transform-origin: top left;
}

/* Skalierung der Vorschau via JS-gesetztem CSS-Variable */
.ds-preview-scaler { position: relative; }
.ds-preview-scaler .ds-sign {
    /* gewird zur Laufzeit per JS skaliert */
}

/* Linker Block: Hinweisbild (blauer Untergrund passt zur Bildfarbe,
   damit eventuelle Letterbox-Bereiche nahtlos wirken) */
.ds-left {
    grid-area: left;
    background: #005391; /* exakt gleiche Farbe wie der Bildhintergrund */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 18px 14px;
    box-sizing: border-box;
}
.ds-customer-logo {
    display: block;
    max-width: 360px;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.ds-customer-logo[hidden] { display: none; }
/* Feste Pixelmaße statt object-fit, damit html2canvas das Bild korrekt rendert.
   Bild 543×443 → Aspect 1.226. In die 420px breite Spalte passt es als 380×310. */
.ds-left-img {
    display: block;
    width: 380px;
    height: 310px;
}

/* Rechte Spalte: 5 Boxen, Zeilen werden HART auf 1fr begrenzt
   (minmax(0,1fr) verhindert, dass lange Texte die Zeile vergrößern und das Schild auseinandersprengen). */
.ds-right {
    grid-area: right;
    padding: 24px;
    display: grid;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 14px;
    box-sizing: border-box;
    height: 100%;
    overflow: hidden;
    min-height: 0;
}

/* Footer mit DATO-IT Copyright — schmaler, einzeiliger Balken, ohne Trennlinie */
.ds-footer {
    grid-area: foot;
    padding: 0 14px;
    font-size: 9.5px;
    line-height: 18px;
    color: #5b6776;
    text-align: right;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ds-box {
    border: 2px solid #1a1a1a;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    min-height: 0;
}
.ds-label {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.25;
}
.ds-value {
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.35;
    white-space: pre-wrap;
    flex: 1;
    word-break: break-word;
}
