/**
 * Compare CSS
 * This file contains the CSS styles for the compare page
 */

body {
    background-color: #ffffff;
    color: #1c1c1c;
    font-family: "Proxima Nova", sans-serif, Inter;
}

.desktop-filter { display: block; }
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #1C1C1C;
}
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-filter-overlay.active { display: block; }
.mobile-filter-panel {
    position: fixed;
    top: 0; left: -100%;
    width: 85%; max-width: 400px;
    height: 100%;
    background: #FFFFFF;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}
.mobile-filter-panel.active { left: 0; }
.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E0E0E0;
}
.mobile-filter-title { font-size: 18px; font-weight: 600; margin: 0; }
.mobile-filter-close { background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-filter-section { border-bottom: 1px solid #E0E0E0; }
.mobile-filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
}
.mobile-filter-section-title { font-size: 16px; font-weight: 600; margin: 0; }
.mobile-filter-section-icon { transition: transform 0.2s ease; }
.mobile-filter-section.expanded .mobile-filter-section-icon { transform: rotate(180deg); }
.mobile-filter-section-content { display: none; padding: 0 20px 16px; }
.mobile-filter-section.expanded .mobile-filter-section-content { display: block; }
.mobile-filter-checkbox { display: flex; align-items: center; padding: 12px 0; cursor: pointer; }
.mobile-filter-checkbox input[type="checkbox"] { width: 20px; height: 20px; margin-right: 12px; }
.mobile-filter-actions { display: flex; gap: 8px; padding: 16px 20px; border-bottom: 1px solid #E0E0E0; }
.mobile-feature-group { margin-bottom: 16px; }
.mobile-feature-group-header {
    padding: 8px 0;
    font-weight: 600;
    font-size: 14px;
    color: #1C1C1C;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 8px;
}
.mobile-filter-action-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #FFFFFF;
    cursor: pointer;
    font-size: 14px;
}
.modal-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1C1C1C;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-mobile-filter-btn:hover {
    border-color: #BE930B;
    color: #BE930B;
}

@media (max-width: 768px) {
    .desktop-filter { display: none !important; }
    .mobile-filter-btn { display: flex; }
    .modal-desktop-filter { display: none !important; }
    .modal-mobile-filter-btn { display: flex !important; }
}

.modal-mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}
.modal-mobile-filter-overlay.active { display: block; }
.modal-mobile-filter-panel {
    position: fixed;
    top: 0; left: -100%;
    width: 85%; max-width: 400px;
    height: 100%;
    background: #FFFFFF;
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
}
.modal-mobile-filter-panel.active { left: 0; }

.compare-container {
    max-width: 1770px;
    margin: 0 auto;
    padding: 30px 20px;
}

@media (min-width: 768px) {
    .compare-container {
        padding: 50px 60px;
    }
}

.compare-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .compare-header {
        flex-direction: row;
        align-items: center;
    }
}

.compare-title {
    color: #1C1C1C;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin: 0;
}

@media (min-width: 768px) {
    .compare-title {
        font-size: 36px;
    }
}

.compare-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.compare-info {
    color: #6B7280;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.compare-info span {
    color: #1C1C1C;
    font-weight: 600;
}

.filter-btn {
    display: inline-flex;
    padding: 10px 16px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.20);
    background: #FFF;
    overflow: hidden;
    color: #1C1C1C;
    text-overflow: ellipsis;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #BE930B;
    color: #BE930B;
}

.filter-btn:hover svg path {
    stroke: #BE930B;
}

.filter-dropdown-container {
    position: relative;
    display: inline-flex;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 100;
    min-width: 890px;
    overflow: hidden;
}

