/* =====================================================================
   PROTIDEFX THEME — FRONTEND LAYER
   Applies the color tokens (tokens.css) to the public site and the
   trading pages (layout: templates/basic/layouts/app.blade.php).

   You normally do NOT edit this file to change colors — edit tokens.css.
   This file only says "which token goes where".

   Selector note: html[data-pfx-theme] is more specific than the vendor's
   :root / [data-theme="..."] blocks, so these values always win, and
   the base color (--base-*) from Admin → General Settings is untouched.
   ===================================================================== */

/* ---------- 1. Re-point the vendor variables at our tokens ---------- */
html[data-pfx-theme] {
  /* vendor uses --white as "page background" and --black as "text" */
  --white: var(--pfx-bg);
  --black: var(--pfx-text-strong);
  --heading-color: var(--pfx-text-strong);
  --body-color: var(--pfx-text);
  --light: var(--pfx-text-muted);
  --light-two: var(--pfx-text-muted);
  --border-color: var(--pfx-border);
  --body-background: var(--pfx-bg);
  --section-bg: var(--pfx-section);
  --section-bg-two: var(--base);   /* highlight band (white text): base color */
  --footer-bg: var(--pfx-section);

  /* market colors (the *-text shades are darker in light mode for contrast) */
  --success-h: 140; --success-s: 46%; --success-l: 56%;   /* = --pfx-up   */
  --danger-h: 0;    --danger-s: 70%;  --danger-l: 61%;    /* = --pfx-down */
  --success: var(--pfx-up-text);
  --danger: var(--pfx-down-text);
  --base-two: var(--pfx-up-text);

  /* binary-trade.css gray scale */
  --gray: var(--pfx-text-muted);

  --box-shadow: var(--pfx-shadow);
  --box-shadow-two: var(--pfx-shadow);
  --mobile-box-shadow: var(--pfx-shadow);
}

html[data-pfx-theme="light"] {
  --header-box-shadow: 0 1px 0 hsl(var(--pfx-border-soft));
}
html[data-pfx-theme="dark"] {
  --section-bg-two: var(--pfx-section);
}

html[data-pfx-theme] body {
  background-color: hsl(var(--pfx-bg));
  color: hsl(var(--pfx-text));
}

/* ---------- 2. Header & footer follow the theme (vendor: always black) ---------- */
html[data-pfx-theme] .header,
html[data-pfx-theme] .header.fixed-header {
  --static-black: var(--pfx-bg);
  --static-white: var(--pfx-text-strong);
  background-color: hsl(var(--pfx-bg));
  border-bottom: 1px solid hsl(var(--pfx-border-soft));
}
html[data-pfx-theme] .header .btn--base,
html[data-pfx-theme] .header .btn--base:hover {
  color: #fff !important;
}
html[data-pfx-theme] .footer-area {
  --static-white: var(--pfx-text-strong);
  border-top: 1px solid hsl(var(--pfx-border-soft));
}
html[data-pfx-theme] .preloader-wrapper {
  background-color: hsl(var(--pfx-bg));
}
html[data-pfx-theme] .modal-content,
html[data-pfx-theme] .modal-header,
html[data-pfx-theme] .modal-footer {
  background-color: hsl(var(--pfx-surface));
  border-color: hsl(var(--pfx-border));
}
html[data-pfx-theme] .custom--card,
html[data-pfx-theme] .card {
  background-color: hsl(var(--pfx-surface));
}
html[data-pfx-theme] .cookies-card {
  background-color: hsl(var(--pfx-surface));
  border: 1px solid hsl(var(--pfx-border));
  box-shadow: var(--pfx-shadow);
}
html[data-pfx-theme] .cookies-card p {
  color: hsl(var(--pfx-text));
}

/* ---------- 3. Market up / down text ---------- */
html[data-pfx-theme] .text--success,
html[data-pfx-theme] .up { color: hsl(var(--pfx-up-text)) !important; }
html[data-pfx-theme] .text--danger,
html[data-pfx-theme] .down { color: hsl(var(--pfx-down-text)) !important; }

