/**
 * Car Comparison Plugin Styles
 * Clean, open design
 */

/* Container */
.cc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
}

.cc-container *,
.cc-container *::before,
.cc-container *::after {
    box-sizing: border-box;
}

/* Header */
.cc-header {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.cc-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.cc-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Description */
.cc-description {
    margin-bottom: 30px;
}

.cc-description p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Car Cards - Clean open design */
.cc-cars-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0;
    margin-bottom: 50px;
    border-bottom: none;
}

.cc-car-card {
    position: relative;
    background: transparent;
    border: none;
    text-align: left;
}

/* Circular Badge */
.cc-circular-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    width: 72px;
    height: 72px;
    background-color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.cc-circular-badge span {
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}

/* Image Container */
.cc-car-image {
    position: relative;
    padding: 0;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

.cc-car-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.cc-no-image {
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* Car Info Below Image */
.cc-car-info {
    padding: 16px 0 0 0;
}

.cc-car-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.cc-car-trim {
    font-size: 12px;
    color: #777;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.cc-car-specs {
    font-size: 12px;
    color: #555;
    margin: 0;
}

/* Hidden elements */
.cc-winner-badge,
.cc-comparison-title,
.cc-facts-count,
.cc-vs-title {
    display: none;
}

/* Navigation Tabs - Sticky & Attractive */
.cc-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background-color: #fff;
    z-index: 9999;
    border-bottom: 2px solid #e5e5e5;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

/* Fixed state - applied by JavaScript */
.cc-tabs-nav.cc-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    background-color: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 3px solid #2563eb !important;
    justify-content: center;
}

/* Placeholder for fixed nav */
#cc-tabs-placeholder {
    height: 0;
    transition: height 0.1s ease;
}

.cc-tab-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background-color: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cc-tab-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background-color: #f0f7ff;
    transform: translateY(-1px);
}

.cc-tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* Comparison Table */
.cc-comparison-table {
    margin-top: 10px;
}

/* Section */
.cc-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e8e8;
}

.cc-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #2563eb;
    display: inline-block;
}

/* Comparison Row - The Key Component */
.cc-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    padding: 16px 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
    border-radius: 6px;
    margin: 0 -12px;
}

.cc-row:nth-child(odd) {
    background-color: #f9fafb;
}

.cc-row:hover {
    background-color: #eef6ff;
}

.cc-row:last-child {
    border-bottom: none;
}

/* Feature Column (Left) */
.cc-feature {
    position: relative;
}

.cc-feature-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: inline;
}

.cc-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #2563eb;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    margin-left: 8px;
    cursor: help;
    vertical-align: middle;
    position: relative;
    font-weight: 700;
}

.cc-info-icon:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

/* Feature Description - Shows below feature name */
.cc-feature-desc {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
    line-height: 1.4;
}

