/* static/css/cashflow_table/condition_options.css */

.cashflow-panel--condition-options {
    padding: 0.5rem 0.75rem 0.75rem;
}

.cashflow-condition-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cashflow-condition-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
}

.cashflow-condition-trigger:hover {
    background: #f8fafc;
    border-radius: 0.5rem;
}

.cashflow-condition-trigger__icon {
    display: inline-block;
    font-size: 0.875rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.cashflow-condition-trigger[aria-expanded="true"] .cashflow-condition-trigger__icon {
    transform: rotate(180deg);
}

.cashflow-condition-content {
    margin-top: 0.5rem;
}

.cashflow-condition-content.is-collapsed {
    display: none;
}

.cashflow-condition-help {
    margin: 0 0 0.75rem;
    color: #64748b;
    font-size: 0.8125rem;
}

.condition-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.condition-table {
    width: 100%;
    min-width: 62rem;
    border-collapse: collapse;
    background: #ffffff;
}

.condition-table th,
.condition-table td {
    border: 0.0625rem solid #d9deea;
    padding: 0.4rem;
    text-align: center;
    vertical-align: middle;
    font-size: 0.8125rem;
}

.condition-table th {
    background: #eef3ff;
    font-weight: 700;
    white-space: nowrap;
}

.condition-table input,
.condition-table select {
    width: 100%;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 0.0625rem solid #cbd5e1;
    border-radius: 0.375rem;
    background: #ffffff;
    box-sizing: border-box;
    font-size: 0.8125rem;
}

.condition-table th:nth-child(1),
.condition-table td:nth-child(1) {
    width: 18%;
}

.condition-table th:nth-child(2),
.condition-table td:nth-child(2),
.condition-table th:nth-child(3),
.condition-table td:nth-child(3),
.condition-table th:nth-child(6),
.condition-table td:nth-child(6) {
    width: 12%;
}

.condition-table th:nth-child(4),
.condition-table td:nth-child(4),
.condition-table th:nth-child(5),
.condition-table td:nth-child(5),
.condition-table th:nth-child(7),
.condition-table td:nth-child(7) {
    width: 9%;
}

.condition-table th:nth-child(8),
.condition-table td:nth-child(8) {
    width: 10%;
}

.condition-add-btn {
    margin-top: 0.75rem;
}

@media (max-width: 48rem) {
    .condition-table {
        min-width: 56rem;
    }
}