/* ---------- 3b. Headings & labels: dark/grey, keep blue for clickable things ---------- */
html[data-pfx-theme] .trading-left__top-title,
html[data-pfx-theme] .trading-history__title,
html[data-pfx-theme] .buy-sell__title,
html[data-pfx-theme] .trading-asset__header h4,
html[data-pfx-theme] .trading-asset h4.text--base {
  color: hsl(var(--pfx-text-strong)) !important;
}
html[data-pfx-theme] .future-trade-header span.text--base.fs-12,
html[data-pfx-theme] .trading-header span.text--base.fs-12 {
  color: hsl(var(--pfx-text-muted)) !important;
}

/* ---------- 3c. Dropdown lists (vendor: base-color list, white text,
   black hover) — e.g. the USDT/BTC size picker, language picker ---------- */
html[data-pfx-theme] .custom--dropdown > .dropdown-list {
  background-color: hsl(var(--pfx-surface)) !important;
  border: 1px solid hsl(var(--pfx-border));
  border-radius: 8px;
  box-shadow: var(--pfx-shadow);
}
html[data-pfx-theme] .custom--dropdown > .dropdown-list > .dropdown-list__item,
html[data-pfx-theme] .custom--dropdown > .dropdown-list > .dropdown-list__item .text {
  color: hsl(var(--pfx-text-strong)) !important;
}
html[data-pfx-theme] .custom--dropdown > .dropdown-list > .dropdown-list__item:hover {
  background-color: hsl(var(--pfx-surface-2)) !important;
}

/* ---------- 3d. Theme switch icon: show the mode you will switch TO
   (moon in light mode, sun in dark mode) — same as theme.js button ---------- */
html[data-pfx-theme="light"] .theme-switch .slider i::before { content: "\f186"; } /* moon */
html[data-pfx-theme="dark"] .theme-switch .slider i::before { content: "\f185"; }  /* sun  */

/* ---------- 3e. Market tables: numbers were 13px under 15px headers ---------- */
html[data-pfx-theme] td [class*="market-price-"],
html[data-pfx-theme] td [class*="market-percent-change-"],
html[data-pfx-theme] td [class*="market-market_cap-"] {
  font-size: 14px;
}

/* ---------- 3f. Logo: hide the white-text logo in light mode until
   theme.js swaps it for logo_base.png (prevents a white flash) ---------- */
html[data-pfx-theme="light"] img[src*="/logo_icon/logo.png"]:not([data-pfx-logo-fixed]) { visibility: hidden; }

/* ---------- 4a. Shared trading layout (main.css hardcodes dark colors) ---------- */
html[data-pfx-theme] .bg-color,
html[data-pfx-theme] .trading-section {
  background-color: hsl(var(--pfx-canvas)) !important;
}
html[data-pfx-theme] .trading-body,
html[data-pfx-theme] .trading-left,
html[data-pfx-theme] .trading-right,
html[data-pfx-theme] .trading-right__bottom,
html[data-pfx-theme] .trading-header,
html[data-pfx-theme] .trading-bottom,
html[data-pfx-theme] .trading-bottom__tab,
html[data-pfx-theme] .trading-table,
html[data-pfx-theme] .trading-chart,
html[data-pfx-theme] .table.table-two thead tr th,
html[data-pfx-theme] .table.table-two tbody,
html[data-pfx-theme] .order-update-form,
html[data-pfx-theme] .offcanvas,
html[data-pfx-theme] .offcanvas .form--control option,
html[data-pfx-theme] .swiper-button-next-two,
html[data-pfx-theme] .swiper-button-prev-two {
  background-color: hsl(var(--pfx-surface)) !important;
}
@media (max-width: 1199px) {
  html[data-pfx-theme] .trading-bottom__fixed,
  html[data-pfx-theme] .trading-top__tab {
    background-color: hsl(var(--pfx-surface)) !important;
  }
}
@media (max-width: 991px) {
  html[data-pfx-theme] .has-mega-menu .mega-menu {
    background-color: hsl(var(--pfx-surface)) !important;
  }
}
/* Trading panels ("cards"). In light mode they sit on the grey canvas
   with a soft border + faint shadow; in dark mode the shadow is "none". */
