/**
 * Frontend Stylesheet – 3D-Druck Kalkulator
 * Styles für den Kalkulator auf der WordPress-Frontend-Seite
 *
 * @package ThreeDDruckKalkulator
 */

/* ═══════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
════════════════════════════════════════════════════════════ */

.tdd-kalkulator {
    --tdd-primary:        #2271b1;
    --tdd-primary-dark:   #135e96;
    --tdd-primary-light:  #dbeafe;
    --tdd-success:        #16a34a;
    --tdd-success-light:  #dcfce7;
    --tdd-warning:        #d97706;
    --tdd-warning-light:  #fef3c7;
    --tdd-danger:         #dc2626;
    --tdd-danger-light:   #fee2e2;
    --tdd-gray-50:        #f9fafb;
    --tdd-gray-100:       #f3f4f6;
    --tdd-gray-200:       #e5e7eb;
    --tdd-gray-300:       #d1d5db;
    --tdd-gray-400:       #9ca3af;
    --tdd-gray-500:       #6b7280;
    --tdd-gray-600:       #4b5563;
    --tdd-gray-700:       #374151;
    --tdd-gray-900:       #111827;
    --tdd-white:          #ffffff;
    --tdd-radius:         10px;
    --tdd-radius-sm:      6px;
    --tdd-shadow:         0 2px 12px rgba(0,0,0,.08);
    --tdd-shadow-lg:      0 8px 32px rgba(0,0,0,.12);
    --tdd-transition:     all .2s ease;
    --tdd-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   2. RESET & BASIS
════════════════════════════════════════════════════════════ */

.tdd-kalkulator *,
.tdd-kalkulator *::before,
.tdd-kalkulator *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tdd-kalkulator {
    font-family:  var(--tdd-font);
    font-size:    15px;
    line-height:  1.6;
    color:        var(--tdd-gray-900);
    max-width:    860px;
    margin:       0 auto;
}

.tdd-kalkulator a {
    color: var(--tdd-primary);
    text-decoration: none;
}

.tdd-kalkulator a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   3. DSGVO HINWEIS
════════════════════════════════════════════════════════════ */

.tdd-dsgvo-notice {
    display:       flex;
    align-items:   flex-start;
    gap:           12px;
    background:    #eff6ff;
    border:        1px solid #bfdbfe;
    border-left:   4px solid var(--tdd-primary);
    border-radius: 0 var(--tdd-radius-sm) var(--tdd-radius-sm) 0;
    padding:       14px 18px;
    font-size:     13px;
    color:         #1e40af;
    margin-bottom: 20px;
    line-height:   1.5;
}

.tdd-dsgvo-icon {
    font-size:  18px;
    flex-shrink: 0;
    margin-top:  1px;
}

.tdd-dsgvo-notice p { margin: 0; }

.tdd-dsgvo-notice a {
    color:           #1d4ed8;
    font-weight:     600;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   4. SEKTIONEN
════════════════════════════════════════════════════════════ */

.tdd-section {
    background:    var(--tdd-white);
    border:        1px solid var(--tdd-gray-200);
    border-radius: var(--tdd-radius);
    padding:       28px 32px;
    margin-bottom: 20px;
    box-shadow:    var(--tdd-shadow);
    transition:    var(--tdd-transition);
}

.tdd-section:hover {
    box-shadow: var(--tdd-shadow-lg);
}

.tdd-section h2 {
    font-size:     20px;
    font-weight:   700;
    color:         var(--tdd-gray-900);
    margin-bottom: 6px;
    display:       flex;
    align-items:   center;
    gap:           8px;
}

.tdd-subtitle {
    font-size:     14px;
    color:         var(--tdd-gray-500);
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   5. DROPZONE
════════════════════════════════════════════════════════════ */

.tdd-dropzone {
    position:      relative;
    border:        2px dashed var(--tdd-gray-300);
    border-radius: var(--tdd-radius);
    padding:       48px 24px;
    text-align:    center;
    cursor:        pointer;
    transition:    var(--tdd-transition);
    background:    var(--tdd-gray-50);
    overflow:      hidden;
}

.tdd-dropzone:hover,
.tdd-dropzone:focus {
    border-color: var(--tdd-primary);
    background:   var(--tdd-primary-light);
    outline:      none;
}

.tdd-dropzone.tdd-dragover {
    border-color:  var(--tdd-primary);
    background:    var(--tdd-primary-light);
    transform:     scale(1.01);
    box-shadow:    0 0 0 4px rgba(34,113,177,.15);
}

.tdd-dropzone-icon {
    font-size:     48px;
    margin-bottom: 12px;
    display:       block;
    line-height:   1;
    transition:    transform .2s ease;
}

.tdd-dropzone:hover .tdd-dropzone-icon {
    transform: translateY(-4px);
}

.tdd-dropzone p {
    margin:    4px 0;
    color:     var(--tdd-gray-600);
    font-size: 15px;
}

.tdd-dropzone p strong {
    color: var(--tdd-gray-900);
}

.tdd-small {
    font-size: 12px !important;
    color:     var(--tdd-gray-400) !important;
}

/* Datei-Input versteckt */
#tdd-file-input {
    position:   absolute;
    inset:      0;
    opacity:    0;
    cursor:     pointer;
    width:      100%;
    height:     100%;
}

/* Hochgeladen Feedback */
.tdd-file-uploaded {
    color:       var(--tdd-success);
    font-size:   15px;
    line-height: 1.6;
}

.tdd-file-uploaded small {
    color:     var(--tdd-gray-400);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   6. FORTSCHRITTSBALKEN
════════════════════════════════════════════════════════════ */

.tdd-progress {
    margin-top:    16px;
    background:    var(--tdd-gray-100);
    border-radius: 20px;
    height:        8px;
    overflow:      hidden;
    position:      relative;
}

.tdd-progress-bar {
    height:        100%;
    background:    linear-gradient(90deg, var(--tdd-primary), #60a5fa);
    border-radius: 20px;
    transition:    width .3s ease;
    width:         0%;
}

#tdd-progress-text {
    display:    block;
    text-align: center;
    font-size:  12px;
    color:      var(--tdd-gray-500);
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════
   7. FEHLERMELDUNG
════════════════════════════════════════════════════════════ */

.tdd-error {
    display:        flex;
    align-items:    center;
    gap:            10px;
    background:     var(--tdd-danger-light);
    border:         1px solid #fca5a5;
    border-left:    4px solid var(--tdd-danger);
    border-radius:  0 var(--tdd-radius-sm) var(--tdd-radius-sm) 0;
    padding:        12px 16px;
    font-size:      13px;
    color:          #991b1b;
    margin-top:     14px;
}

.tdd-error::before {
    content:    '❌';
    flex-shrink: 0;
    font-size:  16px;
}

/* ═══════════════════════════════════════════════════════════
   8. STEP-HINWEIS
════════════════════════════════════════════════════════════ */

.tdd-step-notice {
    display:        flex;
    align-items:    flex-start;
    gap:            12px;
    background:     #fefce8;
    border:         1px solid #fde68a;
    border-left:    4px solid var(--tdd-warning);
    border-radius:  0 var(--tdd-radius-sm) var(--tdd-radius-sm) 0;
    padding:        14px 18px;
    font-size:      13px;
    color:          #78350f;
    margin-top:     14px;
}

.tdd-step-notice span:first-child {
    font-size:  22px;
    flex-shrink: 0;
    margin-top:  2px;
}

.tdd-step-notice strong {
    display:  block;
    color:    #92400e;
}

.tdd-step-notice small {
    font-size: 12px;
    opacity:   .85;
}

/* ═══════════════════════════════════════════════════════════
   9. 3D-VIEWER
════════════════════════════════════════════════════════════ */

.tdd-viewer-container {
    position:      relative;
    background:    #1a1a2e;
    border-radius: var(--tdd-radius-sm);
    overflow:      hidden;
    aspect-ratio:  16 / 9;
    max-height:    400px;
}

#tdd-3d-canvas {
    width:  100% !important;
    height: 100% !important;
    display: block;
}

.tdd-viewer-controls {
    position:   absolute;
    bottom:     12px;
    right:      12px;
    display:    flex;
    gap:        8px;
    flex-wrap:  wrap;
    justify-content: flex-end;
}

.tdd-btn-small {
    background:    rgba(255,255,255,.15);
    border:        1px solid rgba(255,255,255,.25);
    border-radius: var(--tdd-radius-sm);
    color:         #fff;
    font-size:     11px;
    font-weight:   600;
    padding:       6px 12px;
    cursor:        pointer;
    transition:    var(--tdd-transition);
    backdrop-filter: blur(4px);
    letter-spacing: .3px;
}

.tdd-btn-small:hover {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.4);
}

/* ═══════════════════════════════════════════════════════════
   10. MODELL-ANALYSE INFO-KARTEN
════════════════════════════════════════════════════════════ */

.tdd-info-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap:                   12px;
}

.tdd-info-card {
    background:    var(--tdd-gray-50);
    border:        1px solid var(--tdd-gray-200);
    border-radius: var(--tdd-radius-sm);
    padding:       16px;
    display:       flex;
    flex-direction: column;
    gap:           6px;
    transition:    var(--tdd-transition);
}

.tdd-info-card:hover {
    border-color: var(--tdd-primary);
    background:   var(--tdd-primary-light);
}

.tdd-info-label {
    font-size:   11px;
    font-weight: 700;
    color:       var(--tdd-gray-400);
    text-transform: uppercase;
    letter-spacing: .6px;
}

.tdd-info-value {
    font-size:   16px;
    font-weight: 700;
    color:       var(--tdd-gray-900);
    line-height: 1.2;
    word-break:  break-word;
}

/* ═══════════════════════════════════════════════════════════
   11. KONFIGURATIONSFORMULAR
════════════════════════════════════════════════════════════ */

.tdd-form-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   20px 28px;
    margin-bottom:         24px;
}

