@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --border-radius: 8px;
  --border-color: var(--mui-palette-divider);
  --primary-color: var(--mui-palette-primary-main);
  --background-color: var(--mui-palette-background-default);
  --background-color-rgb: var(--mui-palette-background-paperChannel);
  --header-height: 54px;
  --header-z-index: var(--mui-zIndex-appBar);
  --footer-z-index: 10;
  --customizer-z-index: var(--mui-zIndex-drawer);
  --search-z-index: var(--mui-zIndex-tooltip);
  --drawer-z-index: var(--mui-zIndex-drawer);
  --backdrop-color: rgb(var(--mui-mainColorChannels-light) / 0.5);
  --mui-mainColorChannels-shadow: var(--mui-mainColorChannels-lightShadow);
}

[data-dark] {
  --backdrop-color: rgb(23 25 37 / 0.6);
  --mui-mainColorChannels-shadow: var(--mui-mainColorChannels-darkShadow);
}

*,
::before,
::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border-width: 0;
  border-style: solid;
  border-color: theme('borderColor.DEFAULT', currentColor);
}

html {
  display: flex;
  inline-size: 100%;
  min-block-size: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul:not([class]) {
  margin-block: 1rem;
  padding-inline-start: 40px;
}

/*! Do not remove the following styles */
/*
  Fix the popout / submenu closing issue when using hover trigger to open the menu and using
  perfectscrollbar where the bridge create with safe polygon by floating ui was not working
*/
[data-floating-ui-safe-polygon] .scrollbar-container {
  pointer-events: auto;
}
[data-floating-ui-safe-polygon] .scrollbar-container .ps__rail-y {
  pointer-events: none;
}

.ps__rail-y {
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
  & .ps__thumb-y {
    inset-inline-end: 3px !important;
    inset-inline-start: auto !important;
    background-color: var(--mui-palette-divider);
    inline-size: 6px;
    &:hover,
    &:focus,
    &.ps--clicking {
      background-color: var(--mui-palette-action-disabled) !important;
    }
  }
  &:hover,
  &:focus,
  &.ps--clicking {
    background-color: var(--mui-palette-action-hover) !important;
  }
  &:hover,
  &:focus,
  &.ps--clicking {
    .ps__thumb-y {
      background-color: var(--mui-palette-action-disabled) !important;
    }
  }
}

.ts-vertical-nav-root {
  .ps__thumb-y {
    inline-size: 4px;
    &:hover,
    &:focus,
    &.ps--clicking {
      inline-size: 6px;
    }
  }
  .ps__rail-y {
    inline-size: 10px;
    &:hover,
    &:focus,
    &.ps--clicking {
      background-color: transparent !important;
      .ps__thumb-y {
        inline-size: 6px;
      }
    }
  }
}

:where([class^='tabler-']) {
  font-size: 1.5rem;
}

/* Fix width issue for the input-otp component */
input[autocomplete='one-time-code'][data-input-otp='true'] {
  inline-size: 100% !important;
}

code {
  font-family: inherit;
  padding-block: 2px;
  padding-inline: 4px;
  border-radius: 4px;
  font-size: 90%;
  color: var(--mui-palette-info-main);
  background-color: rgb(var(--mui-palette-info-mainChannel) / 0.08);
  border: 0;
}

.user-profile-header-banner img {
  block-size: 250px;
  inline-size: 100%;
  object-fit: cover;
}

.user-profile-header {
  margin-block-start: -2rem;
}
.user-profile-header .user-profile-img {
  border: 5px solid;
  border-color: var(--bs-paper-bg);
  inline-size: 120px;
}

.signture-img img{
  object-fit: contain !important;
}


/* Responsive style */
@media (max-width: 767.98px) {
  .user-profile-header-banner img {
    block-size: 150px;
  }
  .user-profile-header .user-profile-img {
    inline-size: 100px;
  }
}

.admin-sidebar > ul > li:first-child{
  display: none !important;
}
/* Driver Live location icon css for Eagle Module  */


.driver-marker {
  position: relative;
  transform: translate(-50%, -100%); /* center bottom anchor */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.pin {
  width: 35px;
  height: 35px;
  background: #1976d2;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: absolute;
  bottom: -7px;
  left: 50%;
  margin-left: -17px;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.driver-photo {
  min-width: 24px;
  max-width: 24px !important;
  width: 100%;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 1;
}

.tooltip-driver {
  position: absolute;
  bottom: 35px; /* marker ke upar */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 9999; /* sabse upar */
}

.tooltip-driver::after {
  content: "";
  position: absolute;
  top: 100%; /* tooltip ke niche */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}
.driver-marker:hover {
  z-index: 10000; /* Hover pe marker ka z-index badhao */
}

.driver-marker:hover .tooltip-driver {
  opacity: 1;
}

.sticky-action {
  position: sticky;
  right: 0;
  background: #fff;
}


.ql-picker.ql-variable .ql-picker-label::before {
  content: "Variable";
}

.ql-picker.ql-variable .ql-picker-item[data-value="customer_name"]::before {
  content: "Customer Name";
}

.ql-picker.ql-variable .ql-picker-item[data-value="invoice_no"]::before {
  content: "Invoice Number";
}

.ql-picker.ql-variable .ql-picker-item[data-value="due_date"]::before {
  content: "Due Date";
}

.ql-snow .ql-variable :not(.ql-color-picker):not(.ql-icon-picker) svg{
  right:-17px !important;  
}

.ql-toolbar .ql-html::after {
    content: "</>";
    font-weight: 600;
}

.date-pickerjs .rdrDefinedRangesWrapper{
  display: none;
}