html[data-pfx-theme] .future-trade-header,
html[data-pfx-theme] .trading-bottom__tab,
html[data-pfx-theme] .trading-left,
html[data-pfx-theme] .trading-right,
html[data-pfx-theme] .trading-right__bottom,
html[data-pfx-theme] .trading-table,
html[data-pfx-theme] .trading-bottom,
html[data-pfx-theme] .trading-header,
html[data-pfx-theme] .trading-asset {
  border-radius: var(--pfx-radius);
  box-shadow: var(--pfx-panel-shadow);
}
html[data-pfx-theme="light"] .future-trade-header,
html[data-pfx-theme="light"] .trading-bottom__tab,
html[data-pfx-theme="light"] .trading-left,
html[data-pfx-theme="light"] .trading-right,
html[data-pfx-theme="light"] .trading-right__bottom,
html[data-pfx-theme="light"] .trading-table,
html[data-pfx-theme="light"] .trading-bottom,
html[data-pfx-theme="light"] .trading-header,
html[data-pfx-theme="light"] .trading-asset {
  border: 1px solid hsl(var(--pfx-border)) !important;
}
/* the chart sits inside .trading-bottom__tab, which already has the frame */
html[data-pfx-theme="light"] .trading-bottom__tab .trading-chart {
  border: 0 !important;
  box-shadow: none;
}
/* small framed boxes inside panels (e.g. the price stats strip) */
html[data-pfx-theme="light"] .future-trade-header [class*="__chart"],
html[data-pfx-theme="light"] .trading-chart {
  border-color: hsl(var(--pfx-border-soft)) !important;
}

/* Table lines: future-trade.css draws a dark #2b3139 line under every
   table part (meant for dark mode). Use the soft divider instead. */
html[data-pfx-theme] thead,
html[data-pfx-theme] tbody,
html[data-pfx-theme] tfoot,
html[data-pfx-theme] tr,
html[data-pfx-theme] th,
html[data-pfx-theme] td {
  border-bottom-color: hsl(var(--pfx-border-soft)) !important;
}
html[data-pfx-theme] .empty-thumb,
html[data-pfx-theme] .text--base.cursor-pointer {
  border-color: hsl(var(--pfx-border-soft)) !important;
}
html[data-pfx-theme] .trading-left__header {
  background-color: hsl(var(--pfx-surface-2)) !important;
}
html[data-pfx-theme] .buy-sell__price .form--control[readonly],
html[data-pfx-theme] .login-btn,
html[data-pfx-theme] .range-list__number span {
  background-color: hsl(var(--pfx-control)) !important;
  border-color: hsl(var(--pfx-border)) !important;
}
html[data-pfx-theme] .range-list__number span { color: hsl(var(--pfx-text-muted)); }
html[data-pfx-theme] .subscribe-wrapper__item .form--control,
html[data-pfx-theme] .market-list-search .market-list-search-field {
  background-color: hsl(var(--pfx-input)) !important;
  border-color: hsl(var(--pfx-border)) !important;
  color: hsl(var(--pfx-text-strong)) !important;
}
html[data-pfx-theme] .pagination .page-item.disabled .page-link {
  background-color: hsl(var(--pfx-control));
  border-color: hsl(var(--pfx-border));
  color: hsl(var(--pfx-disabled-text));
}
html[data-pfx-theme] .bg { background-color: hsl(var(--pfx-section)); }
html[data-pfx-theme] .has-my-order::before { background: hsl(var(--pfx-bg)); }
html[data-pfx-theme] .skeleton::after {
  background-image: linear-gradient(90deg, hsl(var(--pfx-skeleton)), hsl(var(--pfx-skeleton-shine)), hsl(var(--pfx-skeleton))) !important;
}