.filter-dropdown.active {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.dropdown-title {
    color: #1C1C1C;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.dropdown-actions {
    display: flex;
    gap: 16px;
}

.dropdown-action-btn {
    color: #1C1C1C;
    text-align: right;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    cursor: pointer;
    background: none;
    border: none;
}

.dropdown-action-btn:hover {
    color: #BE930B;
}

.dropdown-search {
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.search-input {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #BE930B;
}

.dropdown-content {
    padding: 0;
}

.features-dropdown-category-container {
    display: flex;
    height: 400px;
}

.features-dropdown-category-list {
    flex-shrink: 0;
    background-color: #f9fafb;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    padding: 8px 0;
}

.features-dropdown-category-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.features-dropdown-category-item:hover {
    background-color: #f3f4f6;
    color: #1c1c1c;
}

.features-dropdown-category-item.active {
    background-color: #ffffff;
    color: #1c1c1c;
    font-weight: 600;
    border-left: 2px solid #BE930B;
}

.features-dropdown-category-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.features-dropdown-category-items {
    width: 80%;
    flex-shrink: 0;
    padding: 16px;
    overflow-y: auto;
    column-count: 2;
    column-gap: 16px;
}

.features-dropdown-category-items .dropdown-checkbox {
    break-inside: avoid;
    margin-bottom: 8px;
}

.dropdown-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: column;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.dropdown-checkbox:hover {
    background-color: #f3f4f6;
}

.dropdown-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #BE930B;
}

.dropdown-checkbox span {
    color: #1C1C1C;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    width: 100%;
}

.empty-state.hidden {
    display: none;
}

.empty-state-text {
    color: #1C1C1C;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.comparison-container {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.comparison-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

.comparison-table thead {
    background-color: #F9FAFB;
}

.comparison-header-label {
    width: 160px;
    min-width: 160px;
    padding: 16px 20px;
    text-align: left;
    color: #1C1C1C;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    border-right: 1px solid #E5E7EB;
    position: sticky;
    left: 0;
    top: 0px;
    background-color: #F4F4F4;
    z-index: 20;
}

.comparison-header-cell {
    padding: 16px;
    text-align: center;
    border-right: 1px solid #E5E7EB;
    position: sticky;
    top: 0px;
    background-color: #F4F4F4;
    min-width: 350px;
    width: auto;
    z-index: 15;
}

.comparison-header-cell:last-child {
    border-right: none;
}

.product-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-header-title {
    color: #1C1C1C;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.comparison-label {
    width: 160px;
    min-width: 160px;
    padding: 16px 20px;
    color: #1C1C1C;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    border-right: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    background: #FFF;
    position: sticky;
    left: 0;
    z-index: 5;
}

.comparison-cell {
    padding: 16px 20px;
    color: #1C1C1C;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    border-right: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    vertical-align: middle;
    min-width: 350px;
    width: auto;
}

.comparison-cell:last-child {
    border-right: none;
}

.comparison-cell-model {
    padding: 16px;
    text-align: center;
    vertical-align: top;
}

.product-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.view-details-btn {
    padding: 12px 30px;
    border-radius: 6px;
    background: #BE930B;
    border: none;
    color: #FFF;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.view-details-btn:hover {
    background-color: #a8820a;
}

/* Sticky bottom row for VIEW DETAILS button */
.comparison-action-label {
    position: sticky;
    left: 0;
    bottom: 0;
    z-index: 10;
    background: #FFF;
}

.comparison-action-cell {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: #FFF;
}

.remove-column-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 2px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-column-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.remove-column-btn svg {
    width: 12px;
    height: 12px;
}

.product-tagline {
    margin-top: 12px;
    color: #6B7280;
    text-align: center;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
}

.product-image {
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.compare-product-image-container {
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.compare-product-image {
    width: 260px;
    height: 260px;
    object-fit: contain;
}

.comparison-table-wrapper {
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table {
        min-width: 800px; /* Ensure table doesn't shrink too much */
        width: max-content;
    }

    .compare-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .compare-filters {
        flex-wrap: wrap;
    }
    
    .filter-dropdown {
        min-width: 300px;
        left: 0;
        right: auto;
    }
    
    .dropdown-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-header-title {
        font-size: 14px;
    }
    
    .comparison-header-label {
        width: 100px;
        min-width: 100px;
        position: sticky;
        left: 0;
        top: 0;
        background-color: #F4F4F4;
        z-index: 20;
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .comparison-label {
        width: 100px;
        min-width: 100px;
        position: sticky;
        left: 0;
        z-index: 5;
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .comparison-header-cell,
    .comparison-cell {
        padding: 12px 10px;
        font-size: 14px;
        width: 200px;
        min-width: 200px;
    }
    
    .comparison-header-cell {
        position: sticky;
        top: 0px;
        background-color: #F4F4F4;
        z-index: 15;
    }
}