/**
 * Turbo Database - Frontend Styles
 */

/* Container */
.turbo-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.turbo-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.turbo-archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.turbo-archive-description {
    font-size: 1.1rem;
    color: #666;
}

/* Filters */
.turbo-filters {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 35px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid #e8e9eb;
}

.turbo-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.turbo-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.turbo-search-input:focus {
    outline: none;
    border-color: #0066cc;
}

.turbo-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.turbo-filter-group {
    display: flex;
    flex-direction: column;
}

#turbo-reset-filters {
    align-self: flex-end;
    white-space: nowrap;
}

.turbo-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.turbo-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.turbo-select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Buttons */
.turbo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.turbo-btn-primary {
    background: #0066cc;
    color: white;
}

.turbo-btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,102,204,0.3);
}

.turbo-btn-secondary {
    background: #6c757d;
    color: white;
}

.turbo-btn-secondary:hover {
    background: #5a6268;
}

.turbo-btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.turbo-btn-cta {
    background: #28a745;
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

.turbo-btn-cta:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

/* Results info */
.turbo-results-info {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666;
}

/* Table Container */
.turbo-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Table */
.turbo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.turbo-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.turbo-table thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.turbo-table thead th.turbo-actions-col {
    text-align: center;
    min-width: 180px;
}

.turbo-table tbody {
    transition: opacity 0.3s;
}

.turbo-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.turbo-table tbody tr:hover {
    background-color: #f8f9fa;
}

.turbo-table tbody tr:last-child {
    border-bottom: none;
}

.turbo-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.turbo-table td strong {
    color: #0066cc;
    font-weight: 600;
}

/* Brand badge in table */
.turbo-brand-badge-small {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table action buttons */
.turbo-actions {
    text-align: center;
    white-space: normal;
    min-width: 200px;
}

.turbo-btn-table {
    display: inline-block;
    padding: 10px 16px;
    margin: 4px 2px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    white-space: nowrap;
}

.turbo-btn-details {
    background: #0066cc;
    color: white;
}

.turbo-btn-details:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,102,204,0.3);
}

.turbo-btn-order {
    background: #28a745;
    color: white;
}

.turbo-btn-order:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
}

/* No results in table */
.turbo-table .no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Grid (old - keeping for backward compatibility) */
.turbo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    transition: opacity 0.3s;
}

/* Card */
.turbo-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.turbo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #0066cc;
}

.turbo-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 16px;
}

.turbo-card-brand {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.turbo-card-body {
    padding: 20px;
    flex: 1;
}

.turbo-card-title {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
}

.turbo-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.turbo-card-title a:hover {
    color: #0066cc;
}

.turbo-card-model,
.turbo-card-engine {
    margin: 8px 0;
    color: #666;
    font-size: 0.9rem;
}

.turbo-card-footer {
    padding: 16px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e0e0e0;
}

.turbo-card-footer .turbo-btn {
    flex: 1;
}

/* Pagination */
.turbo-pagination {
    margin: 40px 0;
    text-align: center;
}

.turbo-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 8px;
}

.turbo-pagination li {
    display: inline-block;
}

.page-numbers {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    display: inline-block;
}

.page-numbers:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.page-numbers.current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.page-numbers.dots {
    border: none;
    cursor: default;
}

.page-numbers.dots:hover {
    background: transparent;
    color: #333;
}

/* Loading */
.turbo-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 9999;
}

.turbo-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Single Turbo */
.turbo-single-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
}

.turbo-breadcrumb {
    margin-bottom: 30px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.turbo-breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s;
}

.turbo-breadcrumb a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.turbo-single {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.turbo-single-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.turbo-single-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.turbo-single-title {
    margin: 0 0 20px 0;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.turbo-brand-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(10px);
}

.turbo-brand-badge:hover {
    background: rgba(255,255,255,0.3);
}

.turbo-single-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding: 50px;
    background: white;
}

.turbo-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.turbo-info-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 12px;
    border-left: 5px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.turbo-info-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border-left-color: #667eea;
}

.turbo-info-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.turbo-info-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.turbo-description h2,
.turbo-additional-data h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: #1a1a1a;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
}

.turbo-description {
    margin-bottom: 50px;
    line-height: 1.8;
    color: #444;
}

.turbo-additional-data {
    margin-bottom: 50px;
}

.turbo-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.turbo-data-table th,
.turbo-data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.turbo-data-table th {
    font-weight: 700;
    color: #666;
    width: 40%;
    background: #f8f9fa;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.turbo-data-table td {
    font-weight: 500;
    color: #1a1a1a;
}

.turbo-data-table tr:last-child th,
.turbo-data-table tr:last-child td {
    border-bottom: none;
}

