/* Frontend Product Comparisons Styles */

.shopglut-comparison-button-wrapper {
    margin: 10px 0;
}

.shopglut-comparison-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #007cba;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.shopglut-comparison-btn:hover {
    background: #005a87;
    color: #ffffff;
    transform: translateY(-1px);
}

.shopglut-comparison-btn.added {
    background: #dc3545;
}

.shopglut-comparison-btn.added:hover {
    background: #c82333;
}

.shopglut-comparison-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comparison-icon {
    font-size: 16px;
}

/* Comparison Table Styles */
.shopglut-comparison-table-wrapper {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.comparison-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.clear-comparison-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-comparison-btn:hover {
    background: #c82333;
}

.comparison-table-container {
    overflow-x: auto;
}

.shopglut-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.shopglut-comparison-table th,
.shopglut-comparison-table td {
    padding: 15px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

.shopglut-comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Table Styles */
.shopglut-comparison-table.bordered th,
.shopglut-comparison-table.bordered td {
    border: 1px solid #dee2e6;
}

.shopglut-comparison-table.striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.shopglut-comparison-table.minimal {
    border: none;
}

.shopglut-comparison-table.minimal th,
.shopglut-comparison-table.minimal td {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.shopglut-comparison-table.detailed th {
    background: #6f42c1;
    color: #fff;
}

.shopglut-comparison-table.card {
    border: none;
}

.shopglut-comparison-table.card th,
.shopglut-comparison-table.card td {
    border: none;
    border-bottom: 2px solid #e83e8c;
}

/* Product Header Styles */
.product-headers th {
    position: relative;
}

.product-header {
    text-align: center;
    min-width: 200px;
}

.product-info {
    position: relative;
}

.product-image {
    margin-bottom: 10px;
}

.product-image img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

.product-name {
    margin-bottom: 10px;
}

.product-name a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.product-name a:hover {
    text-decoration: underline;
}

.remove-from-comparison {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-from-comparison:hover {
    background: #c82333;
}

/* Field Styles */
.field-header {
    background: #f8f9fa;
    font-weight: 600;
    min-width: 150px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.field-label {
    font-weight: 600;
    background: #f8f9fa;
    position: sticky;
    left: 0;
    z-index: 5;
}

.field-value {
    word-wrap: break-word;
}

/* Product Attributes */
.product-attributes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-attributes li {
    margin-bottom: 5px;
    font-size: 13px;
}

/* Rating Styles */
.star-rating {
    color: #ffc107;
}

/* Notices */
.shopglut-comparison-notice {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 999999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.shopglut-comparison-notice.notice-success {
    background: #28a745;
}

.shopglut-comparison-notice.notice-error {
    background: #dc3545;
}

.shopglut-comparison-notice.notice-info {
    background: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .shopglut-comparison-table {
        font-size: 14px;
    }
    
    .shopglut-comparison-table th,
    .shopglut-comparison-table td {
        padding: 10px 8px;
    }
    
    .product-header {
        min-width: 150px;
    }
    
    .product-image img {
        max-width: 60px;
    }
    
    .field-header,
    .field-label {
        min-width: 120px;
    }
    
    .shopglut-comparison-notice {
        top: 20px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .shopglut-comparison-table-wrapper {
        margin: 10px -15px;
        border-radius: 0;
    }
    
    .comparison-header {
        padding: 15px;
    }
    
    .shopglut-comparison-table th,
    .shopglut-comparison-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .product-header {
        min-width: 120px;
    }
    
    .product-image img {
        max-width: 50px;
    }
    
    .shopglut-comparison-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}