@media (max-width: 600px) {
    .tdd-form-grid {
        grid-template-columns: 1fr;
    }
}

.tdd-field {
    display:        flex;
    flex-direction: column;
    gap:            8px;
}

.tdd-field label {
    font-size:   13px;
    font-weight: 600;
    color:       var(--tdd-gray-700);
    line-height: 1.3;
}

/* ── Select ── */
.tdd-field select {
    width:         100%;
    padding:       10px 14px;
    border:        1px solid var(--tdd-gray-300);
    border-radius: var(--tdd-radius-sm);
    font-size:     14px;
    color:         var(--tdd-gray-900);
    background:    var(--tdd-white);
    cursor:        pointer;
    transition:    var(--tdd-transition);
    appearance:    none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat:   no-repeat;
    background-position: right 12px center;
    padding-right:       36px;
}

.tdd-field select:focus {
    outline:      none;
    border-color: var(--tdd-primary);
    box-shadow:   0 0 0 3px rgba(34,113,177,.15);
}

/* ── Range Slider ── */
.tdd-field input[type="range"] {
    width:        100%;
    height:       6px;
    background:   var(--tdd-gray-200);
    border-radius: 20px;
    outline:      none;
    cursor:       pointer;
    appearance:   none;
    transition:   var(--tdd-transition);
}

