/* Shared styles for all vector month/rate table components */

.vector-table-block {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.vector-grid-wrapper {
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    display: block;
}

.vector-grid {
    width: 100%;
    min-width: max-content;
    table-layout: auto;
    border-collapse: collapse;
    background-color: var(--neutral-layer-1);
    border: none;
}

.vector-grid thead {
    background-color: var(--neutral-layer-1);
}

.vector-grid thead tr {
    border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
    border-top: none;
}

.vector-grid th {
    padding: 0 11px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--neutral-foreground-rest);
    white-space: nowrap;
    height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    min-width: 90px;
}

.vector-grid th:first-child {
    min-width: 40px;
}

.vector-grid tbody tr {
    border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
    transition: background-color 0.1s ease;
    background-color: #ffffff;
}

.vector-grid tbody tr:last-child {
    border-bottom: none;
}

.vector-grid tbody tr:hover {
    background-color: var(--neutral-fill-secondary-hover);
    cursor: pointer;
}

.vector-grid td {
    padding: 0 11px;
    height: 48px;
    vertical-align: middle;
    box-sizing: border-box;
    min-width: 90px;
}

.vector-grid td.action-cell {
    padding: 0;
    width: 40px;
    min-width: 40px;
}

.grid-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.grid-action-btn {
    background: none;
    border: none;
    color: #d13438;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.grid-action-btn:hover {
    background-color: rgba(209, 52, 56, 0.1);
}

.add-row-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 280px;
    align-self: center;
    margin-top: 8px;
}

.add-row-btn:hover {
    border-color: #005EFF;
    color: #005EFF;
    background: #f0f7ff;
}

.vector-grid td fluent-number-field {
    width: 100%;
}

.vector-grid td fluent-number-field::part(control) {
    border: none;
    background: transparent;
    padding: 0;
}

.vector-grid td fluent-number-field::part(root) {
    background: transparent;
}

.vector-grid td fluent-number-field input {
    border: none;
    background: transparent;
    padding: 4px;
    font-size: 12px;
    text-align: center;
}

.vector-grid td fluent-number-field input:focus {
    outline: none;
    box-shadow: none;
}