/* ---------- 4b. Binary trade page (binary-trade.css) ---------- */
html[data-pfx-theme] .higher-btn {
  background-color: hsl(var(--pfx-up-text)) !important;
  border-color: hsl(var(--pfx-up-text)) !important;
}
html[data-pfx-theme] .higher-btn:has(:checked) {
  background-color: hsl(var(--pfx-up-text) / 0.8) !important;
  border-color: hsl(var(--pfx-up-text) / 0.8) !important;
}
html[data-pfx-theme] .lower-btn {
  background-color: hsl(var(--pfx-down-text)) !important;
  border-color: hsl(var(--pfx-down-text)) !important;
}
html[data-pfx-theme] .lower-btn:has(:checked) {
  background-color: hsl(var(--pfx-down-text) / 0.8) !important;
  border-color: hsl(var(--pfx-down-text) / 0.8) !important;
}
html[data-pfx-theme] .percentage-box__total,
html[data-pfx-theme] .percentage-box__amount { color: hsl(var(--pfx-up-text)); }
html[data-pfx-theme] .asset-card { background-color: hsl(var(--pfx-surface)); }
html[data-pfx-theme] .trade-amount__input-group,
html[data-pfx-theme] .trade-amount__decrement,
html[data-pfx-theme] .trade-duration__toggle,
html[data-pfx-theme] .trade-duration-presets { background: hsl(var(--pfx-control)); }

/* ---------- 4c. P2P pages on the public layout (p2p.css) ---------- */
html[data-pfx-theme] .publisher-area,
html[data-pfx-theme] .publisher-order-details { background-color: hsl(var(--pfx-surface)); }
html[data-pfx-theme] .publisher-card { border-color: hsl(var(--pfx-border)); }

/* ---------- 4d. Futures trade page (future-trade.css hardcodes dark colors) ---------- */
html[data-pfx-theme] .future-trade-header,
html[data-pfx-theme] .trading-header-wrapper,
html[data-pfx-theme] .trading-asset,
html[data-pfx-theme] .asset-mode__sidebar,
html[data-pfx-theme] .trading-market__header,
html[data-pfx-theme] .common-dropdown .dropdown-menu,
html[data-pfx-theme] .trading-dropdown-box,
html[data-pfx-theme] .has-mega-menu .mega-menu {
  background-color: hsl(var(--pfx-surface)) !important;
}
html[data-pfx-theme] .favorites-modal .modal-content,
html[data-pfx-theme] .custom--dropdown.future-order-book > .dropdown-list,
html[data-pfx-theme] .trading-dropdown-box .table.table-two thead tr th,
html[data-pfx-theme] .trading-dropdown-box .table.table-two tbody {
  background-color: hsl(var(--pfx-surface)) !important;
}
@media (max-width: 1199px) {
  html[data-pfx-theme] .trading-bottom__fixed,
  html[data-pfx-theme] .buy-sell-one,
  html[data-pfx-theme] .buy-sell-two {
    background-color: hsl(var(--pfx-surface)) !important;
  }
}

/* borders */
html[data-pfx-theme] .trading-left__top,
html[data-pfx-theme] .future-chart-tabs,
html[data-pfx-theme] .future-trading-main .trading-table__header,
html[data-pfx-theme] .future-trading-main .trading-bottom__header,
html[data-pfx-theme] .buy-sell__price.trade,
html[data-pfx-theme] .trading-asset__header,
html[data-pfx-theme] .trading-dropdown-box .custom--tab {
  border-bottom-color: hsl(var(--pfx-border-soft)) !important;
}
html[data-pfx-theme] .asset-mode__sidebar-item,
html[data-pfx-theme] .asset-form-convert,
html[data-pfx-theme] .qnty-cart-list .product-qty,
html[data-pfx-theme] .form--control.close-position-input,
html[data-pfx-theme] .form--control.style-three,
html[data-pfx-theme] .search-inner .form--control {
  border-color: hsl(var(--pfx-border)) !important;
}
html[data-pfx-theme] .future-trade-data-item__single {
  border-bottom-color: hsl(var(--pfx-border)) !important;
}

