/* Shared brand theme for login.html and dashboard.html.

   Top toast shown by myalert() (controller/components.js) - brand colours instead of
   Bootstrap's default green/blue. */
.myAlert-top.alert {
  margin: 0;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-bottom: 3px solid var(--fas-alert-accent);
  border-radius: 0;
  background: var(--fas-alert-bg);
  color: var(--fas-alert-ink);
  box-shadow: 0 8px 24px rgba(42, 33, 28, 0.18) !important;
  font-size: 0.95rem;
}

.myAlert-top.alert strong {
  font-weight: 600;
}

/* success / primary / info - brand orange */
.myAlert-top.alert-success,
.myAlert-top.alert-primary,
.myAlert-top.alert-info {
  --fas-alert-bg: #fdeee7;
  --fas-alert-ink: #9a2f0c;
  --fas-alert-accent: #f4511e;
}

.myAlert-top.alert-warning {
  --fas-alert-bg: #fff4e0;
  --fas-alert-ink: #8a5300;
  --fas-alert-accent: #f0a020;
}

.myAlert-top.alert-danger {
  --fas-alert-bg: #fde8e8;
  --fas-alert-ink: #a61b1b;
  --fas-alert-accent: #d93025;
}

/* Spinners and progress bars (Processing..., Set Default Configuration, Default Mappings,
   export progress) - brand orange instead of Bootstrap's blue .text-primary / .progress-bar. */
.spinner-border.text-primary {
  color: #f4511e !important;
}

.progress {
  background-color: #fdeee7;
}

.progress-bar {
  background-color: #f4511e !important;
  color: #fff;
}

/* Every accounting system: the transaction screens reset Fetch to an inline Bootstrap blue ("bcolor" =
   #0069d9) after each fetch, which beats the theme stylesheet - force the brand orange back on
   enabled primary buttons. The grey disabled state while fetching (inline "fcolor") is kept. */
#fasMainArea .btn-primary:not(:disabled) {
  background-color: #f4511e !important;
  border-color: #f4511e !important;
}

#fasMainArea .btn-primary:not(:disabled):hover,
#fasMainArea .btn-primary:not(:disabled):focus,
#fasMainArea .btn-primary:not(:disabled):active {
  background-color: #c63d12 !important;
  border-color: #c63d12 !important;
}

/* SA Tourism NTMP, AutoCount and Zoho Books: POS Account Configuration spaces its rows with <br><br> pairs, which leave big
   gaps wherever rows are hidden (City Ledger - Customer, No Charge - Customer, Surcharge, Banquet,
   Vendor - Supplier...). Drop the <br>s and space the rows with a margin, so hidden rows take no room. */
body.fas-ntmp #pos_accountconfig .form-inline > br,
body.fas-autocount #pos_accountconfig .form-inline > br,
body.fas-zoho #pos_accountconfig .form-inline > br {
  display: none;
}

body.fas-ntmp #pos_accountconfig .form-inline > .form-group,
body.fas-autocount #pos_accountconfig .form-inline > .form-group,
body.fas-zoho #pos_accountconfig .form-inline > .form-group {
  margin-bottom: 10px;
}

/* SA Tourism NTMP - Reports > Profit & Loss statement (ntmpProfitLoss.html) */
.ntmp-pl-table td,
.ntmp-pl-table th {
  padding: 0.55rem 0.9rem;
}

.ntmp-pl-table th:nth-child(2),
.ntmp-pl-table th:nth-child(3),
.ntmp-pl-table td:nth-child(2),
.ntmp-pl-table td:nth-child(3) {
  width: 18%;
  white-space: nowrap;
}

.ntmp-pl-table .ntmp-pl-section td {
  padding-top: 1rem;
  color: #c63d12;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-top: 0;
}

.ntmp-pl-table .ntmp-pl-line td:first-child {
  padding-left: 1.8rem;
}

.ntmp-pl-table .ntmp-pl-total td {
  font-weight: 600;
  border-top: 1px solid #efe3d7;
}

.ntmp-pl-table .ntmp-pl-result td {
  font-weight: 600;
  background: #fdeee7;
}

.ntmp-pl-table .ntmp-pl-net td {
  font-weight: 700;
  font-size: 1.02rem;
  background: #fbe6dc;
  border-top: 2px solid #f4511e;
}

.ntmp-pl-table .ntmp-pl-grand td {
  font-weight: 700;
  border-top: 2px solid #f4511e;
  border-bottom: 2px solid #f4511e;
}

/* AutoCount - PMS Sales: Sr. No., selected voucher and its Transaction Detail panel */
.tran-srno_PMSS {
  margin-left: 0.4rem;
  color: #6b5a4e;
}

#tableTransactions_PMSS tr.tran-selected_PMSS > td {
  background: #fdeee7;
}

#tableTransactions_PMSS tr.tran-selected_PMSS > td:nth-child(3) {
  box-shadow: inset 3px 0 0 #f4511e;
}

.tran-detail-card_PMSS {
  margin-top: 0.75rem;
}

.tran-detail-table_PMSS {
  margin-bottom: 0;
}

.tran-detail-table_PMSS tfoot th {
  border-top: 2px solid #efe3d7;
}

/* AutoCount - GST Tax Mapping: PMS tax -> AutoCount tax code, one card per section */
.gsttax-section_AC {
  border: 1px solid #efe3d7;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.gsttax-section-head_AC {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  background: #fdeee7;
  color: #9a2f0c;
  border-bottom: 1px solid #efe3d7;
}

.gsttax-section-head_AC .material-icons-round {
  font-size: 20px;
  color: #f4511e;
}

.gsttax-flow_AC {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
}

.gsttax-side_AC {
  flex: 1 1 0;
  min-width: 0;
}

.gsttax-side-label_AC {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b5a4e;
  margin-bottom: 0.35rem;
}

.gsttax-arrow_AC {
  margin-top: 1.9rem;
  color: #f4511e;
}

.gsttax-perc_AC {
  margin-top: 0.5rem;
  max-width: 170px;
}

@media (max-width: 575.98px) {
  .gsttax-flow_AC {
    flex-direction: column;
  }

  .gsttax-arrow_AC {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .gsttax-side_AC {
    width: 100%;
  }
}

/* AutoCount - POS Sales: selected voucher (Transaction Detail panel reuses the PMS Sales classes) */
#tableTransactions_POSS tr.tran-selected_POSS > td {
  background: #fdeee7;
}

#tableTransactions_POSS tr.tran-selected_POSS > td:nth-child(3) {
  box-shadow: inset 3px 0 0 #f4511e;
}

/* AutoCount voucher popup: text may wrap so every column fits, amounts stay on one line */
.tran-detail-table_PMSS td.text-right,
.tran-detail-table_PMSS th.text-right {
  white-space: nowrap;
}

/* AutoCount and Zoho Books - loader above an open popup (e.g. Configuration > Save): #wait is z-index 99 inline, Bootstrap modals are 1050 */
body.fas-autocount.modal-open #wait,
body.fas-zoho.modal-open #wait {
  z-index: 2000 !important;
}
