/*
* custom.css
* Custom CSS overrides for Materialize template
* Add your custom styles here to override Materialize core CSS without modifying template files
******************************************************************************/

/* Override Materialize color variables */
/* Default Materialize colors:
   --bs-primary: #666cff
   --bs-success: #72e128
   --bs-info: #26c6f9
   --bs-warning: #fdb528
   --bs-danger: #ff4d49
*/
:root,
[data-bs-theme=dark] {
  /* Primary color - default: #666cff */
  --bs-primary: #339933;
  --bs-primary-rgb: 51, 153, 51;
  --bs-primary-bg-subtle: color-mix(in sRGB, var(--bs-paper-bg) 84%, #339933);
  --bs-primary-border-subtle: rgba(51, 153, 51, 0.39);
  --bs-primary-contrast: #fff;
  
  /* Success color - default: #72e128 */
  --bs-success: #47a666;
  --bs-success-bg-subtle: #daede0;
  
  /* Info color - default: #26c6f9 */
  --bs-info: #2092ec;
  
  /* Warning color - default: #fdb528 */
  /* --bs-warning: #ffab1d; */
  
  /* Danger color - default: #ff4d49 */
  /* --bs-danger: #your-color-here; */
}

.menu .app-brand.demo {
  height: 64px;
}

.menu .app-brand {
  padding-inline: calc(var(--bs-menu-vertical-link-padding-x) * 2 - 0.5rem) calc(var(--bs-menu-vertical-link-padding-x) * 2 - 0.5rem);
}

@media (min-width: 1200px) {
  .layout-menu-collapsed:not(.layout-menu-hover, .layout-menu-offcanvas, .layout-menu-fixed-offcanvas)
    .layout-menu.menu-vertical.menu:not(:hover)
    .app-brand.demo {
    padding-inline-start: calc(var(--bs-menu-vertical-link-padding-x) * 2 - 0.5rem);
  }
}

.app-brand-logo.demo svg {
  width: 38px;
  /* height: 20px; */
}

.app-brand-text.demo {
  font-size: 1.25rem;
  letter-spacing: 0.15px;
}

.authentication-wrapper .app-brand-text.demo {
  text-transform: capitalize;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Default navbar. Extra --wm-banner-offset reserves room for the fixed system
   banner stack above the navbar (0 when no banner shows). */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: calc(64px + var(--wm-banner-offset)) !important;
}

/* Stretch the fixed navbar across the full content track (no side gaps), keeping a
   constant inline padding. The template's inset-inline-start/end already place the
   left edge after the sidebar and the right edge at the viewport, so inline-size:auto
   makes the bar span edge-to-edge in every state (expanded / collapsed / mobile). */
.layout-navbar-fixed .layout-navbar.navbar-detached {
  inline-size: auto !important;
  padding-inline: 1.5rem !important;
  border-radius: 0 !important;
}

/* On scroll: show only a full-width bottom divider line instead of the detached "U"
   border + content-centering shift. */
.layout-navbar-fixed .window-scrolled .layout-navbar.navbar-detached {
  border: 0 !important;
  border-bottom: var(--bs-navbar-border-width, 1px) solid var(--bs-border-color) !important;
  box-shadow: none !important;
  padding-inline: 1.5rem !important;
}

/* System banner offset: keep the fixed navbar and sidebar below the full-width
   plan-expiry / order-limit / demo banners so they aren't hidden underneath.
   The banner strip is position:fixed (like the navbar) so overscroll can't drag
   it down; --wm-banner-offset is set by JS to the live banner-stack height (0
   with no banner) and reserves the matching space on the navbar, sidebar, and
   content. Paired markup: #wm-system-banners in layouts/materialize.blade.php. */
:root {
  --wm-banner-offset: 0px;
}

#wm-system-banners {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1030; /* above navbar/sidebar, below modal (1050+) and mobile drawer (1100) */
}

.layout-navbar-fixed .layout-navbar {
  inset-block-start: var(--wm-banner-offset);
}

@media (min-width: 1200px) {
  .layout-menu-fixed .layout-menu,
  .layout-menu-fixed-offcanvas .layout-menu {
    inset-block-start: var(--wm-banner-offset);
  }
}

