/* Repair-specific styles */

.repair-wizard { max-width: 700px; margin: 0 auto; }
.repair-step { display: none; }
.repair-step.active { display: block; }

/* Reuse flex step indicators */
.repair-step-indicators { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.repair-step-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: #dee2e6; transition: background 0.3s;
}
.repair-step-dot.active { background: #007bff; }
.repair-step-dot.completed { background: #28a745; }

/* Paste textarea */
.repair-paste-area {
    width: 100%; min-height: 200px; max-height: 400px;
    padding: 12px; border-radius: 8px; border: 2px solid #dee2e6;
    font-family: monospace; font-size: 0.85rem; resize: vertical;
    transition: border-color 0.2s;
}
.repair-paste-area:focus { border-color: #007bff; outline: none; }
.repair-paste-area::placeholder { color: #adb5bd; }

/* Hint inputs */
.repair-hints {
    display: flex; gap: 12px; margin-top: 12px; align-items: center;
    flex-wrap: wrap;
}
.repair-hints label { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.repair-hints select, .repair-hints input {
    padding: 6px 10px; border-radius: 6px; border: 1px solid #dee2e6;
    font-size: 0.9rem;
}

/* Preview grid */
.repair-grid-wrapper {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 16px 0; border-radius: 8px; border: 1px solid #dee2e6;
    max-height: 500px; overflow-y: auto;
}
.repair-grid {
    border-collapse: collapse; min-width: 100%; font-size: 0.8rem;
}
.repair-grid th, .repair-grid td {
    padding: 4px 6px; text-align: center; border: 1px solid #dee2e6;
    white-space: nowrap;
}
.repair-grid th {
    background: #343a40; color: #fff; position: sticky; top: 0; z-index: 1;
    font-size: 0.75rem;
}
.repair-grid td:first-child {
    position: sticky; left: 0; z-index: 2; background: #f8f9fa;
    font-weight: 600; font-size: 0.8rem;
}
.repair-grid th:first-child { z-index: 3; }

/* Editable cell */
.repair-grid td.editable { cursor: pointer; }
.repair-grid td.editable:hover { background: #e7f1ff; }
.repair-grid td select {
    width: 100%; border: none; background: transparent;
    font-size: 0.8rem; text-align: center; cursor: pointer;
}

/* Shift colors in preview */
.repair-cell-day { background: #fff3cd; }
.repair-cell-evening { background: #cce5ff; }
.repair-cell-night { background: #e2d5f1; }
.repair-cell-off { background: #f8f9fa; color: #adb5bd; }

/* Symbol mapper */
.symbol-mapper {
    margin: 16px 0; padding: 16px; background: #f8f9fa;
    border-radius: 8px; border: 1px solid #dee2e6;
}
.symbol-mapper h6 { margin-bottom: 12px; font-weight: 700; }
.symbol-map-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 8px; flex-wrap: wrap;
}
.symbol-map-row .symbol-label {
    font-family: monospace; font-weight: 700; font-size: 1.1rem;
    min-width: 40px; text-align: center;
    padding: 4px 8px; background: #fff; border-radius: 4px;
    border: 1px solid #dee2e6;
}
.symbol-map-row .arrow { color: #6c757d; font-size: 1.2rem; }
.symbol-map-row select {
    padding: 4px 8px; border-radius: 6px; border: 1px solid #dee2e6;
    font-size: 0.9rem;
}

/* Timeline */
.repair-timeline {
    margin: 24px 0; padding: 20px; background: #f8f9fa;
    border-radius: 8px; border: 1px solid #dee2e6;
}
.timeline-bar {
    position: relative; height: 40px; background: #e9ecef;
    border-radius: 20px; overflow: hidden; margin: 16px 0;
}
.timeline-frozen {
    position: absolute; top: 0; left: 0; height: 100%;
    background: #b8daff; border-radius: 20px 0 0 20px;
    transition: width 0.3s;
}
.timeline-repair {
    position: absolute; top: 0; height: 100%;
    background: #c3e6cb; border-radius: 0 20px 20px 0;
    transition: left 0.3s, width 0.3s;
}
.timeline-labels {
    display: flex; justify-content: space-between; font-size: 0.8rem; color: #6c757d;
}
.timeline-legend {
    display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 0.85rem;
}
.timeline-legend-item { display: flex; align-items: center; gap: 4px; }
.timeline-legend-dot {
    width: 12px; height: 12px; border-radius: 50%; display: inline-block;
}
.timeline-legend-dot.frozen { background: #b8daff; }
.timeline-legend-dot.repair { background: #c3e6cb; }

/* Params cards */
.repair-params-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 576px) {
    .repair-params-grid { grid-template-columns: 1fr; }
}

/* Diff grid */
.diff-changed { background: #fff3cd !important; }
.diff-changed-strong { background: #ffc107 !important; color: #333; }

/* Diff summary */
.diff-summary {
    display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
    margin: 16px 0;
}
.diff-stat {
    text-align: center; padding: 12px 20px; background: #f8f9fa;
    border-radius: 8px; border: 1px solid #dee2e6; min-width: 120px;
}
.diff-stat .stat-value { font-size: 1.5rem; font-weight: 700; color: #333; }
.diff-stat .stat-label { font-size: 0.8rem; color: #6c757d; }

/* Warnings */
.repair-warnings {
    margin: 12px 0;
}
.repair-warning-item {
    padding: 8px 12px; margin-bottom: 4px; background: #fff3cd;
    border-radius: 6px; font-size: 0.85rem; color: #856404;
    border-left: 3px solid #ffc107;
}

/* Navigation buttons */
.repair-btn-nav {
    display: flex; gap: 12px; margin-top: 24px; justify-content: center;
}
.repair-btn-nav .btn { min-width: 120px; padding: 12px 24px; font-size: 1rem; border-radius: 8px; }

.repair-cta-btn {
    width: 100%; padding: 16px; font-size: 1.2rem; border-radius: 12px;
    font-weight: 700; letter-spacing: 0.5px;
}

/* Action buttons */
.repair-actions {
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 20px 0;
}
.repair-actions .btn { min-width: 140px; padding: 10px 20px; border-radius: 8px; min-height: 44px; }

/* Section titles */
.repair-section-title {
    font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 8px;
}
.repair-section-desc {
    text-align: center; color: #6c757d; margin-bottom: 24px;
}

/* Loading */
.repair-loading {
    display: none; text-align: center; padding: 40px;
}
.repair-loading.visible { display: block; }

/* Footer */
.repair-footer-note {
    text-align: center; color: #adb5bd; font-size: 0.8rem; margin-top: 40px;
}

/* Summary columns and rows */
.summary-header { background: #495057 !important; }
.summary-cell { background: #f0f0f0; font-weight: 600; font-size: 0.85em; }
.summary-total { background: #e2e6ea; font-weight: 700; }
.summary-row td { background: #e9ecef; font-weight: 600; border-top: 2px solid #adb5bd; }
.summary-row td:first-child { font-weight: 700; }

/* Mobile */
@media (max-width: 768px) {
    .repair-grid { font-size: 0.75rem; }
    .repair-grid th, .repair-grid td { padding: 3px 4px; }
    .repair-paste-area { min-height: 150px; }
    .repair-params-grid { grid-template-columns: 1fr; }
}
