/* === Aanrijdingsformulier Styles === */

:root {
    --primary: #0d6efd;
    --voertuig-a: #0d6efd;
    --voertuig-b: #dc3545;
    --step-inactive: #dee2e6;
    --step-done: #198754;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Progress stepper */
.step-progress {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.step-progress .steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    min-width: max-content;
    padding: 0 1rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.step-item .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--step-inactive);
    color: #6c757d;
    flex-shrink: 0;
    transition: all 0.2s;
}

.step-item.active .step-circle {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.step-item.done .step-circle {
    background: var(--step-done);
    color: white;
}

.step-item.skipped .step-circle {
    background: var(--step-inactive);
    color: #adb5bd;
    text-decoration: line-through;
}

.step-item .step-label {
    font-size: 0.75rem;
    color: #6c757d;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-connector {
    width: 30px;
    height: 2px;
    background: var(--step-inactive);
    flex-shrink: 0;
}

.step-connector.done {
    background: var(--step-done);
}

/* Card styling */
.card-step {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    border-radius: 0.75rem;
}

.card-step .card-header {
    background: white;
    border-bottom: 2px solid #e9ecef;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-step .card-body {
    padding: 1.5rem;
}

/* Section headers within steps */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.section-title:first-child {
    margin-top: 0;
}

.section-title i {
    width: 24px;
}

/* Voertuig A/B badges */
.badge-voertuig-a {
    background: var(--voertuig-a) !important;
}

.badge-voertuig-b {
    background: var(--voertuig-b) !important;
}

/* Type aanrijding toggle */
.type-toggle {
    display: flex;
    gap: 1rem;
}

.type-toggle .btn-check:checked + .btn-type {
    color: white;
    border-color: transparent;
}

.btn-type {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 0.75rem !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.btn-type:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.btn-type i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.btn-type .type-label {
    font-weight: 600;
    font-size: 1rem;
}

.btn-type .type-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.btn-check:checked + .btn-type-eenzijdig {
    background: #198754;
    border-color: #198754;
}

.btn-check:checked + .btn-type-tweezijdig {
    background: var(--primary);
    border-color: var(--primary);
}

/* Toedracht checkboxes */
.toedracht-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
}

.toedracht-row {
    display: contents;
}

.toedracht-check {
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
}

.toedracht-check.side-a {
    justify-content: flex-end;
    background: rgba(13, 110, 253, 0.03);
    border-bottom: 1px solid #f0f0f0;
}

.toedracht-check.side-b {
    justify-content: flex-start;
    background: rgba(220, 53, 69, 0.03);
    border-bottom: 1px solid #f0f0f0;
}

.toedracht-label {
    padding: 0.4rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    background: #f8f9fa;
}

.toedracht-label .num {
    font-weight: 700;
    width: 20px;
    text-align: right;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.toedracht-label .text {
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.2;
}

.toedracht-count {
    text-align: center;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Impact diagram */
.impact-container {
    position: relative;
    display: inline-block;
    cursor: crosshair;
}

.impact-container svg {
    max-width: 100%;
    height: auto;
}

.impact-arrow {
    position: absolute;
    color: red;
    font-size: 1.5rem;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Sketch canvas */
.sketch-wrapper {
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
    touch-action: none;
}

.sketch-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.sketch-toolbar .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.sketch-toolbar .btn.active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.sketch-templates {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.sketch-template-btn {
    width: 80px;
    height: 80px;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0.25rem;
}

.sketch-template-btn:hover,
.sketch-template-btn.active {
    border-color: var(--primary);
    background: #f0f7ff;
}

.sketch-template-btn svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.25rem;
}

.sketch-template-btn span {
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.1;
}

/* Navigation buttons */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.step-nav .btn {
    min-width: 140px;
}

/* Getuigen dynamic rows */
.getuige-row {
    transition: all 0.3s;
}

/* Summary page */
.summary-section {
    margin-bottom: 1.5rem;
}

.summary-section h5 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.summary-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .step-item .step-label {
        display: none;
    }

    .step-connector {
        width: 16px;
    }

    .toedracht-label .text {
        font-size: 0.7rem;
    }

    .type-toggle {
        flex-direction: column;
    }

    .btn-type i {
        font-size: 1.5rem;
    }

    .sketch-template-btn {
        width: 65px;
        height: 65px;
    }
}

/* Print */
@media print {
    .navbar, .step-progress, .step-nav, footer {
        display: none !important;
    }
}