/* Navbar sidebar-toggle icon: chevron while the menu is expanded, hamburger while
   it's collapsed (and always hamburger on mobile / off-canvas). */
.menu-toggle-chevron {
  display: none;
}
.menu-toggle-burger {
  display: inline-block;
}
@media (min-width: 1200px) {
  .menu-toggle-chevron {
    display: inline-block;
  }
  .menu-toggle-burger {
    display: none;
  }
  .layout-menu-collapsed .menu-toggle-chevron {
    display: none;
  }
  .layout-menu-collapsed .menu-toggle-burger {
    display: inline-block;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Collapsed sidebar: click-to-expand (not hover), logo morphs into an expand icon.
   Same as the template's default collapse, with two differences:
     1. hovering the collapsed rail swaps the brand logo for an open-sidebar icon;
     2. you click that icon to expand — the rail no longer auto-expands on hover.
   Collapse lives on the sidebar brand (the navbar toggle is hidden on desktop).
   Desktop only (≥1200px); on mobile the menu is off-canvas and never collapsed.
   Paired markup: resources/views/layouts/materialize/sidebar.blade.php and the
   menu scripts in resources/views/layouts/materialize.blade.php. */
.app-brand {
  position: relative;
}
/* Hide the rail expander by default. Higher specificity than the template's
   `.app-brand .layout-menu-toggle { display: block }` so it stays hidden while the
   menu is expanded — the logo then links home as normal. */
.app-brand .menu-rail-expand {
  display: none;
}
/* Mobile: the brand chevron is the off-canvas close button (kept from original). */
.menu-rail-collapse {
  display: flex;
}

@media (min-width: 1200px) {
  /* Collapse/expand lives on the sidebar, not the topnav — hide the navbar toggle
     on desktop. (It stays on mobile, where it opens the off-canvas menu.) */
  #layout-navbar .layout-menu-toggle {
    display: none !important;
  }

  /* Right divider on the collapsed rail — default skin has none, so add one to
     match the bordered look of whatsbox. Stays in both hover and non-hover. */
  .layout-menu-collapsed .layout-menu {
    border-inline-end: 1px solid var(--bs-border-color);
  }

  /* Expanded: brand chevron collapses the menu. Collapsed: hide it (the rail is
     re-opened via the logo expander). */
  .menu-rail-collapse {
    display: flex;
  }
  .layout-menu-collapsed .app-brand .menu-rail-collapse {
    display: none;
  }

  /* (2) Keep the collapsed rail at its collapsed width on hover. The template only
     applies its collapsed metrics via :not(:hover), so a real mouse-over reverts to
     the expanded styles; mirror them onto :hover to stop the auto-expand and hand
     control to the click-to-expand affordance below. (data-skin=default has no rail
     border, so drop the hover box-shadow too — the rail shouldn't appear to lift.) */
  .layout-menu-collapsed .layout-menu:hover {
    inline-size: var(--bs-menu-collapsed-width) !important;
    box-shadow: none !important;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-item {
    inline-size: var(--bs-menu-collapsed-width) !important;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-item div:not(.menu-block) {
    opacity: 0 !important;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-header .menu-header-text,
  .layout-menu-collapsed .layout-menu:hover .menu-block .menu-header-text {
    opacity: 0 !important;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-header,
  .layout-menu-collapsed .layout-menu:hover .menu-block {
    inline-size: var(--bs-menu-width);
    margin-inline-start: var(--bs-menu-collapsed-width);
    text-indent: -9999px;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-item > .menu-toggle::after {
    display: none !important;
  }
  .layout-menu-collapsed .layout-menu:hover .menu-inner > .menu-item > .menu-link .menu-icon {
    margin-inline: 0 !important;
  }

  /* The rail is too narrow for inline submenus, and a hover flyout would be clipped
     by the menu's scroll container (PerfectScrollbar sets overflow:hidden). So keep
     submenus hidden in the rail; clicking a parent expands the sidebar and opens its
     section instead (see the menu-toggle handler in materialize.blade.php). */
  .layout-menu-collapsed .layout-menu .menu-inner > .menu-item > .menu-sub {
    display: none !important;
  }

  /* (1) Logo → expand-icon morph. While collapsed, the expander overlays the logo
     in a 38px box at the logo's exact inset, so their centers line up. Hovering
     anywhere on the rail cross-fades the logo out and the icon in; clicking expands
     (the overlay is clickable even at opacity 0, so expand is never delayed). The
     suppress-expand-hint class (set on collapse-click, cleared on mouseleave) keeps
     the icon from flashing while the sidebar animates shut. */
  .layout-menu-collapsed .app-brand .menu-rail-expand {
    display: flex;
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(var(--bs-menu-vertical-link-padding-x) * 2 - 0.5rem);
    inline-size: 38px;
    align-items: center;
    justify-content: center;
    color: var(--bs-heading-color);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease 0s;
    z-index: 2;
  }
  .layout-menu-collapsed .app-brand .menu-rail-expand > i {
    font-size: 1.625rem;
    line-height: 1;
  }
  .layout-menu-collapsed .app-brand .app-brand-logo {
    transition: opacity 0.15s ease 0s;
  }
  .layout-menu-collapsed .layout-menu:not(.suppress-expand-hint):hover .menu-rail-expand {
    opacity: 1;
    transition-delay: 0s;
  }
  .layout-menu-collapsed .layout-menu:not(.suppress-expand-hint):hover .app-brand-logo {
    opacity: 0;
    transition-delay: 0s;
  }
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 300px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}
/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1.25rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1.25rem;
}

/* Table cells - prevent text wrapping */
.table-responsive table td,
.table-responsive table th {
  white-space: nowrap;
}

/* Organization switcher in sidebar - hide dropdown caret when collapsed */
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item > .menu-link.dropdown-toggle::after,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item > .menu-link.dropdown-toggle::after {
  display: none;
}

/* Organization switcher - visually separate from regular nav items */
.menu-inner > .menu-item.org-switcher-item > .menu-link {
  border: 1px solid var(--bs-secondary);
  border-radius: var(--bs-border-radius);
}
.menu-inner > .menu-item.org-switcher-item > .menu-link:hover,
.menu-inner > .menu-item.org-switcher-item > .menu-link[aria-expanded="true"] {
  border-color: var(--bs-primary);
}
/* Push the dropdown caret to the right edge of the link */
.menu-inner > .menu-item.org-switcher-item > .menu-link.dropdown-toggle > div {
  flex: 1 1 auto;
  min-width: 0;
}
.menu-inner > .menu-item.org-switcher-item > .menu-link.dropdown-toggle::after {
  margin-inline-start: auto;
  flex-shrink: 0;
}
/* Collapsed sidebar - center the icon, hide the name div from layout */
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link {
  justify-content: center;
  padding-inline-start: calc(0.75rem + 0.66em);
}
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link > div,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link > div {
  display: none;
}
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link > .menu-icon,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.org-switcher-item > .menu-link > .menu-icon {
  margin-inline-end: 0;
}
/* Org switcher dropdown - match the menu-link width (sidebar minus link margins) */
.org-switcher-menu {
  width: calc(var(--bs-menu-width) - 1.5rem);
  min-width: 0;
}

/* Never set position here: ties core's .layout-menu-fixed specificity and wins
   on order, un-fixing the sidebar so .layout-page double-counts its width. */
.layout-menu:has(.upgrade-card-item) .menu-inner {
  overflow-y: auto;
}

/* Upgrade nudge card - free-plan owners. Pushed to the bottom of the menu
   list with mt-auto; long menus scroll past it naturally. */
.menu-inner > .menu-item.upgrade-card-item {
  margin-block-start: auto;
  padding: 0.75rem;
}
.menu-inner > .menu-item.upgrade-card-item > .upgrade-card {
  border-color: var(--bs-border-color) !important;
}
.menu-inner > .menu-item.upgrade-card-item > .upgrade-card-collapsed-link {
  display: none;
}
/* Collapsed sidebar - icon-only crown button instead of the full card */
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card-collapsed-link,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card-collapsed-link {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  margin-inline: auto;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary);
  font-size: 1.25rem;
}
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card-collapsed-link:hover,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card-collapsed-link:hover {
  background-color: var(--bs-primary);
  color: #fff;
}
.layout-menu-collapsed .layout-menu:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card,
.menu-collapsed:not(.layout-menu-hover) .menu-inner > .menu-item.upgrade-card-item > .upgrade-card {
  display: none;
}

/* intlTelInput - Make phone input full width */
.iti {
  display: block !important;
  width: 100%;
}

/* Tagify - Match form-control height */
.tagify.form-control {
  block-size: auto;
  padding-block: calc(0.375rem - 1px) !important;
  padding-inline: calc(0.4375rem - 1px) !important;
}

/* Color Picker - Circular style */
.color-picker-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid #d9dee3;
  cursor: pointer;
  padding: 0.125rem;
}

.color-picker-circle:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
  border-radius: 50%;
  padding: 0.25rem;
}

.color-picker-circle::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-circle:focus::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-circle::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-circle:focus::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-circle::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-circle:focus::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Reduce margin-bottom for filter columns in orders listing */
#filtersCollapse .row.g-4 > .col-md-3 > div.mb-6 {
  margin-bottom: 0 !important;
}

/* Pagination overflow on mobile */
@media (max-width: 768px) {
  .card-footer {
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
  }
  
  nav[aria-label="pagination"] {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    position: relative;
    touch-action: pan-x pan-y pinch-zoom;
    -ms-overflow-style: none;
    scrollbar-width: none;
    display: block !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  nav[aria-label="pagination"]::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }
  
  nav[aria-label="pagination"] .pagination {
    flex-wrap: nowrap !important;
    min-width: max-content;
    display: inline-flex !important;
    margin-bottom: 0;
    padding-left: 0;
    white-space: nowrap;
  }
  
  nav[aria-label="pagination"] .pagination .page-item {
    flex-shrink: 0;
  }
}

/* Vue / Alpine: hide until framework has bound */
[v-cloak],
[x-cloak] {
  display: none !important;
}

/* Separator Info - Light gray background for form field separator information */
.separatorInfo {
  border-radius: .375rem;
  padding: 1rem 1.5rem;
  margin: 1rem 0 2rem;
  background-color: var(--bs-gray-75);
}

.card {
  --bs-card-box-shadow: 0px 0px 0px var(--bs-border-width) var(--bs-card-border-color);
  --bs-card-hover-box-shadow: 0px 0px 0px var(--bs-border-width) var(--bs-card-border-color);
}

/* Fix table header border radius in card-datatable */
/* Only apply top border radius if there's no bulk actions section above */
.card-datatable:not(:has(#bulk-action-button)) table thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--bs-border-radius) + 0.25rem);
}

.card-datatable:not(:has(#bulk-action-button)) table thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--bs-border-radius) + 0.25rem);
}

/* Make table header bottom border visible (theme sets it to header bg color) */
.table:not(.table-dark, .table-light) thead:not(.table-dark, .table-light) th {
  border-bottom-color: var(--bs-border-color) !important;
}

/* Add a visible top border ONLY when bulk actions exist */
.card-datatable:has(#bulk-action-button) table thead tr:first-child th {
  border-top: var(--bs-border-width) solid var(--bs-border-color) !important;
}

/* When bulk actions exist, remove top border radius from table header */
.card-datatable:has(#bulk-action-button) table thead tr:first-child th:first-child,
.card-datatable:has(#bulk-action-button) table thead tr:first-child th:last-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Remove bottom border from last row when no pagination */
/* Check if parent card has a card-footer sibling, if not, remove border */
.card:not(:has(> .card-footer)) .card-datatable table tbody tr:last-child td {
  border-bottom: none;
}

ul.pagination {
  margin-bottom: 0 !important;
}

/* Small screens: menu.js adds .overflow-auto to .menu-inner (horizontal scroll); clip drawer and scroll vertically only. */
@media (max-width: 1199.98px) {
  #layout-menu.layout-menu {
    inline-size: min(100vw, var(--bs-menu-width));
    overflow-inline: hidden;
    overscroll-behavior-inline: contain;
  }

  #layout-menu .menu-inner {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y;
  }
}