.tdd-field input[type="range"]::-webkit-slider-thumb {
    appearance:    none;
    width:         20px;
    height:        20px;
    border-radius: 50%;
    background:    var(--tdd-primary);
    border:        3px solid var(--tdd-white);
    box-shadow:    0 1px 4px rgba(0,0,0,.2);
    cursor:        pointer;
    transition:    var(--tdd-transition);
}

.tdd-field input[type="range"]::-webkit-slider-thumb:hover {
    background:    var(--tdd-primary-dark);
    transform:     scale(1.15);
}

.tdd-field input[type="range"]::-moz-range-thumb {
    width:         20px;
    height:        20px;
    border-radius: 50%;
    background:    var(--tdd-primary);
    border:        3px solid var(--tdd-white);
    box-shadow:    0 1px 4px rgba(0,0,0,.2);
    cursor:        pointer;
}

/* ── Range Labels ── */
.tdd-range-labels {
    display:         flex;
    justify-content: space-between;
    font-size:       11px;
    color:           var(--tdd-gray-400);
    margin-top:      2px;
}

/* ── Field Hint ── */
.tdd-field-hint {
    font-size:  12px !important;
    color:      var(--tdd-gray-400) !important;
    margin-top: 2px !important;
}

/* ═══════════════════════════════════════════════════════════
   12. STÜCKZAHL
════════════════════════════════════════════════════════════ */

