/* Module forms: gateway, parties, payment links, bulk payments, statements, fx.
   Panel tokens copied from .step-details-form .inputs / .site-card / .table-filter in styles.css. */

/* 1. Controls usable anywhere inside the panel page (not only inside .step-details-form .inputs) */
.main-user-dahboard .page-gap .box-input {
  width: 100%;
  height: 50px;
  border-radius: 6px;
  border: 2px solid rgba(3, 3, 6, 0.2);
  font-size: 14px;
  font-weight: 600;
  padding: 0 15px;
  box-shadow: none;
  background: transparent;
}
.main-user-dahboard .page-gap .box-input:focus {
  border-color: rgba(3, 3, 6, 0.5);
}
.main-user-dahboard .page-gap .box-textarea {
  width: 100%;
  border-radius: 6px;
  border: 2px solid rgba(3, 3, 6, 0.2);
  font-size: 16px;
  font-weight: 500;
  padding: 15px;
  box-shadow: none;
  background: transparent;
}
.main-user-dahboard .page-gap .box-textarea:focus {
  border-color: rgba(3, 3, 6, 0.5);
}
.main-user-dahboard .page-gap .input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: rgba(3, 3, 6, 0.6);
}
.main-user-dahboard .page-gap .input-label .required {
  color: #ed2e2e;
}
.main-user-dahboard .page-gap .input-info-text {
  font-size: 11px;
  color: rgba(239, 71, 111, 0.7);
  font-weight: 700;
  margin-left: 3px;
}
.main-user-dahboard .page-gap .form-check-input:checked,
.main-user-dahboard .page-gap .source-radio:checked {
  background-color: #6c3beb;
  border-color: #6c3beb;
}
.main-user-dahboard .page-gap .source-radio {
  width: 18px;
  height: 18px;
  accent-color: #6c3beb;
  cursor: pointer;
}
.main-user-dahboard .page-gap .table-para {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

/* 2. Public checkout/pay controls (td-* markup) for the default theme */
.td-form-group {
  position: relative;
  margin-bottom: 20px;
}
.td-form-group .input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: rgba(3, 3, 6, 0.6);
}
.td-form-group .input-field {
  position: relative;
}
.td-form-group .input-field .form-control,
.td-form-group .input-field input:not([type=checkbox]):not([type=radio]) {
  width: 100%;
  height: 50px;
  border-radius: 6px;
  border: 2px solid rgba(3, 3, 6, 0.2);
  font-size: 14px;
  font-weight: 600;
  padding: 0 15px;
  box-shadow: none;
  background: transparent;
}
.td-form-group .input-field .form-control:focus,
.td-form-group .input-field input:focus {
  border-color: rgba(3, 3, 6, 0.5);
  outline: 0;
}
.td-form-group.has-right-icon .form-control {
  padding-inline-end: 46px;
}
.td-form-group .input-icon {
  position: absolute;
  inset-inline-end: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  line-height: 1;
}
.td-underline-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: #6c3beb;
  text-decoration: underline;
}
.td-underline-btn:hover {
  color: #4a1fbb;
}