/* strong text */
html[data-pfx-theme] .future-trade-header__chart a,
html[data-pfx-theme] .favorites-modal .modal-header h4,
html[data-pfx-theme] .favorites-crypto-list-item__content .symbol,
html[data-pfx-theme] .badge--gray,
html[data-pfx-theme] .form--check .form-check-label,
html[data-pfx-theme] .form--check .form-check-input:checked::before,
html[data-pfx-theme] .future-symbol .title,
html[data-pfx-theme] .tp-add-btn,
html[data-pfx-theme] .form--control.close-position-input,
html[data-pfx-theme] .table.table-two tbody tr td,
html[data-pfx-theme] .future-trading-main .future-trade-btn,
html[data-pfx-theme] .buy-sell__price .buy-sell-trade span:last-child,
html[data-pfx-theme] .future-trade-data-item span > span:last-child,
html[data-pfx-theme] .btn-gray,
html[data-pfx-theme] .trading-asset-info__item span:last-child,
html[data-pfx-theme] .badge-prep,
html[data-pfx-theme] .badge-usd,
html[data-pfx-theme] .asset-mode__sidebar-item .title,
html[data-pfx-theme] .buy-btn.active,
html[data-pfx-theme] .product-qty .form--control,
html[data-pfx-theme] .product-qty__value,
html[data-pfx-theme] .p2p-custom--dropdown-select-box i,
html[data-pfx-theme] .select,
html[data-pfx-theme] .select option,
html[data-pfx-theme] .asset-form-convert__right .form--select,
html[data-pfx-theme] .trading-dropdown-button-title,
html[data-pfx-theme] .short {
  color: hsl(var(--pfx-text-strong)) !important;
}
/* filled green BUY button: white text on the readable green */
html[data-pfx-theme] .btn--base-two:not(.outline),
html[data-pfx-theme] .btn--base-two:not(.outline):hover {
  color: #fff !important;
}
html[data-pfx-theme] .trade-margin-right svg,
html[data-pfx-theme] .dropdown-content p,
html[data-pfx-theme] .p2p-custom--dropdown-left .number input::placeholder {
  color: hsl(var(--pfx-text-muted)) !important;
}

/* controls: chips, steppers, small buttons, inputs */
html[data-pfx-theme] .badge--gray,
html[data-pfx-theme] .tp-add-btn,
html[data-pfx-theme] .future-trading-main .future-trade-btn,
html[data-pfx-theme] .badge-prep,
html[data-pfx-theme] .badge-usd,
html[data-pfx-theme] .asset-mode__sidebar-item .icon,
html[data-pfx-theme] .qnty-cart-list .product-qty__btn,
html[data-pfx-theme] .future-trade-tab-content__tb a.active,
html[data-pfx-theme] .btn-gray,
html[data-pfx-theme] .buy-Sell-trade-modal #pills-tab-buy-sell,
html[data-pfx-theme] .button-group .btn-dark,
html[data-pfx-theme] .dropdown-button,
html[data-pfx-theme] .custom--range .slider-range {
  background-color: hsl(var(--pfx-control)) !important;
  border-color: hsl(var(--pfx-control)) !important;
}
html[data-pfx-theme] .btn-gray:active,
html[data-pfx-theme] .dropdown-button:hover,
html[data-pfx-theme] .tp-add-btn:active {
  background-color: hsl(var(--pfx-border)) !important;
  border-color: hsl(var(--pfx-border)) !important;
}
html[data-pfx-theme] .dropdown-button { color: hsl(var(--pfx-text-strong)); }
html[data-pfx-theme] .dropdown-content,
html[data-pfx-theme] .p2p-custom--dropdown-menu {
  background-color: hsl(var(--pfx-surface)) !important;
  border-color: hsl(var(--pfx-border)) !important;
  box-shadow: var(--pfx-shadow);
}
html[data-pfx-theme] .form--control.close-position-input,
html[data-pfx-theme] .bg-input {
  background-color: hsl(var(--pfx-input)) !important;
}
html[data-pfx-theme] .trading-dropdown-button-icon {
  background: hsl(var(--pfx-control));
  border-color: hsl(var(--pfx-border));
}
html[data-pfx-theme] .future-symbol__badge {
  background: hsl(var(--pfx-star) / 0.15);
}