.tdd-quantity {
    display:     flex;
    align-items: center;
    gap:         8px;
}

.tdd-qty-btn {
    width:         36px;
    height:        36px;
    border:        1px solid var(--tdd-gray-300);
    border-radius: var(--tdd-radius-sm);
    background:    var(--tdd-white);
    font-size:     18px;
    font-weight:   600;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    var(--tdd-transition);
    color:         var(--tdd-gray-700);
    flex-shrink:   0;
    line-height:   1;
}

.tdd-qty-btn:hover {
    background:   var(--tdd-primary);
    border-color: var(--tdd-primary);
    color:        var(--tdd-white);
}

.tdd-qty-btn:active {
    transform: scale(.95);
}

.tdd-quantity input[type="number"] {
    width:         72px;
    height:        36px;
    border:        1px solid var(--tdd-gray-300);
    border-radius: var(--tdd-radius-sm);
    text-align:    center;
    font-size:     15px;
    font-weight:   600;
    color:         var(--tdd-gray-900);
    background:    var(--tdd-white);
    transition:    var(--tdd-transition);
    -moz-appearance: textfield;
}

.tdd-quantity input[type="number"]::-webkit-inner-spin-button,
.tdd-quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.tdd-quantity input[type="number"]:focus {
    outline:      none;
    border-color: var(--tdd-primary);
    box-shadow:   0 0 0 3px rgba(34,113,177,.15);
}

.tdd-quantity-small .tdd-qty-btn {
    width:  30px;
    height: 30px;
}

.tdd-quantity-small input[type="number"] {
    width:  60px;
    height: 30px;
}

/* ═══════════════════════════════════════════════════════════
   13. NACHBEARBEITUNG
════════════════════════════════════════════════════════════ */

.tdd-nacharbeit {
    grid-column: 1 / -1;
}

.tdd-nacharbeit legend,
.tdd-nacharbeit > label:first-child {
    font-size:     13px;
    font-weight:   600;
    color:         var(--tdd-gray-700);
    margin-bottom: 10px;
    display:       block;
}

.tdd-checkbox-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap:                   10px;
}

.tdd-checkbox {
    display:       flex;
    align-items:   flex-start;
    gap:           10px;
    padding:       12px 14px;
    border:        1px solid var(--tdd-gray-200);
    border-radius: var(--tdd-radius-sm);
    cursor:        pointer;
    transition:    var(--tdd-transition);
    background:    var(--tdd-white);
    font-size:     13px;
    color:         var(--tdd-gray-700);
    line-height:   1.4;
}

.tdd-checkbox:hover {
    border-color: var(--tdd-primary);
    background:   var(--tdd-primary-light);
}

.tdd-checkbox input[type="checkbox"] {
    width:         16px;
    height:        16px;
    flex-shrink:   0;
    accent-color:  var(--tdd-primary);
    cursor:        pointer;
    margin-top:    2px;
}

