/* =============================================
   FundAllocation Style for Kendo Grid
   Matches the Figma FundAllocationTable.tsx design
   
   Colors from FundAllocationTable:
   - PRIMARY: #003D39
   - GRADIENT_LIGHT: #D8EEDB  
   - BORDER_GRAY: #868E95
   - TEXT_DARK: #182630
   - TEXT_GRAY: #656E76
   - DISABLED_BG: #ECE7E3
   ============================================= */

/* =============================================
   Container Wrapper
   ============================================= */
.fund-allocation-grid-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 24px 0;
}

/* =============================================
   Grid Container - Reset Kendo defaults
   ============================================= */
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid {
    border: none;
    background-color: transparent;
    font-family: inherit;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-header-wrap,
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-content {
    border: none;
}

/* =============================================
   Header Styling
   ============================================= */
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-header {
    background-color: transparent;
    border-bottom: 2px solid #868E95;
    padding: 0;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-header th.k-header {
    background-color: transparent;
    color: #003D39;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 8px;
    border: none;
    white-space: nowrap;
    vertical-align: middle;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-header th.k-header .k-link {
    color: #003D39;
    font-weight: 700;
}

/* =============================================
   Body/Content Styling
   ============================================= */
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-content {
    background-color: transparent;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-content tr {
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-content tr:hover {
    background-color: #f9fafb;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-content tr td {
    padding: 8px;
    vertical-align: middle;
    border: none;
    color: #182630;
    font-size: 14px;
}

/* =============================================
   Fund Name Cell (First Column)
   ============================================= */
.fund-allocation-grid-wrapper .fa-fund-cell {
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    border: 1px solid #868E95;
    border-radius: 4px;
    font-size: 14px;
    color: #182630;
    overflow: hidden;
}

.fund-allocation-grid-wrapper .fa-fund-cell.fa-zero-amount {
    color: #656E76;
}

.fund-allocation-grid-wrapper .fa-fund-cell.fa-closed {
    text-decoration: line-through;
    text-decoration-color: #dc2626;
}

.fund-allocation-grid-wrapper .fa-fund-cell .fa-fund-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fund-allocation-grid-wrapper .fa-fund-cell .fa-warning-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #eab308;
}

/* =============================================
   Amount Input Cell (EUR)
   ============================================= */
.fund-allocation-grid-wrapper .fa-amount-cell {
    position: relative;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-input {
    height: 32px;
    width: 100%;
    padding: 0 48px 0 8px;
    border: 1px solid #868E95;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
    background-color: #fff;
    color: #182630;
    outline: none;
    box-sizing: border-box;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-input:focus {
    border-color: #000;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-input:disabled {
    background-color: #ECE7E3;
    color: #656E76;
    cursor: not-allowed;
    opacity: 1;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-input.fa-zero-amount {
    color: #656E76;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-input.fa-closed {
    text-decoration: line-through;
    text-decoration-color: #dc2626;
}

.fund-allocation-grid-wrapper .fa-amount-cell .fa-currency {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #656E76;
    pointer-events: none;
}

/* =============================================
   Percentage Cell
   ============================================= */
.fund-allocation-grid-wrapper .fa-percent-cell {
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border: 1px solid #868E95;
    border-radius: 4px;
    font-size: 14px;
    color: #182630;
}

.fund-allocation-grid-wrapper .fa-percent-cell.fa-zero-amount {
    color: #656E76;
}

.fund-allocation-grid-wrapper .fa-percent-cell .fa-percent-value {
    text-align: right;
    flex: 1;
}

.fund-allocation-grid-wrapper .fa-percent-cell .fa-percent-symbol {
    color: #656E76;
    margin-left: 4px;
}

/* =============================================
   Delete Button
   ============================================= */
.fund-allocation-grid-wrapper .fa-delete-btn {
    width: 40px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgb(207, 32, 20);
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    padding: 0;
}

.fund-allocation-grid-wrapper .fa-delete-btn:hover {
    background-color: rgba(207, 32, 20, 0.1)!important;
    border: 1px solid rgb(207, 32, 20)!important;
}

.fund-allocation-grid-wrapper .fa-delete-btn i,
.fund-allocation-grid-wrapper .fa-delete-btn svg {
    font-size: 14px;
    width: 16px;
    height: 16px;
}

/* =============================================
   Footer - Total and Remaining Rows (NO gradient background)
   ============================================= */
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-footer {
    background-color: transparent;
    border-top: none;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-grid-footer td {
    background-color: transparent!important;
    padding: 8px;
    border: none!important;
    font-size: 14px;
    color: #000;
    vertical-align: middle;
}

/* Footer rows structure */
.fund-allocation-grid-wrapper .fa-footer-total-row,
.fund-allocation-grid-wrapper .fa-footer-remaining-row {
    text-align: right;
    height: 50%;
    display: grid;
    align-items: center;
    padding: 8px 0;
}

.fund-allocation-grid-wrapper .fa-footer-label {
    text-align: right;
    font-size: 14px;
    color: #000;
    padding-right: 12px;
    font-weight: 600;
}

/* Total cell (with gradient background) */
.fund-allocation-grid-wrapper .fa-total-cell {
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.fund-allocation-grid-wrapper .fa-total-cell .fa-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.fund-allocation-grid-wrapper .fa-total-cell .fa-total-value,
.fund-allocation-grid-wrapper .fa-total-cell .fa-total-label {
    position: relative;
    z-index: 1;
    color: white;
    mix-blend-mode: difference;
}

/* Remaining cell */
.fund-allocation-grid-wrapper .fa-remaining-cell {
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    background-color: transparent;
    color: #000;
}

/* =============================================
   Pager Styling
   ============================================= */
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-pager-wrap {
    background-color: transparent;
    border-top: 1px solid #e5e7eb;
    padding: 12px 8px;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-pager-wrap .k-link,
.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-pager-wrap .k-pager-numbers .k-link {
    color: #003D39;
}

.fund-allocation-grid-wrapper [id^="selectedSupportsGrid_"].k-grid .k-pager-wrap .k-state-selected {
    background-color: #003D39;
    color: #fff;
    border-color: #003D39;
}

/* =============================================
   Kendo NumericTextBox Override
   ============================================= */
.fund-allocation-grid-wrapper .k-numerictextbox {
    width: 100%;
}

.fund-allocation-grid-wrapper .k-numerictextbox .k-numeric-wrap {
    border: 1px solid #868E95;
    border-radius: 4px;
    height: 32px;
    background-color: #fff;
}

.fund-allocation-grid-wrapper .k-numerictextbox .k-numeric-wrap:focus-within {
    border-color: #000;
    box-shadow: none;
}

.fund-allocation-grid-wrapper .k-numerictextbox .k-numeric-wrap .k-input {
    height: 30px;
    padding: 0 48px 0 8px;
    font-size: 14px;
    text-align: right;
    border: none;
    background: transparent;
    color: #182630;
}

.fund-allocation-grid-wrapper .k-numerictextbox .k-numeric-wrap .k-select {
    display: none;
}

.fund-allocation-grid-wrapper .k-numerictextbox.k-state-disabled .k-numeric-wrap {
    background-color: #ECE7E3;
    opacity: 1;
}

.fund-allocation-grid-wrapper .k-numerictextbox.k-state-disabled .k-numeric-wrap .k-input {
    color: #656E76;
}

/* =============================================
   SVG Trash Icon
   ============================================= */
.fund-allocation-grid-wrapper .fa-trash-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
