/* DevWize CNMoney Rate Table v1.4.0 - Branch dropdown design aligned with calculator */
.cnmrt {
  --cnmrt-blue: #1559F5;
  --cnmrt-navy: #14203b;
  --cnmrt-green: #008047;
  --cnmrt-red: #df2b20;
  --cnmrt-text: #14203b;
  --cnmrt-muted: #758199;
  --cnmrt-line: #e7ebf3;
  --cnmrt-zebra: #f3f5fa;
  --cnmrt-soft: #f3f5fb;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  color: var(--cnmrt-text);
  /* No font-family: follow WordPress / Elementor site typography. */
}
.cnmrt *, .cnmrt *::before, .cnmrt *::after { box-sizing: border-box; }

/* Heading and compact branch picker */
.cnmrt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 8px 0 26px;
}
.cnmrt-heading-wrap { min-width: 0; padding-top: 3px; }
.cnmrt-title {
  margin: 0 0 11px !important;
  color: #122040;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.36;
}
.cnmrt-note {
  margin: 0 !important;
  color: #74809a;
  font-size: 13px;
  line-height: 1.6;
}
.cnmrt-header-actions {
  display: flex;
  flex: 0 0 300px;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  width: 300px;
  min-width: 0;
}
.cnmrt-updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  margin: 0 !important;
  color: #74809a;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.cnmrt-refresh,