/* 3. Dark mode (body.dark-theme), palette from the existing .dark-theme rules */
.dark-theme .main-user-dahboard .page-gap .box-input,
.dark-theme .main-user-dahboard .page-gap .box-textarea {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.dark-theme .main-user-dahboard .page-gap .box-input:focus,
.dark-theme .main-user-dahboard .page-gap .box-textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
}
.dark-theme .main-user-dahboard .page-gap .input-label {
  color: rgba(255, 255, 255, 0.7);
}
.dark-theme .td-form-group .input-label {
  color: rgba(255, 255, 255, 0.7);
}
.dark-theme .td-form-group .input-field .form-control,
.dark-theme .td-form-group .input-field input:not([type=checkbox]):not([type=radio]) {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.dark-theme .td-form-group .input-field .form-control:focus,
.dark-theme .td-form-group .input-field input:focus {
  border-color: rgba(255, 255, 255, 0.6);
}
.dark-theme .td-underline-btn {
  color: #ffffff;
}

/* 4. Bootstrap muted/secondary text, panel only, dark mode.
   Bootstrap forces colour with !important, so the override needs it too.
   White public cards (.gateway-checkout-shell, .gateway-pay-shell) live outside .main-user-dahboard and are untouched. */
body.dark-theme .main-user-dahboard .text-muted,
body.dark-theme .main-user-dahboard ul.text-muted,
body.dark-theme .main-user-dahboard ol.text-muted,
body.dark-theme .main-user-dahboard .text-secondary,
body.dark-theme .main-user-dahboard .text-black-50,
body.dark-theme .main-user-dahboard .form-text,
body.dark-theme .main-user-dahboard .help-block {
  color: rgba(255, 255, 255, 0.7) !important;
}
body.dark-theme .main-user-dahboard small:not([class*="text-"]),
body.dark-theme .main-user-dahboard .small:not([class*="text-"]) {
  color: rgba(255, 255, 255, 0.7);
}

/* Date picker popup (daterangepicker, as used on Transactions and the module pages) in dark mode.
   The base theme keeps it white with dark text; here it follows the dark panel palette. */
body.dark-theme .daterangepicker {
  color: rgba(255, 255, 255, 0.9);
  background-color: #172622;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

body.dark-theme .daterangepicker:before {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .daterangepicker:after {
  border-bottom-color: #172622;
}

body.dark-theme .daterangepicker .calendar-table,
body.dark-theme .daterangepicker .calendar-table table {
  color: rgba(255, 255, 255, 0.9);
  background-color: transparent;
  border-color: transparent;
}

body.dark-theme .daterangepicker .calendar-table th,
body.dark-theme .daterangepicker .calendar-table td {
  color: rgba(255, 255, 255, 0.9);
  background-color: transparent;
  border-color: transparent;
}

body.dark-theme .daterangepicker td.off,
body.dark-theme .daterangepicker td.off.in-range,
body.dark-theme .daterangepicker td.off.start-date,
body.dark-theme .daterangepicker td.off.end-date {
  color: rgba(255, 255, 255, 0.35);
  background-color: transparent;
}

body.dark-theme .daterangepicker td.disabled,
body.dark-theme .daterangepicker option.disabled {
  color: rgba(255, 255, 255, 0.25);
  text-decoration: line-through;
}

body.dark-theme .daterangepicker td.available:hover,
body.dark-theme .daterangepicker th.available:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .daterangepicker td.in-range {
  color: #fff;
  background-color: rgba(108, 59, 235, 0.28);
}

body.dark-theme .daterangepicker td.active,
body.dark-theme .daterangepicker td.active:hover {
  color: #fff;
  background-color: #6c3beb;
}

body.dark-theme .daterangepicker .calendar-table .next span,
body.dark-theme .daterangepicker .calendar-table .prev span {
  border-color: #fff;
}

body.dark-theme .daterangepicker select.monthselect,
body.dark-theme .daterangepicker select.yearselect,
body.dark-theme .daterangepicker select.hourselect,
body.dark-theme .daterangepicker select.minuteselect,
body.dark-theme .daterangepicker select.secondselect,
body.dark-theme .daterangepicker select.ampmselect {
  color: rgba(255, 255, 255, 0.9);
  background-color: #1f2e29;
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .daterangepicker .drp-buttons {
  border-top-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .daterangepicker .drp-selected {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-theme .daterangepicker .ranges li {
  color: rgba(255, 255, 255, 0.9);
}

body.dark-theme .daterangepicker .ranges li:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .daterangepicker .ranges li.active {
  color: #fff;
  background-color: #6c3beb;
}

/* 5. select2 in module pages (fund-transfer look is the global .select2-container--default rules in styles.css:
   50px, 2px rgba(3,3,6,.2), radius 6, rendered 600/15px, dropdown 2px border, highlight #6c3beb).
   These blocks only fill the gaps for other wrappers, open/disabled state, dark arrow/selected/disabled. */
.main-user-dahboard .page-gap .select2-container {
  width: 100% !important;
  max-width: 100%;
}
.main-user-dahboard .page-gap .select2-container--default .select2-selection--single .select2-selection__rendered {
  font-size: 14px;
  padding-right: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main-user-dahboard .page-gap .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: rgba(3, 3, 6, 0.6);
  font-weight: 500;
}
.main-user-dahboard .page-gap .select2-container--default.select2-container--open .select2-selection--single,
.main-user-dahboard .page-gap .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: rgba(3, 3, 6, 0.5);
}
.main-user-dahboard .page-gap .select2-container--default.select2-container--disabled .select2-selection--single {
  opacity: 0.6;
  cursor: not-allowed;
}
.main-user-dahboard .page-gap .inputs .select2-container,
.main-user-dahboard .page-gap .form-group .select2-container {
  margin-bottom: 20px;
}
.main-user-dahboard .page-gap .inputs .row .select2-container {
  margin-bottom: 0;
}
/* filter bars: same height as the other .table-filter controls */
.main-user-dahboard .page-gap .table-filter .filter .select2-container,
.main-user-dahboard .page-gap .single-f-box .select2-container {
  width: auto !important;
  min-width: 130px;
  margin-right: 10px;
}
.main-user-dahboard .page-gap .table-filter .filter .select2-container--default .select2-selection--single,
.main-user-dahboard .page-gap .single-f-box .select2-container--default .select2-selection--single {
  height: 40px;
  border-width: 1px;
  border-color: rgba(210, 211, 216, 0.7);
}
.main-user-dahboard .page-gap .table-filter .filter .select2-container--default .select2-selection--single .select2-selection__rendered,
.main-user-dahboard .page-gap .single-f-box .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px;
  font-weight: 700;
}
.main-user-dahboard .page-gap .table-filter .filter .select2-container--default .select2-selection--single .select2-selection__arrow,
.main-user-dahboard .page-gap .single-f-box .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
}
/* modals and the dropdown (appended to body): stay above Bootstrap modals (z-index 1055) */
.select2-container--open .select2-dropdown,
.select2-dropdown {
  z-index: 1060;
}
body > .select2-container {
  z-index: 1060;
}
.select2-container--default .select2-results__option--disabled {
  opacity: 0.5;
}
.select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
  background-color: #6c3beb;
  color: #ffffff;
}

/* dark mode: container is inside the panel, dropdown is on <body> */
body.dark-theme .main-user-dahboard .select2-container--default .select2-selection--single {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme .main-user-dahboard .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: rgba(255, 255, 255, 0.9);
}
body.dark-theme .main-user-dahboard .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: rgba(255, 255, 255, 0.6);
}
body.dark-theme .main-user-dahboard .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: rgba(255, 255, 255, 0.7) transparent transparent transparent;
}
body.dark-theme .main-user-dahboard .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent rgba(255, 255, 255, 0.7) transparent;
}
body.dark-theme .main-user-dahboard .select2-container--default.select2-container--open .select2-selection--single,
body.dark-theme .main-user-dahboard .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: rgba(255, 255, 255, 0.6);
}
body.dark-theme .main-user-dahboard .table-filter .filter .select2-container--default .select2-selection--single,
body.dark-theme .main-user-dahboard .single-f-box .select2-container--default .select2-selection--single {
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme .select2-dropdown {
  background-color: #030306;
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
}
body.dark-theme .select2-container--default .select2-results__option {
  color: rgba(255, 255, 255, 0.9);
  background-color: transparent;
}
body.dark-theme .select2-container--default .select2-results__option--selected {
  background-color: rgba(108, 59, 235, 0.35);
}
body.dark-theme .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
body.dark-theme .select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
  background-color: #6c3beb;
  color: #ffffff;
}
body.dark-theme .select2-container--default .select2-results__option--disabled {
  color: rgba(255, 255, 255, 0.35);
}
body.dark-theme .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #030306;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