/* ---------- 4e-0. Pair stats strip (Last Price, 1H Change … Market Cap)
   in the futures header: recessed strip with padding + dividers ---------- */
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  margin-top: 0;
  padding: 10px 4px !important;
  background-color: hsl(var(--pfx-canvas)) !important;
  border: 1px solid hsl(var(--pfx-border-soft)) !important;
  border-radius: var(--pfx-radius);
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header::-webkit-scrollbar { display: none; }
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header > div {
  flex: 1 0 auto;
  padding: 2px 16px;
  white-space: nowrap;
}
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header > div + div {
  border-left: 1px solid hsl(var(--pfx-border));
}
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header > div > span.fs-12 {
  display: block;
  font-size: 12px !important;
  line-height: 1.3;
  margin-bottom: 4px;
}
html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header .trading-header__number {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--pfx-text-strong));
}
/* narrow screens: grid of stat tiles instead of one long row */
@media (max-width: 991px) {
  html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px 0;
    padding: 12px 4px !important;
    overflow: visible;
    width: 100%;
    min-width: 0;
  }
  /* the strip's flex parent must give it the full row */
  html[data-pfx-theme] .trading-header-wrapper > .d-flex:has(> .future-trading-header) {
    flex: 1 1 100%;
    width: 100%;
  }
  html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header > div {
    padding: 2px 12px;
    white-space: normal;
    min-width: 0;
  }
  html[data-pfx-theme] .trading-header-wrapper .trading-header.future-trading-header > div + div {
    border-left: 0;
  }
}

/* ---------- 4e. Trade popups: Margin Mode (Isolated/Cross), Adjust
   Leverage, favourites. Vendor colors were dark-only. ---------- */
html[data-pfx-theme] .favorites-modal .modal-content,
html[data-pfx-theme] .custom--modal .modal-content {
  background-color: hsl(var(--pfx-surface)) !important;
  border: 1px solid hsl(var(--pfx-border)) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 48px hsl(220 30% 10% / 0.18);
  color: hsl(var(--pfx-text));
}
html[data-pfx-theme] .favorites-modal .modal-title,
html[data-pfx-theme] .custom--modal .modal-title,
html[data-pfx-theme] .leverage-content-header__title.text-white {
  color: hsl(var(--pfx-text-strong)) !important;
  font-weight: 600;
}
html[data-pfx-theme] .close.modal-close-btn {
  width: 28px;
  height: 28px;
  border: 1px solid hsl(var(--pfx-border));
  background: hsl(var(--pfx-control));
  color: hsl(var(--pfx-text-muted));
  transition: background-color 0.2s ease, color 0.2s ease;
}
html[data-pfx-theme] .close.modal-close-btn:hover {
  background: hsl(var(--pfx-border));
  color: hsl(var(--pfx-text-strong));
}

/* Isolated / Cross: segmented control — grey track, active = inverse chip
   (black in light mode, white in dark mode), like the reference pills */
