/* ==========================================================================
   SeSoft IT-Haftungscheck — Frontend Styles
   ========================================================================== */

.sghc-wizard {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* Progress Bar
   ========================================================================== */

.sghc-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
    position: relative;
}

.sghc-progress::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #dee2e6;
    z-index: 0;
}

.sghc-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.sghc-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    transition: background 0.3s, color 0.3s;
}

.sghc-progress-step.active .sghc-step-number,
.sghc-progress-step.done .sghc-step-number {
    background: #2c3e50;
    color: #fff;
}

.sghc-progress-step.done .sghc-step-number {
    background: #28a745;
}

.sghc-step-label {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.sghc-progress-step.active .sghc-step-label {
    color: #2c3e50;
    font-weight: 600;
}

/* Steps Container
   ========================================================================== */

.sghc-step {
    display: none;
}

.sghc-step.active {
    display: block;
}

.sghc-step h2 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.sghc-subtitle {
    color: #6c757d;
    margin-bottom: 24px;
}

/* Product Rows (Step 1)
   ========================================================================== */

.sghc-produkt-row {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.sghc-produkt-row:hover {
    border-color: #adb5bd;
}

.sghc-row-fields {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sghc-field {
    flex: 1;
    min-width: 150px;
}

.sghc-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.sghc-field select,
.sghc-field input[type="text"],
.sghc-field input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sghc-field select:focus,
.sghc-field input:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.15);
}

.sghc-field-remove {
    flex: 0 0 auto;
    min-width: auto;
}

.sghc-btn-remove {
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    color: #dc3545;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sghc-btn-remove:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.sghc-add-buttons {
    margin: 16px 0;
}

/* Buttons
   ========================================================================== */

.sghc-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}

.sghc-btn:active {
    transform: scale(0.98);
}

.sghc-btn-primary {
    background: #2c3e50;
    color: #fff;
}

.sghc-btn-primary:hover {
    background: #1a252f;
}

.sghc-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.sghc-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.sghc-btn-secondary:hover {
    background: #dee2e6;
}

.sghc-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Results Table (Step 2)
   ========================================================================== */

.sghc-ergebnis-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.sghc-ergebnis-table th,
.sghc-ergebnis-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.sghc-ergebnis-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sghc-ergebnis-table tr:hover td {
    background: #f8f9fa;
}

.sghc-ergebnis-table .sghc-ki-marker {
    font-size: 11px;
    color: #856404;
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

/* Traffic Light Circles
   ========================================================================== */

.sghc-ampel-circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    vertical-align: middle;
}

.sghc-ampel-gruen { background: #28a745; }
.sghc-ampel-gelb  { background: #ffc107; }
.sghc-ampel-rot   { background: #dc3545; }
.sghc-ampel-grau  { background: #6c757d; }

/* Overall Result
   ========================================================================== */

.sghc-gesamt-ergebnis {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin: 20px 0;
}

.sghc-gesamt-ampel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sghc-gesamt-ampel .sghc-ampel-circle {
    width: 40px;
    height: 40px;
}

.sghc-gesamt-label {
    font-size: 18px;
    font-weight: 700;
}

.sghc-teaser-text {
    color: #495057;
    max-width: 600px;
    margin: 0 auto;
}

/* Lead Form (Step 3)
   ========================================================================== */

.sghc-form-row {
    margin-bottom: 16px;
}

.sghc-form-row .sghc-field {
    min-width: auto;
}

.sghc-checkboxes {
    margin-top: 20px;
}

.sghc-checkbox-field {
    margin-bottom: 12px;
}

.sghc-checkbox-field label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.sghc-checkbox-field input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.sghc-checkbox-field a {
    color: #2c3e50;
    text-decoration: underline;
}

/* Thank You (Step 4)
   ========================================================================== */

.sghc-danke {
    text-align: center;
    padding: 40px 20px;
}

.sghc-danke-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.sghc-danke h2 {
    color: #28a745;
}

.sghc-danke-text {
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 12px;
}

.sghc-danke-hinweis {
    color: #6c757d;
    font-size: 14px;
}

/* Loading / Spinner
   ========================================================================== */

.sghc-loading {
    text-align: center;
    padding: 40px 20px;
}

.sghc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #2c3e50;
    border-radius: 50%;
    animation: sghc-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.sghc-loading-text {
    color: #6c757d;
    font-size: 14px;
}

/* Error Messages
   ========================================================================== */

.sghc-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 14px;
}

/* Field validation errors */
.sghc-field-error {
    border-color: #dc3545 !important;
}

.sghc-field-error-msg {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .sghc-wizard {
        padding: 12px;
    }

    .sghc-row-fields {
        flex-direction: column;
        gap: 8px;
    }

    .sghc-field {
        min-width: 100%;
    }

    .sghc-field-remove {
        min-width: 100%;
    }

    .sghc-btn-remove {
        width: 100%;
    }

    .sghc-progress {
        gap: 4px;
    }

    .sghc-step-label {
        font-size: 10px;
    }

    .sghc-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .sghc-actions {
        flex-direction: column;
    }

    .sghc-actions .sghc-btn {
        width: 100%;
        text-align: center;
    }

    .sghc-ergebnis-table th:nth-child(3),
    .sghc-ergebnis-table td:nth-child(3) {
        display: none;
    }
}