.tdd-checkbox span {
    line-height: 1.4;
}

.tdd-checkbox:has(input:checked) {
    border-color: var(--tdd-primary);
    background:   var(--tdd-primary-light);
    color:        var(--tdd-primary-dark);
}

/* ── Gewindeeinsätze Unterfeld ── */
.tdd-sub-field {
    background:    var(--tdd-gray-50);
    border:        1px solid var(--tdd-gray-200);
    border-radius: var(--tdd-radius-sm);
    padding:       14px 16px;
    margin-top:    10px;
    display:       flex;
    align-items:   center;
    gap:           14px;
    flex-wrap:     wrap;
}

.tdd-sub-field label {
    font-size:   13px;
    font-weight: 600;
    color:       var(--tdd-gray-700);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   14. HAUPT-BUTTON
════════════════════════════════════════════════════════════ */

.tdd-btn-primary {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    background:      linear-gradient(135deg, var(--tdd-primary) 0%, var(--tdd-primary-dark) 100%);
    color:           var(--tdd-white);
    border:          none;
    border-radius:   var(--tdd-radius-sm);
    padding:         14px 32px;
    font-size:       16px;
    font-weight:     700;
    cursor:          pointer;
    transition:      var(--tdd-transition);
    letter-spacing:  .3px;
    box-shadow:      0 2px 8px rgba(34,113,177,.3);
    width:           100%;
    margin-top:      8px;
}

.tdd-btn-primary:hover {
    background:  linear-gradient(135deg, var(--tdd-primary-dark) 0%, #0e4f82 100%);
    box-shadow:  0 4px 16px rgba(34,113,177,.4);
    transform:   translateY(-1px);
}

.tdd-btn-primary:active {
    transform:   translateY(0);
    box-shadow:  0 2px 8px rgba(34,113,177,.3);
}

.tdd-btn-primary:disabled {
    opacity: .65;
    cursor:  not-allowed;
    transform: none;
}

.tdd-btn-secondary {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    background:      var(--tdd-white);
    color:           var(--tdd-gray-700);
    border:          1px solid var(--tdd-gray-300);
    border-radius:   var(--tdd-radius-sm);
    padding:         12px 24px;
    font-size:       14px;
    font-weight:     600;
    cursor:          pointer;
    transition:      var(--tdd-transition);
}

.tdd-btn-secondary:hover {
    background:   var(--tdd-gray-50);
    border-color: var(--tdd-gray-400);
    color:        var(--tdd-gray-900);
}

/* ═══════════════════════════════════════════════════════════
   15. ERGEBNIS-SECTION
════════════════════════════════════════════════════════════ */

.tdd-result-section {
    border-color: var(--tdd-success);
    border-width: 2px;
}

.tdd-result-section h2 {
    color: var(--tdd-success);
}

.tdd-result-breakdown {
    margin-bottom: 20px;
}

.tdd-result-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         10px 0;
    border-bottom:   1px solid var(--tdd-gray-100);
    font-size:       14px;
    gap:             12px;
}

.tdd-result-row:last-child {
    border-bottom: none;
}

.tdd-result-row span:first-child {
    color: var(--tdd-gray-600);
}

.tdd-result-row span:last-child {
    font-weight: 600;
    color:       var(--tdd-gray-900);
    white-space: nowrap;
}

.tdd-result-divider {
    height:     1px;
    background: var(--tdd-gray-200);
    margin:     8px 0;
}

.tdd-result-subtotal span:last-child {
    font-size:   16px;
    font-weight: 700;
    color:       var(--tdd-gray-900);
}

.tdd-result-total {
    padding:    14px 0 !important;
    margin-top: 4px;
}

.tdd-result-total span:first-child {
    font-size:   16px;
    font-weight: 700;
    color:       var(--tdd-gray-900) !important;
}

.tdd-result-total span:last-child {
    font-size:   24px !important;
    font-weight: 800 !important;
    color:       var(--tdd-success) !important;
}

.tdd-green {
    color: var(--tdd-success) !important;
}

.tdd-mwst {
    font-size:     12px;
    color:         var(--tdd-gray-400);
    margin-bottom: 16px;
}

.tdd-result-actions {
    display:         flex;
    justify-content: flex-end;
    gap:             12px;
    flex-wrap:       wrap;
}

/* ═══════════════════════════════════════════════════════════
   16. ANGEBOT ANFORDERN
════════════════════════════════════════════════════════════ */

.tdd-quote-toggle {
    width:           100%;
    padding:         16px 24px;
    background:      linear-gradient(135deg, var(--tdd-success) 0%, #15803d 100%);
    color:           var(--tdd-white);
    border:          none;
    border-radius:   var(--tdd-radius-sm);
    font-size:       16px;
    font-weight:     700;
    cursor:          pointer;
    transition:      var(--tdd-transition);
    letter-spacing:  .3px;
    box-shadow:      0 2px 8px rgba(22,163,74,.3);
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             10px;
}

.tdd-quote-toggle:hover {
    background:  linear-gradient(135deg, #15803d 0%, #166534 100%);
    box-shadow:  0 4px 16px rgba(22,163,74,.4);
    transform:   translateY(-1px);
}

.tdd-quote-toggle[aria-expanded="true"] {
    border-radius: var(--tdd-radius-sm) var(--tdd-radius-sm) 0 0;
}

/* ── Angebot Formular Wrapper ── */
#tdd-quote-form-wrapper {
    background:    var(--tdd-gray-50);
    border:        1px solid var(--tdd-gray-200);
    border-top:    none;
    border-radius: 0 0 var(--tdd-radius-sm) var(--tdd-radius-sm);
    padding:       24px 28px;
}

#tdd-quote-form-wrapper h3 {
    font-size:     18px;
    font-weight:   700;
    color:         var(--tdd-gray-900);
    margin-bottom: 16px;
}

/* ── Zusammenfassung ── */
.tdd-quote-summary {
    background:    var(--tdd-white);
    border:        1px solid var(--tdd-gray-200);
    border-radius: var(--tdd-radius-sm);
    padding:       16px 20px;
    font-size:     13px;
    color:         var(--tdd-gray-700);
    margin-bottom: 20px;
    line-height:   1.7;
}

.tdd-quote-price-highlight {
    display:       block;
    margin-top:    10px;
    padding-top:   10px;
    border-top:    1px solid var(--tdd-gray-200);
    font-size:     16px;
    font-weight:   700;
    color:         var(--tdd-success);
}

/* ── Formular-Zeilen ── */
.tdd-quote-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:     16px;
    margin-bottom: 16px;
}

