/* Common styles for both broker and crypto exchange comparisons */
.brickcomp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgb(26 26 26 / 50%);
}

.brickcomp-selector {
    margin-bottom: 40px;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #3e3e3e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.brickcomp-selector h2 {
    margin-bottom: 20px;
    color: #ffffff;
}

/* Search and Dropdown Styles */
.brickcomp-dropdown {
    position: relative;
    margin-bottom: 20px;
}

.brickcomp-search {
    width: 100%;
    padding: 12px;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    background: rgb(26 26 26 / 50%);
    color: #ffffff;
    font-size: 16px;
}

.brickcomp-search:focus {
    outline: none;
    border-color: #FF6216;
}

.brickcomp-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: rgb(26 26 26 / 50%);
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: #FF6216 rgb(26 26 26 / 50%);
}

/* Custom scrollbar styling */
.brickcomp-list::-webkit-scrollbar {
    width: 3px;
}

.brickcomp-list::-webkit-scrollbar-track {
    background: rgb(26 26 26 / 50%);
    border-radius: 1.5px;
}

.brickcomp-list::-webkit-scrollbar-thumb {
    background-color: #FF6216 !important;
    border-radius: 1.5px;
}

.brickcomp-list::-webkit-scrollbar-thumb:hover {
    background-color: #FF6216 !important;
    opacity: 0.8;
}

.brickcomp-option {
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c2c2c2;
    transition: all 0.3s ease;
}

.brickcomp-option:hover {
    background: #3e3e3e;
    color: #ffffff;
}

/* Selected Items */
.brickcomp-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.brickcomp-selected-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgb(26 26 26 / 50%);
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    color: #ffffff;
}

.brickcomp-remove-item {
    background: none;
    border: none;
    color: #c2c2c2;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    transition: color 0.3s ease;
}

.brickcomp-remove-item:hover {
    color: #FF6216;
}

/* Comparison Table */
.brickcomp-comparison-results {
    display: none;
    margin-top: 30px;
}

.brickcomp-comparison-tbl {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 800px;
    table-layout: fixed;
}

.brickcomp-comparison-tbl th,
.brickcomp-comparison-tbl td {
    padding: 15px;
    border: 1px solid #3e3e3e;
    text-align: left;
    vertical-align: top;
    color: #c2c2c2;
    word-wrap: break-word;
}

.brickcomp-comparison-tbl th {
    font-weight: 600;
    color: #ffffff;
    position: sticky;
    top: 0;
}

.brickcomp-section-header {
    font-weight: 600;
    font-size: 1.1em;
    color: #ffffff;
    background: rgb(26 26 26 / 50%);
}

/* Header Content */
.brickcomp-header {
    min-width: 220px;
    max-width: 280px;
    position: relative;
}

.brickcomp-header-content {
    text-align: center;
    padding: 15px;
    color: #ffffff;
    position: relative;
    padding-top: 30px;
}

.brickcomp-header-content h3 {
    margin: 10px 0;
    color: #ffffff;
}

.brickcomp-header-content h3:hover {
    color: #ff6216;
}

.brickcomp-header-image {
    min-width: 160px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(255, 255, 255);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #3e3e3e;
    transition: all 0.3s ease;
}

