/**
 * Vehicdata Core Plugin Frontend Styles
 */

/* Firmware List Block */
.vehicdata-firmware-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.firmware-item {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.firmware-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.firmware-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.firmware-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.firmware-version {
    background: #FF2B1C;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.firmware-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.firmware-critical {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.firmware-changelog {
    margin-bottom: 1rem;
    color: #374151;
}

.firmware-checksum {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: ui-monospace, SFMono-Regular, Monaco, Consolas, monospace;
}

.firmware-checksum code {
    font-size: 0.875rem;
    word-break: break-all;
}

/* Compatibility Matrix Block */
.vehicdata-compatibility-matrix {
    margin: 2rem 0;
}

.matrix-description {
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 1.125rem;
}

.compatibility-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.compatibility-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.compatibility-table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.compatibility-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.compatibility-table tbody tr:hover {
    background: #f9fafb;
}

.status-compatible {
    color: #10b981;
    font-weight: 500;
}

.compatibility-notes {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    color: #92400e;
}

/* Manual List Block */
.vehicdata-manual-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.vehicdata-manual-list.layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.vehicdata-manual-list.layout-list {
    grid-template-columns: 1fr;
}

.manual-item {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.manual-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.manual-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.manual-content {
    padding: 1.5rem;
}

.manual-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.manual-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.manual-type {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.manual-type.type-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.manual-type.type-video {
    background: #dbeafe;
    color: #2563eb;
}

.manual-type.type-online {
    background: #d1fae5;
    color: #059669;
}

.manual-difficulty {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.manual-difficulty.difficulty-beginner {
    background: #d1fae5;
    color: #059669;
}

.manual-difficulty.difficulty-intermediate {
    background: #fef3c7;
    color: #d97706;
}

.manual-difficulty.difficulty-advanced {
    background: #fee2e2;
    color: #dc2626;
}

.manual-time {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* FAQ Block */
.vehicdata-faq {
    margin: 2rem 0;
}

.faq-item {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question[aria-expanded="true"] {
    background: #f9fafb;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 400;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.open {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: #374151;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicdata-manual-list.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .firmware-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .compatibility-table {
        font-size: 0.875rem;
    }
    
    .compatibility-table th,
    .compatibility-table td {
        padding: 0.5rem;
    }
    
    .manual-meta {
        flex-wrap: wrap;
    }
}