/* Tokenomics Chart Builder Styles */

/* Chart container */
.chart-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
    background: var(--bs-tertiary-bg);
    border-radius: 12px;
    border: 1px solid var(--bs-border-color);
}

/* Allocations table */
#allocationsTable {
    font-size: 0.9rem;
}

#allocationsTable thead th {
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom-width: 2px;
}

#allocationsTable tbody td {
    vertical-align: middle;
}

#allocationsTable tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Color picker */
.alloc-color {
    width: 36px !important;
    height: 30px !important;
    padding: 2px !important;
    cursor: pointer;
}

/* Token count in table */
.alloc-tokens {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/* Total badge */
#totalBadge {
    font-size: 0.85rem;
    min-width: 50px;
    text-align: center;
}

/* Summary list */
.summary-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Remove button */
.remove-row-btn {
    padding: 2px 6px;
    line-height: 1;
}

.remove-row-btn:hover {
    background-color: var(--bs-danger);
    color: #fff;
}

.remove-row-btn:hover .fsvg {
    filter: brightness(0) invert(1);
}

/* Row number */
.row-number {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .chart-container {
    background: rgba(30, 34, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #allocationsTable tbody tr:hover {
    background-color: rgba(168, 85, 247, 0.1);
}

[data-bs-theme="dark"] #allocationsTable thead th {
    background-color: rgba(30, 34, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table-light {
    --bs-table-bg: rgba(30, 34, 42, 0.8);
    --bs-table-color: var(--bs-body-color);
}

[data-bs-theme="dark"] .summary-item {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    #allocationsTable {
        font-size: 0.8rem;
    }

    #allocationsTable thead th,
    #allocationsTable tbody td {
        padding: 0.4rem 0.3rem;
    }

    .chart-container {
        padding: 8px;
    }

    .alloc-color {
        width: 30px !important;
        height: 26px !important;
    }
}

/* Number formatting */
#allocationsTable td span,
.alloc-tokens {
    font-variant-numeric: tabular-nums;
}
