/* =========================================================
   KAPE'T BALAY — BASE STYLES FOR THE WHOLE SYSTEM
   Loaded last on every page (after background.css).
   1. One standard font for every page, heading, label,
      button, form and table. To change it, change --kb-font.
      Icons keep their own icon font.
   2. Number fields (amounts, guests, sort order…): no up/down
      arrows; people type the number. The mouse wheel and arrow
      keys don't change it either (see partials/action-feedback.ejs).
      Money fields also get class "amount-input" (two decimals).
========================================================= */

/* ---------- 1. Font ---------- */
:root{
    --kb-font:Arial, Helvetica, sans-serif;
}

html,
body{
    font-family:var(--kb-font);
}

/* Browsers give form controls their own font unless told to inherit */
button,
input,
select,
textarea,
optgroup,
table,
caption,
th,
td,
legend,
label{
    font-family:inherit;
}

/* ---------- 2. Number fields: typed, no spinner arrows ---------- */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

input[type="number"]{
    -moz-appearance:textfield;
    appearance:textfield;
}

/* A peso sign inside the box, for amount fields that have no label sign */
.peso-field{
    position:relative;
    display:block;
}

.peso-field::before{
    content:"₱";
    position:absolute;
    top:50%;
    left:14px;
    transform:translateY(-50%);

    color:#9a6655;
    font-weight:800;
    pointer-events:none;
}

.peso-field input.amount-input{
    padding-left:32px !important;
}

/* ---------- 3. Amounts: always right-aligned ----------
   .amount      an amount value (₱1,250.00): right-aligned, digits
                lined up, never split over two lines
   .amount-row  a label on the left and its amount on the right,
                e.g. "Total:  ₱1,250.00" or an order item and its price */
.amount{
    text-align:right !important;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
}

.amount-row{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
}

.amount-row > .amount{
    margin-left:auto;
    flex:none;
}

/* table columns that hold amounts (header and cells) */
th.amount,
td.amount{
    text-align:right !important;
}

/* typed money amounts sit on the right too, like every amount */
input.amount-input{
    text-align:right;
    font-variant-numeric:tabular-nums;
}