@media (max-width: 560px) {
    .tdd-quote-row {
        grid-template-columns: 1fr;
    }
}

.tdd-quote-field {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.tdd-quote-field.full-width {
    grid-column: 1 / -1;
}

.tdd-quote-field label {
    font-size:   13px;
    font-weight: 600;
    color:       var(--tdd-gray-700);
}

/* ── Inputs ── */
.tdd-quote-field input[type="text"],
.tdd-quote-field input[type="email"],
.tdd-quote-field input[type="tel"],
.tdd-quote-field textarea {
    width:         100%;
    padding:       10px 14px;
    border:        1px solid var(--tdd-gray-300);
    border-radius: var(--tdd-radius-sm);
    font-size:     14px;
    font-family:   var(--tdd-font);
    color:         var(--tdd-gray-900);
    background:    var(--tdd-white);
    transition:    var(--tdd-transition);
    line-height:   1.5;
}

.tdd-quote-field input:focus,
.tdd-quote-field textarea:focus {
    outline:      none;
    border-color: var(--tdd-primary);
    box-shadow:   0 0 0 3px rgba(34,113,177,.15);
}

.tdd-quote-field textarea {
    resize:     vertical;
    min-height: 100px;
}

/* ── Zeichenzähler ── */
.tdd-char-count {
    font-size:  11px;
    color:      var(--tdd-gray-400);
    text-align: right;
    margin-top: 4px;
}

/* ── Pflichtfeld ── */
.required {
    color: var(--tdd-danger);
}

.tdd-optional {
    font-size:   12px;
    font-weight: 400;
    color:       var(--tdd-gray-400);
}

/* ── Honeypot verstecken ── */
.tdd-hp-field {
    position:   absolute;
    left:       -9999px;
    top:        -9999px;
    opacity:    0;
    pointer-events: none;
    tab-index:  -1;
}

/* ── Datenschutz Checkbox ── */
.tdd-quote-privacy {
    margin:        20px 0;
    padding:       16px 20px;
    background:    #eff6ff;
    border:        1px solid #bfdbfe;
    border-radius: var(--tdd-radius-sm);
}

.tdd-privacy-info {
    font-size:     13px;
    color:         #1e40af;
    margin-bottom: 12px;
    line-height:   1.5;
}

.tdd-privacy-checkbox-wrap {
    display:     flex;
    align-items: flex-start;
    gap:         10px;
}

.tdd-privacy-checkbox-wrap input[type="checkbox"] {
    width:        18px;
    height:       18px;
    flex-shrink:  0;
    accent-color: var(--tdd-primary);
    cursor:       pointer;
    margin-top:   2px;
}

.tdd-privacy-checkbox-wrap label {
    font-size:  13px;
    color:      #1e3a8a;
    cursor:     pointer;
    line-height: 1.5;
}

.tdd-privacy-revoke {
    font-size:  12px;
    color:      #3b82f6;
    margin-top: 10px;
}

.tdd-privacy-revoke a {
    color: #1d4ed8;
}

/* ── Submit Button ── */
.tdd-quote-submit {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    background:      linear-gradient(135deg, var(--tdd-success) 0%, #15803d 100%);
    color:           var(--tdd-white);
    border:          none;
    border-radius:   var(--tdd-radius-sm);
    padding:         14px 32px;
    font-size:       15px;
    font-weight:     700;
    cursor:          pointer;
    transition:      var(--tdd-transition);
    width:           100%;
    letter-spacing:  .3px;
    box-shadow:      0 2px 8px rgba(22,163,74,.3);
}

.tdd-quote-submit:hover:not(:disabled) {
    background:  linear-gradient(135deg, #15803d 0%, #166534 100%);
    box-shadow:  0 4px 16px rgba(22,163,74,.4);
    transform:   translateY(-1px);
}

.tdd-quote-submit:disabled {
    opacity: .65;
    cursor:  not-allowed;
    transform: none;
}

/* ── Spinner ── */
.tdd-spinner {
    display:       inline-block;
    width:         16px;
    height:        16px;
    border:        2px solid rgba(255,255,255,.4);
    border-top:    2px solid var(--tdd-white);
    border-radius: 50%;
    animation:     tdd-spin .7s linear infinite;
}

@keyframes tdd-spin {
    to { transform: rotate(360deg); }
}

/* ── Statusmeldungen ── */
.tdd-quote-message {
    margin-top:    14px;
    padding:       14px 18px;
    border-radius: var(--tdd-radius-sm);
    font-size:     14px;
    font-weight:   500;
    line-height:   1.5;
}

.tdd-quote-message.success {
    background:  var(--tdd-success-light);
    border:      1px solid #86efac;
    border-left: 4px solid var(--tdd-success);
    color:       #166534;
}

.tdd-quote-message.error {
    background:  var(--tdd-danger-light);
    border:      1px solid #fca5a5;
    border-left: 4px solid var(--tdd-danger);
    color:       #991b1b;
}

/* ═══════════════════════════════════════════════════════════
   17. RESPONSIVE
════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

    .tdd-section {
        padding:       20px 18px;
        border-radius: var(--tdd-radius-sm);
    }

    .tdd-section h2 {
        font-size: 17px;
    }

    .tdd-dropzone {
        padding: 32px 16px;
    }

    .tdd-dropzone-icon {
        font-size: 36px;
    }

    .tdd-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tdd-result-total span:last-child {
        font-size: 20px !important;
    }

    #tdd-quote-form-wrapper {
        padding: 18px 16px;
    }

    .tdd-btn-primary,
    .tdd-quote-submit {
        padding:   12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 400px) {

    .tdd-info-grid {
        grid-template-columns: 1fr;
    }

    .tdd-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .tdd-viewer-controls {
        bottom:    8px;
        right:     8px;
    }

    .tdd-btn-small {
        font-size: 10px;
        padding:   5px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   18. DARK MODE
════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {

    .tdd-kalkulator {
        --tdd-gray-50:  #1f2937;
        --tdd-gray-100: #111827;
        --tdd-gray-200: #374151;
        --tdd-gray-300: #4b5563;
        --tdd-gray-400: #6b7280;
        --tdd-gray-500: #9ca3af;
        --tdd-gray-600: #d1d5db;
        --tdd-gray-700: #e5e7eb;
        --tdd-gray-900: #f9fafb;
        --tdd-white:    #1f2937;
    }

    .tdd-section {
        background:   #1f2937;
        border-color: #374151;
    }

    .tdd-dropzone {
        background:   #111827;
        border-color: #374151;
    }

    .tdd-info-card {
        background:   #111827;
        border-color: #374151;
    }

    .tdd-quote-privacy {
        background:   #1e3a5f;
        border-color: #1e40af;
    }

    .tdd-quote-field input,
    .tdd-quote-field textarea {
        background:   #111827;
        border-color: #374151;
        color:        #f9fafb;
    }

    .tdd-checkbox {
        background:   #111827;
        border-color: #374151;
        color:        #e5e7eb;
    }

    #tdd-quote-form-wrapper {
        background:   #111827;
        border-color: #374151;
    }

    .tdd-quote-summary {
        background:   #1f2937;
        border-color: #374151;
        color:        #d1d5db;
    }

    .tdd-dsgvo-notice {
        background:  #1e3a5f;
        border-color: #1e40af;
        color:        #93c5fd;
    }
}

/* ═══════════════════════════════════════════════════════════
   19. PRINT
════════════════════════════════════════════════════════════ */

@media print {

    .tdd-dropzone,
    .tdd-viewer-container,
    .tdd-btn-primary,
    .tdd-btn-secondary,
    .tdd-quote-toggle,
    #tdd-quote-form-wrapper,
    .tdd-result-actions {
        display: none !important;
    }

    .tdd-section {
        box-shadow:  none;
        border:      1px solid #ddd;
        break-inside: avoid;
    }

    .tdd-result-section {
        border-color: #000;
    }
}

/* ═══════════════════════════════════════════════════════════
   20. ANIMATIONEN
════════════════════════════════════════════════════════════ */

@keyframes tdd-fade-in {
    from {
        opacity:   0;
        transform: translateY(10px);
    }
    to {
        opacity:   1;
        transform: translateY(0);
    }
}

@keyframes tdd-slide-down {
    from {
        opacity:   0;
        transform: translateY(-8px);
    }
    to {
        opacity:   1;
        transform: translateY(0);
    }
}

.tdd-section {
    animation: tdd-fade-in .3s ease both;
}

#tdd-file-info   { animation-delay: .05s; }
#tdd-config      { animation-delay: .10s; }
#tdd-result      { animation-delay: .05s; }

/* ── Reduzierte Bewegung ── */
@media (prefers-reduced-motion: reduce) {

    .tdd-kalkulator *,
    .tdd-kalkulator *::before,
    .tdd-kalkulator *::after {
        animation-duration:        0.01ms !important;
        animation-iteration-count: 1      !important;
        transition-duration:       0.01ms !important;
    }
}