html[data-pfx-theme] .margin-mode .nav-pills {
  gap: 4px !important;
  padding: 4px;
  background-color: hsl(var(--pfx-control));
  border-radius: 10px;
  flex-wrap: nowrap;
}
html[data-pfx-theme] .margin-mode .nav-pills .nav-link {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: hsl(var(--pfx-text-muted)) !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}
html[data-pfx-theme] .margin-mode .nav-pills .nav-link:hover {
  color: hsl(var(--pfx-text-strong)) !important;
}
html[data-pfx-theme] .margin-mode .nav-pills .nav-link.active {
  background-color: hsl(var(--pfx-inverse-bg)) !important;
  color: hsl(var(--pfx-inverse-text)) !important;
  box-shadow: 0 1px 3px hsl(220 30% 10% / 0.15);
}
html[data-pfx-theme] .margin-mode .tab-content p,
html[data-pfx-theme] .leverage__desc,
html[data-pfx-theme] .leverage-content p {
  color: hsl(var(--pfx-text)) !important;
  line-height: 1.6;
}

/* Adjust Leverage: quantity stepper + slider labels */
html[data-pfx-theme] .adjust-modal .product-qty {
  border-radius: 10px;
  overflow: hidden;
}
html[data-pfx-theme] .adjust-modal .product-qty__btn {
  color: hsl(var(--pfx-text-strong));
}
html[data-pfx-theme] .adjust-modal .range-list__number,
html[data-pfx-theme] .adjust-modal .range-list__number span {
  color: hsl(var(--pfx-text-muted));
}

/* ---------- 4f. TradingView chart: theme.js creates a light AND a dark
   chart in the same container; only the one for the current mode is
   shown. The hidden one is made transparent (opacity, NOT display or
   visibility): browsers pause drawing inside hidden iframes, which would
   show a stale chart for a moment after toggling. Transparent iframes
   keep drawing, so the switch is instant. ---------- */
.pfx-tv-stack { position: relative; }
.pfx-tv-layer {
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.18s ease;
}
html[data-pfx-theme="light"] .pfx-tv-layer--dark,
html[data-pfx-theme="dark"] .pfx-tv-layer--light {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 5. Theme toggle button (added by theme.js where the vendor has none) ---------- */
.pfx-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid hsl(var(--pfx-border));
  background: hsl(var(--pfx-control));
  color: hsl(var(--pfx-text-strong));
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.pfx-theme-toggle:hover { background: hsl(var(--pfx-surface-2)); }
.pfx-theme-toggle:focus-visible { outline: 2px solid hsl(var(--base)); outline-offset: 2px; }
.pfx-theme-toggle .pfx-icon-sun { display: none; }
html[data-pfx-theme="dark"] .pfx-theme-toggle .pfx-icon-sun { display: inline; }
html[data-pfx-theme="dark"] .pfx-theme-toggle .pfx-icon-moon { display: none; }
.pfx-theme-toggle--floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9990;
  box-shadow: var(--pfx-shadow);
}
.pfx-theme-toggle--header { margin-left: 12px; }


/* =====================================================================
   Moved from vendor assets/templates/basic/css/main.css (Protidefx edits).
   Kept here so a Vinance update cannot erase them.
   ===================================================================== */

/* Smaller logo on mobile (vendor value: 150px) */
@media screen and (max-width: 991px) {
  .navbar-brand.logo img {
    max-width: 100px;
  }
}


/* ===== Futures order type tabs (Limit / Market / Stop Limit) ===== */
.custom--tab.order-type-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px !important;
  margin-top: 0;
  margin-left: 0 !important;
  width: 100%;
  flex: 0 0 100%;
  white-space: nowrap;
  background: hsl(var(--heading-color) / 0.05) !important;
  border: 1px solid hsl(var(--heading-color) / 0.1) !important;
  border-radius: 15px !important;
  box-shadow:
    0 -6px 16px -4px hsl(var(--static-black) / 0.14),
    0 2px 6px hsl(var(--static-black) / 0.06);
}

.custom--tab.order-type-tabs .nav-item {
  flex: 1;
  padding: 0 !important;
}