.turbo-data-table tr:hover {
    background: #f8f9fa;
}

.turbo-data-table tr:hover th {
    background: #f0f1f3;
}

/* Sidebar */
.turbo-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.turbo-cta-box,
.turbo-share-box {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.turbo-cta-box:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102,126,234,0.15);
    transform: translateY(-4px);
}

.turbo-cta-box h3 {
    margin: 0 0 16px 0;
    font-size: 1.6rem;
    color: #1a1a1a;
    font-weight: 700;
}

.turbo-cta-box p {
    margin: 0 0 24px 0;
    color: #666;
    line-height: 1.6;
    font-size: 1.05rem;
}

.turbo-share-box h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.turbo-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.turbo-share-btn {
    padding: 10px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.turbo-share-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* FAQ Section */
.turbo-faq-section {
    margin-top: 60px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.turbo-faq-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1a1a1a;
    text-align: center;
}

.turbo-faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.turbo-faq-item {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.turbo-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.turbo-faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    padding-left: 30px;
    position: relative;
}

.turbo-faq-question:before {
    content: "Q:";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: 700;
}

.turbo-faq-answer {
    color: #555;
    line-height: 1.7;
    padding-left: 30px;
}

.turbo-faq-answer p {
    margin-bottom: 12px;
}

.turbo-faq-answer ul {
    margin: 12px 0;
    padding-left: 20px;
}

.turbo-faq-answer li {
    margin-bottom: 8px;
}

.turbo-faq-answer a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.turbo-faq-answer a:hover {
    text-decoration: underline;
}

.turbo-faq-cta {
    display: inline-block;
    padding: 8px 16px;
    background: #0066cc;
    color: white !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s;
}

.turbo-faq-cta:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.turbo-faq-cta-box {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.turbo-faq-cta-box h3 {
    font-size: 1.8rem;
    margin: 0 0 12px 0;
    color: white;
}

.turbo-faq-cta-box p {
    font-size: 1.1rem;
    margin: 0 0 24px 0;
    opacity: 0.95;
}

.turbo-faq-cta-box .turbo-btn {
    background: white;
    color: #667eea;
}

.turbo-faq-cta-box .turbo-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Related Turbos Section */
.turbo-related-section {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 2px solid #e0e0e0;
}

.turbo-related-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1a1a1a;
    text-align: center;
}

.turbo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.turbo-view-all {
    text-align: center;
    margin-top: 30px;
}

/* Responsive Table */
@media (max-width: 1200px) {
    .turbo-table {
        font-size: 0.85rem;
    }
    
    .turbo-table thead th,
    .turbo-table td {
        padding: 10px 8px;
    }
    
    .turbo-btn-table {
        padding: 8px 12px;
        font-size: 0.8rem;
        margin: 2px;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .turbo-actions {
        min-width: 180px;
    }
}

@media (max-width: 968px) {
    /* Responsive table - card style på mobil */
    .turbo-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .turbo-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .turbo-table thead,
    .turbo-table tbody,
    .turbo-table tr,
    .turbo-table th,
    .turbo-table td {
        display: block;
    }
    
    .turbo-table thead {
        display: none; /* Skjul header på mobil */
    }
    
    .turbo-table tbody tr {
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 16px;
        background: white;
    }
    
    .turbo-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }
    
    .turbo-table td:last-child {
        border-bottom: none;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
        padding-top: 16px;
        border-top: 2px solid #e0e0e0;
    }
    
    .turbo-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .turbo-table td.turbo-actions:before {
        display: none;
    }
    
    .turbo-btn-table {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .turbo-archive-header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .turbo-archive-description {
        font-size: 0.95rem;
    }
    
    .turbo-grid {
        grid-template-columns: 1fr;
    }
    
    .turbo-filter-row {
        grid-template-columns: 1fr;
    }
    
    .turbo-filter-group {
        width: 100%;
    }
    
    #turbo-reset-filters {
        width: 100%;
    }
    
    .turbo-single-content {
        grid-template-columns: 1fr;
    }
    
    .turbo-single-sidebar {
        order: -1;
    }
    
    .turbo-info-grid {
        grid-template-columns: 1fr;
    }
    
    .turbo-single-title {
        font-size: 1.8rem;
    }
    
    .turbo-faq-section {
        padding: 24px 16px;
    }
    
    .turbo-faq-section h2 {
        font-size: 1.5rem;
    }
    
    .turbo-faq-question {
        font-size: 1.1rem;
    }
    
    .turbo-faq-cta-box {
        padding: 24px 16px;
    }
    
    .turbo-faq-cta-box h3 {
        font-size: 1.4rem;
    }
    
    .turbo-related-grid {
        grid-template-columns: 1fr;
    }
}