/* Value Columns (Center and Right) */
.cc-value {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    text-align: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

/* Standard/Available styling */
.cc-value-standard {
    color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.cc-value-optional {
    color: #ca8a04;
    background: #fefce8;
    border-color: #fef08a;
}

.cc-value-na {
    color: #9ca3af;
    background: #f9fafb;
}

/* No Data Row */
.cc-row.cc-no-data {
    grid-template-columns: 1fr;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cc-container {
        padding: 15px;
    }

    .cc-header h1 {
        font-size: 22px;
    }

    .cc-subtitle {
        font-size: 14px;
    }

    .cc-description {
        margin-bottom: 25px;
    }

    .cc-description p {
        font-size: 13px;
    }

    .cc-cars-header {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .cc-circular-badge {
        width: 56px;
        height: 56px;
        top: 12px;
        left: 12px;
    }

    .cc-circular-badge span {
        font-size: 8px;
    }

    .cc-car-image img {
        max-height: 180px;
    }

    .cc-car-info {
        padding: 12px 0 0 0;
    }

    .cc-car-name {
        font-size: 15px;
        font-weight: 700;
    }

    .cc-car-trim {
        font-size: 11px;
    }

    .cc-car-specs {
        font-size: 11px;
    }

    .cc-tabs-nav {
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 12px 15px;
        margin-left: -15px;
        margin-right: -15px;
    }

    .cc-tabs-nav.cc-fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 10px 15px !important;
        justify-content: flex-start;
        z-index: 99999 !important;
    }

    .cc-tab-btn {
        padding: 8px 14px;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
        white-space: nowrap;
        border-width: 2px;
    }

    .cc-section {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .cc-section-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    /* Mobile: Feature name on top, values side-by-side below */
    .cc-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        padding: 16px 0;
        margin: 0;
    }

    .cc-feature {
        grid-column: 1 / -1;
        padding-bottom: 8px;
        border-bottom: none;
    }

    .cc-feature-name {
        font-size: 15px;
        font-weight: 600;
        color: #1a1a1a;
    }

    .cc-feature-desc {
        font-size: 11px;
        margin-top: 3px;
    }

    /* Values side by side below feature name */
    .cc-row .cc-value {
        font-size: 14px;
        padding: 0;
        text-align: left;
        border: none;
        background: transparent;
        color: #333;
    }

    .cc-info-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
        margin-left: 6px;
    }
}

@media (max-width: 480px) {
    .cc-cars-header {
        gap: 10px;
        padding: 15px 0;
    }

    .cc-car-card-header {
        padding: 0 0 10px 0;
    }

    .cc-car-image img {
        max-height: 100px;
    }

    .cc-no-image {
        height: 90px;
        font-size: 10px;
    }

    .cc-car-name {
        font-size: 15px;
        font-weight: 700;
    }

    .cc-car-trim {
        font-size: 11px;
    }

    .cc-winner-badge {
        font-size: 7px;
        padding: 3px 8px;
        bottom: 5px;
    }

    .cc-facts-count {
        font-size: 9px;
    }

    .cc-vs-title {
        font-size: 14px;
    }

    .cc-tabs-nav {
        padding: 8px 10px;
        gap: 5px;
    }

    .cc-tabs-nav.cc-fixed {
        padding: 8px 10px !important;
    }

    .cc-tab-btn {
        padding: 6px 10px;
        font-size: 10px;
    }

    .cc-section {
        padding: 10px;
        margin-bottom: 12px;
    }

    .cc-section-title {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .cc-row {
        gap: 6px 10px;
        padding: 14px 0;
    }

    .cc-feature {
        padding-bottom: 6px;
    }

    .cc-feature-name {
        font-size: 14px;
    }

    .cc-row .cc-value {
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    .cc-tabs-nav {
        display: none;
    }

    .cc-container {
        max-width: 100%;
    }

    .cc-row:hover {
        background: transparent;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Loading State */
.cc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.cc-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: ccSpin 0.8s linear infinite;
}

@keyframes ccSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip Styles */
.cc-info-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 5px;
    background: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    width: 250px;
    z-index: 1000;
    font-weight: 400;
    line-height: 1.4;
}

/* Header and Bottom Content Areas */
.cc-header-content,
.cc-bottom-content {
    padding: 20px 25px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 1.7;
    font-size: 16px;
}

.cc-header-content p,
.cc-bottom-content p {
    margin-bottom: 15px;
}

.cc-header-content p:last-child,
.cc-bottom-content p:last-child {
    margin-bottom: 0;
}

.cc-header-content h2,
.cc-header-content h3,
.cc-header-content h4,
.cc-bottom-content h2,
.cc-bottom-content h3,
.cc-bottom-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.cc-header-content ul,
.cc-header-content ol,
.cc-bottom-content ul,
.cc-bottom-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.cc-header-content li,
.cc-bottom-content li {
    margin-bottom: 8px;
}

.cc-header-content a,
.cc-bottom-content a {
    color: #0066cc;
    text-decoration: underline;
}

.cc-header-content a:hover,
.cc-bottom-content a:hover {
    color: #004499;
}

.cc-header-content img,
.cc-bottom-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}