.custom--tab.order-type-tabs .nav-item .nav-link {
  width: 100%;
  padding: 10px 14px !important;
  line-height: 1;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: hsl(var(--heading-color)) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 10px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

/* remove the old underline from tab-three */
.custom--tab.order-type-tabs .nav-item .nav-link::after {
  display: none !important;
}

.custom--tab.order-type-tabs .nav-item .nav-link:not(.active):hover {
  color: hsl(var(--base)) !important;
  background: hsl(var(--base) / 0.04) !important;
}

.custom--tab.order-type-tabs .nav-item .nav-link.active {
  font-weight: 700;
  color: hsl(var(--base)) !important;
  background: hsl(var(--base) / 0.08) !important;
  border-color: hsl(var(--base) / 0.35) !important;
  box-shadow:
    inset 3px 0 0 hsl(var(--base)),
    0 -3px 8px hsl(var(--base) / 0.15);
}


/* ===== Header: "Market" dropdown with the Trading pages =====
   Markup: custom/templates/basic/partials/header.blade.php (docs/PAGES_CUSTOMIZATION.md).
   Desktop opens on hover/focus or the arrow; mobile opens with the arrow. */
.pfx-navdrop__head { position: relative; display: flex; align-items: center; }
.pfx-navdrop__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: 2px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: hsl(var(--pfx-text-strong)); cursor: pointer;
}
.pfx-navdrop__toggle i { font-size: 13px; transition: transform .2s; }
.pfx-navdrop.is-open .pfx-navdrop__toggle i { transform: rotate(180deg); }
.pfx-navdrop__menu { list-style: none; margin: 0; padding: 0; }
.pfx-navdrop__link {
  display: flex !important; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: hsl(var(--pfx-text-strong)) !important;
  white-space: nowrap;
}
.pfx-navdrop__link i { font-size: 18px; color: hsl(var(--pfx-text-muted)); }
.pfx-navdrop__link:hover, .pfx-navdrop__link.is-active { color: hsl(var(--base)) !important; }
.pfx-navdrop__link:hover i, .pfx-navdrop__link.is-active i { color: hsl(var(--base)); }

@media (min-width: 992px) {
  .pfx-navdrop:hover .pfx-navdrop__toggle i,
  .pfx-navdrop:focus-within .pfx-navdrop__toggle i { transform: rotate(180deg); }
  .pfx-navdrop:hover .pfx-navdrop__toggle,
  .pfx-navdrop:focus-within .pfx-navdrop__toggle { color: hsl(var(--base)); }
  .pfx-navdrop__menu {
    position: absolute; top: calc(100% - 10px); left: 0; z-index: 1000;
    min-width: 230px; padding: 8px;
    background: hsl(var(--pfx-surface)); border: 1px solid hsl(var(--pfx-border));
    border-radius: 14px; box-shadow: var(--pfx-shadow);
    visibility: hidden; opacity: 0; transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .pfx-navdrop:hover .pfx-navdrop__menu,
  .pfx-navdrop:focus-within .pfx-navdrop__menu,
  .pfx-navdrop.is-open .pfx-navdrop__menu { visibility: visible; opacity: 1; transform: none; }
  .pfx-navdrop__link { padding: 10px 12px; border-radius: 10px; }
  .pfx-navdrop__link:hover, .pfx-navdrop__link.is-active { background: hsl(var(--base) / 0.08); }
}

@media (max-width: 991px) {
  .pfx-navdrop__head .nav-link { flex: 1; }
  .pfx-navdrop__toggle { position: absolute; top: 50%; right: 0; width: 40px; height: 40px; transform: translateY(-50%); }
  .pfx-navdrop__menu { display: none; padding: 4px 0 4px 14px; }
  .pfx-navdrop.is-open .pfx-navdrop__menu { display: block; }
  .pfx-navdrop__link { padding: 10px 0; border-bottom: 1px solid hsl(var(--pfx-border-soft)); font-size: 15px; }
}