/* Bootstrap light utilities inside the panel in dark mode: code blocks, light boxes and light text on white */
body.dark-theme .main-user-dahboard .bg-light,
body.dark-theme .main-user-dahboard pre.bg-light,
body.dark-theme .main-user-dahboard .bg-white {
  background-color: #0e1916 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .main-user-dahboard pre,
body.dark-theme .main-user-dahboard pre code {
  color: rgba(255, 255, 255, 0.9);
}

body.dark-theme .main-user-dahboard pre {
  background-color: #0e1916;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-theme .main-user-dahboard pre code {
  background: transparent;
}

body.dark-theme .main-user-dahboard .text-dark,
body.dark-theme .main-user-dahboard .text-black {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Dark-mode contrast fixes found in the module pages (all at least 4.5:1 on the dark card) */
body.dark-theme .main-user-dahboard code {
  color: #ff8fc8;
}

body.dark-theme .main-user-dahboard .page-gap .input-info-text {
  color: #ff8fa8;
}

body.dark-theme .main-user-dahboard .text-danger {
  color: #ff7a7a !important;
}

body.dark-theme .main-user-dahboard .bp-mark {
  color: #c7b6ff;
  background: rgba(108, 59, 235, 0.3);
}

/* light mode: the info line under a module field (FX balance, "No wallet") at 4.5:1 or better */
body:not(.dark-theme) .main-user-dahboard .page-gap .input-info-text {
  color: #c8325a;
}

/* Payment Gateway: read-only copy field (API secret, webhook secret, base URL) in the panel input-group */
.main-user-dahboard .page-content .main-content .page-gap .step-details-form .inputs .input-group .input-group-text.gateway-copy-btn {
  cursor: pointer;
  gap: 6px;
  color: #6c3beb;
}
.main-user-dahboard .page-content .main-content .page-gap .step-details-form .inputs .input-group .input-group-text.gateway-copy-btn svg {
  width: 16px;
  height: 16px;
}
.main-user-dahboard .page-gap .alert .step-details-form .inputs .input-group {
  background: #ffffff;
}
body.dark-theme .main-user-dahboard .page-gap .alert .step-details-form .inputs .input-group {
  background: #172622;
}
body.dark-theme .main-user-dahboard .page-content .main-content .page-gap .step-details-form .inputs .input-group .input-group-text.gateway-copy-btn {
  color: #c7b6ff;
}
/* Payment Gateway: checkbox lists (permissions, events, notifications) keep the panel checkbox readable in dark mode */
body.dark-theme .main-user-dahboard .page-gap .checkbox-wrapper-15 .cbx span:last-child {
  color: rgba(255, 255, 255, 0.85);
}
body.dark-theme .main-user-dahboard .page-gap .checkbox-wrapper-15 .cbx span:first-child {
  border-color: rgba(255, 255, 255, 0.4);
}
body.dark-theme .main-user-dahboard .page-gap .checkbox-wrapper-15 .inp-cbx:checked + .cbx span:first-child,
body.dark-theme .main-user-dahboard .page-gap .checkbox-wrapper-15 .cbx:hover span:first-child {
  border-color: #6c3beb;
}

/* Payment links / FX: theme checkbox row outside .inputs (FX "create the wallet") and the expiry clear button */
.main-user-dahboard .page-gap .fx-missing .checkbox-wrapper-15 .cbx span:last-child {
  font-size: 13px;
  font-weight: 700;
}
.main-user-dahboard .page-gap .step-details-form .inputs .input-group button.input-group-text {
  cursor: pointer;
}
body.dark-theme .main-user-dahboard .page-gap .step-details-form .inputs .input-group button.input-group-text {
  color: rgba(255, 255, 255, 0.85);
}

/* Business application / parties: panel checkbox without inline display:none (stays focusable so a required box shows the browser message) */
.main-user-dahboard .page-gap .checkbox-wrapper-15 {
  position: relative;
}
.main-user-dahboard .page-gap .checkbox-wrapper-15 .inp-cbx {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.main-user-dahboard .page-gap .checkbox-wrapper-15 .inp-cbx:focus-visible + .cbx span:first-child {
  box-shadow: 0 0 0 3px rgba(108, 59, 235, 0.3);
}
.main-user-dahboard .page-gap .business-confirm .cbx {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.main-user-dahboard .page-gap .business-confirm .cbx span:first-child {
  flex: 0 0 24px;
}
.main-user-dahboard .page-gap .business-confirm .cbx span:last-child {
  font-size: 13px;
  line-height: 1.5;
}
/* Business application: helper line under an upload box */
.main-user-dahboard .page-gap .business-file-current {
  font-size: 13px;
  margin-top: 6px;
  color: rgba(3, 3, 6, 0.6);
}
body.dark-theme .main-user-dahboard .page-gap .business-file-current {
  color: rgba(255, 255, 255, 0.7);
}
/* select2 multiple (admin-defined select fields that allow several values) */
.main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple {
  min-height: 50px;
  border-radius: 6px;
  border: 2px solid rgba(3, 3, 6, 0.2);
  background: transparent;
  padding: 6px 10px;
}
.main-user-dahboard .page-gap .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: rgba(3, 3, 6, 0.5);
}
.main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: rgba(108, 59, 235, 0.12);
  border: 1px solid rgba(108, 59, 235, 0.3);
  color: #6c3beb;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
}
.main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple .select2-search__field {
  font-size: 14px;
}
body.dark-theme .main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple {
  border-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme .main-user-dahboard .page-gap .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: rgba(255, 255, 255, 0.6);
}
body.dark-theme .main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: rgba(108, 59, 235, 0.3);
  border-color: rgba(108, 59, 235, 0.5);
  color: #ffffff;
}
body.dark-theme .main-user-dahboard .page-gap .select2-container--default .select2-selection--multiple .select2-search__field {
  color: #ffffff;
}