.brickcomp-header-image:hover {
    border-color: #FF6216;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.brickcomp-header-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Actions */
.brickcomp-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.brickcomp-website-link {
    display: inline-block;
    padding: 8px 16px;
    background: rgb(26 26 26 / 50%);
    color: #c2c2c2;
    text-decoration: none;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.brickcomp-website-link:hover {
    background: #3e3e3e;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Rating Display */
.brickcomp-rating-display {
    display: flex;
    align-items: center;
}

.brickcomp-rating-display .rating-value {
    font-weight: bold;
    color: #d4d4d4;
}

.brickcomp-rating-display .rating-stars {
    color: #ff6016;
    margin-left: 10px;
}

.brickcomp-rating-display .rating-stars i {
    margin-right: 2px;
}

.brickcomp-rating-display.overall-score {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.brickcomp-rating-display.overall-score .total-score-box {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.brickcomp-rating-display.overall-score .score-number {
    font-size: 24px;
    font-weight: bold;
    color: #ff6216;
}

.brickcomp-rating-display.overall-score .score-out-of {
    font-size: 16px;
    color: #c2c2c2;
}

/* Pros and Cons Lists */
.brickcomp-pros-list {
    color: #4CAF50;
}

.brickcomp-pros-list::before {
    content: '+';
    margin-right: 5px;
    font-weight: bold;
}

.brickcomp-cons-list {
    color: #f44336;
}

.brickcomp-cons-list::before {
    content: '−';
    margin-right: 5px;
    font-weight: bold;
}

.brickcomp-pros-list, .brickcomp-cons-list {
    line-height: 1.6;
}

.brickcomp-pros-list br, .brickcomp-cons-list br {
    margin-bottom: 5px;
    display: block;
    content: "";
}

/* Footer */
.brickcomp-footer {
    background: rgb(12 11 11);
}

.brickcomp-footer .brickcomp-header {
    padding: 0;
}

.brickcomp-footer .brickcomp-header-content {
    padding: 15px;
    border-top: 1px solid #3e3e3e;
    padding-top: 30px;
}

.brickcomp-footer .brickcomp-header-image {
    margin-bottom: 10px;
}

.brickcomp-footer .brickcomp-header-content h3 {
    margin: 10px 0;
}

.brickcomp-footer .brickcomp-actions {
    margin-top: 10px;
}

/* Scroll Buttons */
.brickcomp-scroll-buttons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
}

.brickcomp-scroll-button {
    padding: 8px 16px;
    background: rgb(26 26 26 / 80%);
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    cursor: pointer;
    color: #c2c2c2;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brickcomp-scroll-button:hover {
    background: #3e3e3e;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .brickcomp-comparison-tbl th:first-child,
    .brickcomp-comparison-tbl td:first-child {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
    
    .brickcomp-comparison-tbl th:not(:first-child),
    .brickcomp-comparison-tbl td:not(:first-child) {
        width: calc((100% - 200px) / var(--column-count, 1));
    }
}

@media (max-width: 768px) {
    .brickcomp-comparison-tbl th:first-child,
    .brickcomp-comparison-tbl td:first-child {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
    
    .brickcomp-comparison-tbl th:not(:first-child),
    .brickcomp-comparison-tbl td:not(:first-child) {
        width: calc((100% - 180px) / var(--column-count, 1));
    }

    .brickcomp-scroll-buttons {
        display: none;
    }
}

/* Loading and Error States */
.brickcomp-loading {
    text-align: center;
    padding: 20px;
    color: #c2c2c2;
}

.brickcomp-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #3e3e3e;
    border-radius: 50%;
    border-top-color: #FF6216;
    animation: spin 1s linear infinite;
}

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

.brickcomp-error {
    text-align: center;
    padding: 20px;
    color: #f44336;
    background: rgb(26 26 26 / 50%);
    border-radius: 4px;
    margin: 20px 0;
}

/* Additional Utility Classes */
.brickcomp-disclaimer {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0;
    text-align: center;
    font-style: italic;
}

.brickcomp-license-badge {
    display: inline-block;
    padding: 2px 8px;
    background-color: rgb(26 26 26 / 50%);
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.9em;
    color: #c2c2c2;
    border: 1px solid #3e3e3e;
}

.brickcomp-no-results {
    text-align: center;
    padding: 20px;
    color: #c2c2c2;
    background: rgb(26 26 26 / 50%);
    border-radius: 4px;
    margin: 20px 0;
}

.brickcomp-selected-count {
    color: #c2c2c2;
    margin-bottom: 10px;
    font-size: 14px;
}
