﻿/* ===== CALCULATOR PAGE ===== */

.rab-drag-handle {
  cursor: grab;
  color: var(--g3);
  font-weight: 600;
  padding: 0 4px;
}

#page-calculator .tw table th:first-child,
#page-calculator .tw table td:first-child {
  width: 32px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

tr.rab-dragging {
  opacity: 0.4;
}

tr.rab-drag-over td {
  border-top: 2.5px solid var(--teal-d) !important;
}

/* ===== MOBILE RESPONSIVE ===== */

@media(max-width: 768px) {
  .rab-drag-handle {
    display: none !important;
  }

  #page-calculator .tw table th:first-child,
  #page-calculator .tw table td:first-child {
    display: none !important;
  }

  /* Card header buttons wrap */
  #page-calculator .card-hd {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }

  #page-calculator .card-hd > div {
    width: 100%;
    flex-wrap: wrap;
  }

  #page-calculator .card-hd select,
  #page-calculator .card-hd button {
    width: 100%;
  }

  /* PAX input row stacks */
  #page-calculator [style*="display:flex;align-items:center;gap:12px"] {
    flex-direction: column;
    align-items: stretch !important;
  }

  #page-calculator input[id^="calc-"] {
    width: 100% !important;
  }

  /* Footer inputs responsive */
  .rab-footer .rf-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .rab-footer .rf-row span:last-child {
    width: auto;
  }

  .rab-footer input {
    width: auto !important;
    max-width: 100px !important;
  }

  /* Calculator table responsive */
  #page-calculator table th,
  #page-calculator table td {
    font-size: 12px;
    padding: 8px 6px !important;
  }

  #page-calculator table th:nth-child(2),
  #page-calculator table td:nth-child(2) {
    display: none;
  }

  /* Action buttons in table */
  #page-calculator .ib {
    padding: 4px 8px;
    font-size: 12px;
  }
}

@media(max-width: 480px) {
  /* Further reduce footer layout */
  .rf-row {
    font-size: 12px;
    padding: 8px 0;
  }

  .rf-row.total {
    font-size: 14px;
  }

  #page-calculator table {
    font-size: 11px;
  }

  #page-calculator .ib {
    padding: 3px 6px;
    font-size: 11px;
  }

  /* Button text wrapping */
  #page-calculator button {
    white-space: normal;
  }
}
