.fvm-matrix { margin: 0 0; width: 1500px; max-width: 100%; background: #ff4e5f; padding: 0;}
.fvm-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.1em;  border-top:2px solid hsl(0deg 0% 100% / 75%);   border-bottom:2px solid hsl(0deg 0% 100% / 75%);}
.fvm-table th, .fvm-table td { border: none; padding: .75rem; text-align: center; vertical-align: middle; border-bottom: 2px solid hsla(0, 0%, 50.2%, 0.25); }
.fvm-table thead:first-child tr:first-child th { border-bottom: 2px solid hsla(0, 0%, 50.2%, 0.25); border-top: none;}
.fvm-table thead:first-child tr:first-child th, .fvm-table th, .fvm-table td { border-bottom: 2px solid hsl(0deg 0% 100% / 75%);}
.fvm-table, .fvm-cell__choice:has(input:checked) .fvm-cell-label {    color: #fff;}
.fvm-table th.fvm-row { text-align: right; white-space: nowrap; }
.fvm-col__label, .fvm-row__label { font-weight: 600; }
.fvm-cell.is-missing { opacity:.35; }
.fvm-cell__choice { cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.fvm-box { width: 18px; height: 18px; border: 2px solid #fff; display:inline-block; border-radius: 3px; position: relative; }
.fvm-choice:checked + .fvm-box {border: 2px solid #ff4e5f;}
.fvm-choice:checked + .fvm-box::after { content:""; position:absolute; inset:2px; background:#ff4e5f; border-radius:2px; }
td.fvm-cell:has(input[type="checkbox"]:checked) { background: #fff !important;}
.fvm-cell__choice:has(input:checked) .fvm-cell-label {  color: #ff4e5f;  font-weight: bold;}
.fvm-choice { display:none; }
.fvm-price::after {content:' | '; padding-left: 10px;}
.fvm-price { font-weight: 600; display:inline-block; }
.fvm-actions { margin-top: 1rem; display:flex; align-items:center; gap: 1rem; flex-direction: row; justify-content: space-between; align-items: flex-start;}
.fvm-status { font-size: .9em; opacity:.9; }
.fvm-na { opacity:.45; }
.fvm-total-header { font-weight: 700; }
.fvm-table td.fvm-cell, .fvm-table thead th.fvm-col { width: calc((100% - 420px) / 3);}
.fvm-table tfoot .fvm-foot-spacer {border-right: none;}
.fvm-table tbody th.fvm-row, .fvm-table thead th.fvm-corner { width: 200px; text-align: center;}
.fvm-table tbody .fvm-row-total, .fvm-table thead th.fvm-total-header {width: 220px;}
.fvm-table .fvm-row-total, .fvm-table .fvm-grand-total { font-weight: 700; background: transparent !important; width: 220px; padding-right: 0;  text-align: center; direction: ltr;}

.fvm-table .fvm-grand-total {direction: ltr;}
.fvm-grand-total-row th, .fvm-grand-total-row td { border-top: 2px solid #ddd; border-bottom: none; }
.fvm-cell-label { font-size: .95em; }
.fvm-actions .button.fvm-add {background: #fff !important;  color: #ff4e5f !important; font-weight: 400; font-size: 1.35em; border-radius: 0; padding: 16px 34px;     width: 220px; transition: all 0.5s ease; margin: 0 auto;}
.fvm-actions .button.fvm-add:hover { transform: scale(1.1); }
.fvm-grand-total .fvm-row__label {font-size: 0.75em;}
.fvm-grand-total-line { display: flex; flex-direction: row-reverse; justify-content: center; align-items: flex-end;  gap: 4px;}
table tbody tr:hover>td.fvm-cell, table tbody tr:hover>th.fvm-row {background-color: inherit;}

@keyframes fvm-wobble {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-6deg) translateX(-1px); }
  40%  { transform: rotate(6deg)  translateX(1px); }
  60%  { transform: rotate(-4deg) translateX(-1px); }
  80%  { transform: rotate(4deg)  translateX(1px); }
  100% { transform: rotate(0deg); }
}
.fvm-add.is-wobbling {
  animation: fvm-wobble 0.6s ease both;
  display: inline-block;
  transform-origin: 50% 50%;
  will-change: transform;
}
.fvm-status.is-hidden { display: none; }

.fvm-cell-prices {
    margin-top: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    direction: ltr;
    padding-right: 10px;
    vertical-align: middle;
}
.fvm-cell:has(.fvm-choice:checked) .fvm-cell-prices { color: #ff4e5f; }
.fvm-price-old {
  text-decoration: line-through;
  opacity: .65;
  font-size: .9em;
}
.fvm-price {
  font-weight: 600;
}


@media only screen and (max-width: 1024px) {
    .fvm-matrix {
        width: 1024px;
        max-width: 100%;
    }
    .fvm-table .fvm-row-total, .fvm-table .fvm-grand-total {
        width: 140px;
        padding-right: 10px;
    }    
    .fvm-cell-label {
        font-size: .75em;
    }    
    table tfoot th, table thead th {
        font-size: 0.85em;
    }    
}
@media only screen and (max-width: 768px) {
    .fvm-table {
        display: flex;
        flex-direction: column;
    }
    thead tr {
        display: none;
    }
    .fvm-matrix tbody tr {
        display: flex;
        flex-wrap: wrap;
    }
    .fvm-matrix tbody tr .fvm-cell, .fvm-matrix tbody tr .fvm-row-total, .fvm-matrix tbody tr .fvm-row {
        display: block;       
        box-sizing: border-box;
        min-width: 0;           
    }
    .fvm-matrix tbody tr .fvm-row, .fvm-matrix tbody tr .fvm-row-total {
        flex: 0 0  50%;
        order: 0; 
        border-right: none;
        text-align: right;
    }
    .fvm-matrix tbody tr .fvm-cell {
        flex: 0 0 33%;
        order: 1;  
        padding: 16px 5px;
        text-align: right;
    }  
    .fvm-matrix tbody tr .fvm-cell:nth-child(2) {
        flex: 0 0 33%;
        border-right: none;
    }
    .fvm-matrix tbody tr .fvm-row-total {
        text-align: left;
    }
    .fvm-matrix tbody tr .fvm-row-total {visibility: hidden;}
    .fvm-box {
        flex: none;
    }
    .fvm-grand-total-row {
        display: flex;
        flex-wrap: wrap;
    }
    .fvm-grand-total-row th,
    .fvm-grand-total-row td {
        border: none;
    }
    .fvm-table .fvm-grand-total {
        width: 100%;
        padding: 0 10px 0;
    }
    .fvm-actions {
        margin: 0 0 40px;
        justify-content: flex-start;
    }
    .fvm-table th {
        border-bottom: none;
    }
    .fvm-table {border-bottom: none;}
    .fvm-cell-prices {font-size: 0.9em; margin-top: 5px; padding-right: 26px;}
    .fvm-price::after {display: none;}
}


/* UPDATE- Hide row totals column + old footer total row */
.fvm-total-header,
.fvm-row-total,
.fvm-grand-total-row { display: none; }
.fvm-actions-total {
    font-weight: 600;     
    color: #fff;
    width: 200px;
    text-align: center;
    direction: ltr;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 8px;
    align-items: baseline;
}
.fvm-actions-total-label {display: block; width: 100%;}
.fvm-grand-total-amount-label, .fvm-actions-total-label {font-size:0.8em;}
.fvm-grand-total-amount {font-size: 1.35em;}
.fvm-actions-buttonwrp {display: flex; flex-direction: row-reverse; gap: 10px;}
.fvm-actions-buttonwrp, .fvm-actions-buttonwrp a {color: #fff;}
.fvm-actions-buttonwrp {
    WIDTH: calc((100% - 200px) / 3);
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 0;
}
@media only screen and (max-width: 768px) {
    .fvm-actions {
        flex-direction: column;
    }
    .fvm-actions-buttonwrp, .fvm-actions-total  {
        width: 100%;
    }
    .fvm-actions-total {text-align: right;}
    .fvm-actions-total {    justify-content: flex-start;}
}


