/**
 * OBD2 Code Explainer CSS
 * Styling for OBD2 diagnostic tool
 */

/* OBD2 List Styling */
.obd2-list {
    list-style: none;
    padding-left: 0;
}

.obd2-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    padding-left: 2rem;
}

.obd2-list li:last-child {
    border-bottom: none;
}

.obd2-list li:before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #dc3545;
}

/* Dark mode support */
[data-bs-theme="dark"] .obd2-list li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* OBD2 Explanation Container */
.obd2-explanation-container .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.obd2-explanation-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Error Code Display */
.obd2-explanation-container .display-6 .text-danger {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* Severity Badge Colors */
.border-danger {
    border-width: 2px !important;
}

.border-warning {
    border-width: 2px !important;
}

.border-info {
    border-width: 2px !important;
}

.border-success {
    border-width: 2px !important;
}

/* Loading State */
#loadingState {
    min-height: 300px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .obd2-explanation-container h1 {
        font-size: 1.75rem;
    }

    .obd2-explanation-container .display-6 {
        font-size: 1.5rem;
    }
}

/* Form Input Focus */
#error_code:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Sticky Form */
.sticky-top {
    z-index: 100;
}

/* CTA Buttons */
.obd2-explanation-container .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.obd2-explanation-container .btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Print Styles */
@media print {
    .sticky-top,
    .btn,
    .nav,
    .footer {
        display: none !important;
    }

    .obd2-explanation-container {
        max-width: 100%;
    }

    .card {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
}
