.compatible-plans-panel {
    transition: all 0.3s ease;
    max-height: 400px;
    overflow-y: auto;
}

.compatible-plans-panel .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge {
    font-size: 0.75rem;
}

/* Attribute content styling */
.attribute-html-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.attribute-html-content p {
    margin-bottom: 0.5rem;
}

.attribute-html-content p:last-child {
    margin-bottom: 0;
}

.attribute-html-content ol, .attribute-html-content ul {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.attribute-html-content b, .attribute-html-content strong {
    font-weight: 600;
}

.attribute-long-content {
    line-height: 1.5;
}

.attribute-long-content .long-text-preview,
.attribute-long-content .long-text-full {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.toggle-long-text {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.875rem;
}

.toggle-long-text:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Product Comparison Modal Styles */
#shopModal .comparison-item {
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

#shopModal .comparison-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#shopModal .product-image-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

#shopModal .comparison-summary {
    border-left: 4px solid var(--bs-primary);
}

#shopModal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#shopModal .modal-title i {
    font-size: 1.2em;
}

/* Loading states and animations */
#shopModal .spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

#shopModal .comparison-item {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out animation for removed items */
#shopModal .comparison-item.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* Enhanced button styles */
#shopModal .btn {
    transition: all 0.2s ease;
}

#shopModal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#shopModal .btn-outline-danger:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #shopModal .comparison-item {
        padding: 1rem !important;
    }
    
    #shopModal .product-image-container {
        width: 60px !important;
        height: 60px !important;
    }
    
    #shopModal .modal-body {
        padding: 1rem !important;
    }
}

/* Product Comparison Page Styles */
.comparison-table {
    font-size: 0.9rem;
}

.comparison-table .attribute-label-cell {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    vertical-align: middle;
    width: 200px;
    min-width: 200px;
    border-right: 2px solid #dee2e6;
    padding: 1rem;
}

.comparison-table .product-cell {
    vertical-align: middle;
    padding: 1rem;
    text-align: center;
    border-left: 1px solid #f1f3f4;
}

.comparison-table .product-images-row .product-cell {
    padding: 1.5rem;
}

.comparison-table .product-image-container {
    max-width: 150px;
    height: auto;
}

.comparison-table .product-image-container img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table .attribute-value-cell {
    text-align: left;
}

.comparison-table .product-names-row {
    background: #fff;
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}

.comparison-table .product-prices-row {
    border-bottom: 2px solid #dee2e6;
}

.comparison-table .attribute-row:nth-child(odd) {
    background: #fafbfc;
}

.comparison-table .attribute-row:hover {
    background: #e3f2fd;
}

.comparison-attribute-display .detailed-country-flags {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: #fff;
}

.comparison-attribute-display .network-operators-table-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    background: #fff;
}

.comparison-attribute-display .network-operators-table-container .table {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.comparison-attribute-display .badge {
    font-size: 0.8em;
    padding: 0.4em 0.6em;
}

/* Mobile comparison cards */
.mobile-attributes .comparison-attribute-display .detailed-country-flags,
.mobile-attributes .comparison-attribute-display .network-operators-table-container {
    max-height: 120px;
    font-size: 0.85rem;
}

/* Sticky table header for better UX */
.comparison-table thead th,
.comparison-table .bg-light {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Enhanced button styles for comparison */
.remove-item-comparison {
    transition: all 0.2s ease;
}

.remove-item-comparison:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}

/* Loading states */
.comparison-attribute-display .spinner-border-sm {
    width: 0.75rem;
    height: 0.75rem;
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
    .comparison-table .attribute-label-cell {
        width: 150px;
        min-width: 150px;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .comparison-table .product-cell {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .comparison-table .product-image-container {
        max-width: 120px;
    }
}

@media (max-width: 992px) {
    .comparison-table .attribute-label-cell {
        width: 120px;
        min-width: 120px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .comparison-table .product-cell {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .comparison-table .product-image-container {
        max-width: 100px;
    }
    
    .comparison-attribute-display .badge {
        font-size: 0.7em;
    }
}

/* Empty state styling */
.text-center .bi {
    opacity: 0.3;
}

/* Clear all button */
#clearAllComparison {
    transition: all 0.2s ease;
}

#clearAllComparison:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}

/* Operators list styling */
.operators-list {
    max-height: 150px;
    overflow-y: auto;
}

.operators-list .badge {
    margin: 2px;
    font-size: 0.75em;
    white-space: normal;
    text-align: left;
}

/* Enhanced comparison attribute display */
.comparison-attribute-display .detailed-country-flags,
.comparison-attribute-display .network-operators-table-container {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.comparison-attribute-display .network-operators-table-container .table {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.comparison-attribute-display .network-operators-table-container .table th,
.comparison-attribute-display .network-operators-table-container .table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.comparison-attribute-display .network-operators-table-container .flag-icon {
    width: 16px;
    height: 12px;
}

/* HTML content styling */
.attribute-html-content {
    max-width: 100%;
}

.attribute-html-content .html-content-preview,
.attribute-html-content .html-content-full {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.attribute-html-content img {
    max-width: 100%;
    height: auto;
}

.attribute-html-content ol,
.attribute-html-content ul {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.attribute-html-content ol li,
.attribute-html-content ul li {
    margin-bottom: 0.25rem;
}

.attribute-html-content p {
    margin-bottom: 0.5rem;
}

.attribute-html-content strong {
    font-weight: 600;
}

.attribute-html-content em {
    font-style: italic;
}

/* Toggle buttons styling */
.toggle-long-text,
.toggle-html-content {
    font-size: 0.875rem;
    color: var(--bs-primary);
    text-decoration: none;
}

.toggle-long-text:hover,
.toggle-html-content:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Product Actions in Comparison Table */
.product-actions-row .product-cell {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.product-actions-row .btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-actions-row .btn i {
    font-size: 0.875rem;
}

/* Enhanced pricing display */
.product-prices-row .badge.bg-success {
    font-size: 0.7em;
}

.product-prices-row .text-decoration-line-through {
    font-size: 0.875rem;
}

/* Mobile responsive adjustments for comparison */
@media (max-width: 992px) {
    .mobile-attributes .comparison-attribute-display .detailed-country-flags,
    .mobile-attributes .comparison-attribute-display .network-operators-table-container {
        max-height: 120px;
        font-size: 0.85rem;
    }
    
    .operators-list {
        max-height: 100px;
    }
    
    .attribute-html-content .html-content-preview,
    .attribute-html-content .html-content-full {
        font-size: 0.875rem;
    }
    
    /* Mobile action buttons */
    .d-lg-none .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .d-lg-none .btn-sm {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .d-lg-none .btn-sm i {
        font-size: 0.75rem;
    }
}