.cnmrt-refresh:hover,
.cnmrt-refresh:active,
.cnmrt-refresh:focus {
  display: inline !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #67738d !important;
  font: inherit !important;
  font-weight: 500 !important;
  line-height: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.cnmrt-refresh:hover { color: var(--cnmrt-blue) !important; text-decoration: underline !important; }
.cnmrt-refresh:focus-visible { outline: 2px solid var(--cnmrt-blue) !important; outline-offset: 3px; }
.cnmrt-refresh:disabled { opacity: .5 !important; cursor: wait; }
.cnmrt-refresh::before, .cnmrt-refresh::after { content: none !important; display: none !important; }

/* Searchable branch selector — same visual system as [devwize_cnm_calculator].
   All rules stay scoped to .cnmrt so other WordPress dropdowns are unaffected. */
.cnmrt-branch-select {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
.cnmrt .cnmrt-branch-field-label {
  display: block;
  margin: 0 0 6px;
  color: #74809a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}
.cnmrt-branch-trigger {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 9px 15px !important;
  border: 1px solid #dce3f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #14203b !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  text-transform: none !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cnmrt-branch-trigger:hover { border-color: #bccbec !important; background: #fff !important; }
@media (min-width: 768px) {
  .cnmrt-branch-select {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .cnmrt .cnmrt-branch-field-label {
    flex: none;
    margin: 0;
    white-space: nowrap;
  }
  .cnmrt-branch-trigger {
    flex: 1;
    min-width: 0;
  }
}
.cnmrt-branch-trigger:focus-visible {
  border-color: #a5c0ff !important;
  box-shadow: 0 0 0 3px rgba(21, 89, 245, .12) !important;
}
.cnmrt-branch-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--cnmrt-blue);
}
.cnmrt-branch-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #14203b !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cnmrt-branch-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin: -4px 1px 0 0;
  border-right: 2px solid #48618e;
  border-bottom: 2px solid #48618e;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.cnmrt-branch-trigger[aria-expanded="true"] .cnmrt-branch-chevron {
  transform: translateY(4px) rotate(225deg);
}
.cnmrt-branch-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px !important;
  border: 1px solid #dae1ef !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 14px 32px rgba(35, 52, 87, .13) !important;
}
.cnmrt-branch-popover[hidden] { display: none !important; }
.cnmrt-branch-search-wrap { position: relative; margin: 0 0 8px; }
.cnmrt .cnmrt-branch-search {
  display: block !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  border: 1px solid #dce3f0 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #14203b !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.cnmrt .cnmrt-branch-search::placeholder { color: #98a2b3 !important; opacity: 1; }
.cnmrt .cnmrt-branch-search:focus {
  border-color: #1559F5 !important;
  box-shadow: 0 0 0 3px #1559F5 !important;
}
.cnmrt-branch-options {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 !important;
}
.cnmrt .cnmrt-branch-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  height: auto !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #14203b !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  overflow-wrap: anywhere;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.cnmrt .cnmrt-branch-option:hover,
.cnmrt .cnmrt-branch-option:focus-visible {
  background: #f1f5ff !important;
  outline: none !important;
}
.cnmrt .cnmrt-branch-option.is-active {
  background: #eaf1ff !important;
  color: var(--cnmrt-blue) !important;
  font-weight: 400 !important;
}
.cnmrt-branch-empty {
  margin: 12px 0;
  padding: 0 10px;
  color: var(--cnmrt-muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

/* One rounded panel: blue header + zebra rows + footer */
.cnmrt-table-panel {
  overflow: hidden;
  border: 1px solid #e2e7f1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24, 40, 81, .09);
}
.cnmrt-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cnmrt-table {
  width: 100%;
  min-width: 720px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.cnmrt-table col.cnmrt-col-cur { width: 39%; }
.cnmrt-table col.cnmrt-col-denom { width: 25%; }
.cnmrt-table col.cnmrt-col-buy { width: 18%; }
.cnmrt-table col.cnmrt-col-sell { width: 18%; }
.cnmrt-table thead th {
  height: 58px;
  padding: 17px 28px !important;
  border: 0 !important;
  background: #1559F5 !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  text-transform: none;
}
.cnmrt-table thead th.cnmrt-col-buy,
.cnmrt-table thead th.cnmrt-col-sell { text-align: right; }
.cnmrt-table tbody tr { height: 64px; }
.cnmrt-table tbody td {
  padding: 15px 28px !important;
  border: 0 !important;
  border-top: 1px solid var(--cnmrt-line) !important;
  background: #fff;
  color: var(--cnmrt-text);
  font-size: 14px;
  line-height: 1.4;
  vertical-align: middle;
}
.cnmrt-table tbody tr:first-child td { border-top: 0 !important; }
.cnmrt-table tbody tr:nth-child(even) td { background: var(--cnmrt-zebra); }
.cnmrt-table tbody tr:hover td { background: #edf2ff; }
.cnmrt-loading, .cnmrt-error {
  height: 110px;
  padding: 34px 16px !important;
  color: var(--cnmrt-muted) !important;
  text-align: center !important;
}
.cnmrt-error { color: #dc2626 !important; }
.cnmrt-cell-cur { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cnmrt-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #eef2fb;
}
.cnmrt-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cnmrt-flag-fallback { color: #3159b3; font-size: 10px; font-weight: 800; }
.cnmrt-cur-copy { display: flex; align-items: baseline; gap: 13px; min-width: 0; }
.cnmrt-cur-name {
  overflow: hidden;
  color: #596783;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cnmrt-cur-code {
  flex-shrink: 0;
  color: #13213d;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.cnmrt-table tbody td.cnmrt-cell-denom {
  color: #77839a;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.cnmrt-table tbody td.cnmrt-cell-buy,
.cnmrt-table tbody td.cnmrt-cell-sell {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.cnmrt-table tbody td.cnmrt-cell-buy { color: var(--cnmrt-green) !important; }
.cnmrt-table tbody td.cnmrt-cell-sell { color: var(--cnmrt-red) !important; }
.cnmrt-cell-na { font-size: inherit; font-weight: inherit; }

/* Integrated footer and orange booking CTA */
.cnmrt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  margin: 0;
  padding: 14px 28px;
  border: 0;
  border-top: 1px solid #e6eaf2;
  border-radius: 0;
  background: var(--cnmrt-soft);
}
.cnmrt-footer-text { color: #1f2f50; font-size: 13px; line-height: 1.5; }
.cnmrt-book-btn,
.cnmrt-book-btn:focus {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 128px;
  min-height: 46px;
  margin: 0 !important;
  padding: 11px 22px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #FF7C48 0%, #E9531F 100%) !important;
  box-shadow: 0 8px 18px -4px rgba(242, 96, 44, .32) !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background .15s ease, box-shadow .15s ease;
}
.cnmrt-book-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.cnmrt-book-btn:hover {
  border-radius: 999px !important;
  /* background: linear-gradient(180deg, #FF7C48 0%, #E9531F 100%) !important;
  box-shadow: 0 10px 22px -4px rgba(242, 96, 44, .38) !important;
  color: #fff !important; */
  color: #fff !important;
  background: linear-gradient(180deg, #FF9064 0%, #F0602B 100%) !important;
  box-shadow: 0 12px 26px -4px rgba(242, 96, 44, .42) !important;
}
.cnmrt-book-btn:active,
.cnmrt-book-btn.is-active {
  border-radius: 999px !important;
  background: linear-gradient(180deg, #FF9064 0%, #F0602B 100%) !important;
  box-shadow: 0 12px 26px -4px rgba(242, 96, 44, .42) !important;
  color: #fff !important;
}
.cnmrt-book-btn:focus-visible { outline: 3px solid rgba(21, 89, 245, .4) !important; outline-offset: 3px; }

@media (max-width: 820px) {
  .cnmrt-top { gap: 16px; }
  .cnmrt-title { font-size: 32px; }
  .cnmrt-header-actions { flex-basis: 255px; width: 255px; }
  .cnmrt-table thead th { padding-right: 20px !important; padding-left: 20px !important; }
  .cnmrt-table tbody td { padding-right: 20px !important; padding-left: 20px !important; }
}
@media (max-width: 640px) {
  .cnmrt-top {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 8px 0 18px;
  }
  .cnmrt-heading-wrap { padding-top: 0; }
  .cnmrt-title { margin-bottom: 9px !important; font-size: 32px; }
  .cnmrt-note { font-size: 12px; }
  .cnmrt-header-actions { flex: 1 1 auto; align-items: stretch; width: 100%; gap: 8px; }
  .cnmrt-branch-select { flex: 0 0 auto; width: 100%; }
  .cnmrt-updated { justify-content: flex-end; white-space: normal; }
  .cnmrt-table-panel { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .cnmrt-table-wrap { overflow: visible; }
  .cnmrt-table,
  .cnmrt-table tbody,
  .cnmrt-table tr,
  .cnmrt-table td { display: block; width: 100%; min-width: 0; }
  .cnmrt-table colgroup, .cnmrt-table thead { display: none; }
  .cnmrt-table tbody tr {
    height: auto;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #dfe6f0;
    border-radius: 12px;
    background: #fff;
  }
  .cnmrt-table tbody td,
  .cnmrt-table tbody tr:nth-child(even) td,
  .cnmrt-table tbody tr:hover td {
    display: grid;
    grid-template-columns: minmax(86px, 36%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 13px !important;
    border-top: 1px solid #e8edf3 !important;
    background: #fff;
    text-align: right;
    white-space: normal;
  }
  .cnmrt-table tbody tr td:first-child { border-top: 0 !important; grid-template-columns: 1fr; }
  .cnmrt-table tbody td::before {
    content: attr(data-label);
    color: #7a879c;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }
  .cnmrt-table tbody td:first-child::before { display: none; }
  .cnmrt-cell-cur { min-width: 0; }
  .cnmrt-cur-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); flex: 1; gap: 8px; }
  .cnmrt-cur-name { font-size: 13px; text-align: left; }
  .cnmrt-cur-code { font-size: 15px; }
  .cnmrt-table tbody td.cnmrt-cell-buy,
  .cnmrt-table tbody td.cnmrt-cell-sell,
  .cnmrt-table tbody td.cnmrt-cell-denom { text-align: right !important; }
  .cnmrt-table tbody td.cnmrt-cell-buy,
  .cnmrt-table tbody td.cnmrt-cell-sell { font-size: 14px; }
  .cnmrt-table tbody td.cnmrt-loading,
  .cnmrt-table tbody td.cnmrt-error { display: block; padding: 24px 14px !important; height: auto; }
  .cnmrt-footer {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #dfe6f0;
    border-radius: 12px;
    text-align: center;
  }
  .cnmrt-book-btn { width: 100%; }
}
@media (max-width: 380px) {
  .cnmrt-title { font-size: 32px; }
  .cnmrt-note { font-size: 11px; }
  .cnmrt-table tbody td { grid-template-columns: 82px minmax(0, 1fr); padding: 10px 11px !important; }
}

/* Fallback disclosure; only visible when API is unavailable. */
.cnmrt .cnmrt-refresh-status {
  margin-left: 5px;
  color: #8792a5;
  font-size: 11px;
  font-weight: 400;
}
.cnmrt .cnmrt-refresh-status[hidden] { display: none !important; }
.cnmrt .cnmrt-cache-warning:not([hidden]) {
  display: block;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #e9dfcd;
  border-radius: 8px;
  background: #fbf8f2;
  color: #806d50;
  font-size: 12px;
  line-height: 1.45;
}
.cnmrt .cnmrt-cache-warning[hidden] { display: none !important; }
/* Central-rate fallback is intentionally silent; keep stale-data warnings separate. */
.cnmrt .cnmrt-central-rate-warning { display: none !important; }


/* v1.5.2 — Do not allow booking navigation while the selected branch rates are loading. */
.cnmrt .cnmrt-book-btn[aria-disabled="true"] {
  pointer-events: none !important;
  opacity: .55 !important;
  cursor: not-allowed !important;
}
