/* === Material Design 3 Theme on top of Bootstrap 5.3.1 === */

/* -- Root Theme Variables -- */
*:root {
  --bs-highlight-color: rgb(13 110 253 / 0.50);
  --bs-accent-color: rgb(198 216 255 / 0.05);
}
/* -- Override Bootstrap colors -- */
:root {
  --bs-border-color: #a5aaae;
  --bs-nav-link-color: #0d6efd;
  --bg-highlight-subtle: rgb(65 124 214 / 0.50);
}

:focus-visible {
  outline: none!important;
  box-shadow: none!important;
}

/* === Typography === */
body {
  font-family: var(--bs-body-font-family);
  transition: background-color 0.3s, color 0.3s;
  font-size: 16sp!important;
  line-height: 1.25rem !important;
}

.highlight-subtle {
  background-color: var(--bg-highlight-subtle) !important;
}

.app-header {
  padding: 0.75rem 0;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.app-header .btn.rounded-circle {
  line-height: 0.8;
}

.btn-rounded {
  border-radius: 10rem!important;
}

.btn-circle {
  padding: 0.5rem!important;
  border-radius: 10rem!important;
  line-height: 1!important;
}

.btn[data-bs-toggle="dropdown"],
.btn[data-bs-toggle="dropdown"]:hover,
.btn[data-bs-toggle="dropdown"]:focus,
.btn[data-bs-toggle="dropdown"]:active,
.btn[data-bs-toggle="dropdown"].show {
  border: none !important;
}

/* === Headings and Text === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
}

a, a:hover, a:focus, a:active {
  text-decoration: none;
  color: inherit;
}

.navbar.fixed-bottom {
  background-color: var(--bs-body-bg);
  height: 75px;
}

.navbar.fixed-bottom .nav-link {
  line-height: 1;
  width: 20%;
}

.navbar.fixed-bottom .nav-link small {
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  text-overflow: ellipsis;
  display: inline-block;
  line-height: initial;
}

.btn {
  border-radius: var(--bs-border-radius);
  transition: all 0.2s ease-in-out;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
}

.btn-primary {
  border: none;
}

.btn-outline-primary {
  border: 1px solid var(--bs-primary);
}

/* === Form Inputs === */
.form-control {
  border-radius: 1.125rem; /*var(--bs-border-radius);*/
}

.form-control:focus,
.form-check-input:focus {
  box-shadow: none; 
}

.form-floating > .form-control-plaintext ~ label::after, 
.form-floating > .form-control:focus ~ label::after, 
.form-floating > .form-control:not(:placeholder-shown) ~ label::after, 
.form-floating > .form-select ~ label::after {
  background-color: transparent;
}
/* === Cards === */
.card {
  border-radius: var(--bs-border-radius);
}

.card-header {
  --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.1);
  border-bottom: none;
}

.modal-bottom {
  position: fixed;
  bottom: 0;
  margin: 0;
  transform: none;
}

.modal-bottom .modal-content {
  border-radius: 1.5rem 1.5rem 0 0; /* Rounded top corners */
}

/* === Modal === */
/*.modal-content {
  border-radius: var(--bs-border-radius);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}*/

/* === Theme Switcher Helper === */
/*.theme-toggle {
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 0.5rem;
  background-color: transparent;
}

.theme-toggle:hover {
  background-color: rgba(103, 80, 164, 0.05);
}
*/
/* === Elevation Helpers === */
/*.elevation-1 { box-shadow: var(--md-elevation-1); }
.elevation-2 { box-shadow: var(--md-elevation-2); }
*/
/* === Custom Material Switch === */
.form-switch .form-check-input {
  width: 2.5em;
  height: 1.4em;
  border-radius: 1em;
  background-color: #ccc;
  transition: background-color 0.3s;
}

label[for] {
  margin-bottom: 0.25rem;
}
/*.form-switch .form-check-input:checked {
  background-color: var(--md-sys-color-primary);
}*/
#outletName + .bx {
  display: inline;
  font-size: inherit;
  line-height: inherit;
}
.bx-border {
  padding: .125rem;
  border: 3px solid;
  border-radius: .25em;
}

.bx.bx-rupee.bx-border {
  font-weight: 600;
}

.swiper-nav {
  padding: 0.5rem;
  text-align: center;
  color: var(--bs-body-color);
  border: none!important;
  position: relative;
}

.swiper-nav > span {
  display: inline-block;
  width: 100%;
  max-width: 60px;
  padding: 0.5rem 0;
  text-align: center;
  background-color: transparent;
  color: var(--bs-body-color) !important;
  border-radius: 10rem;
}

.swiper-nav.active > span {
  background-color: var(--bs-highlight-color) !important;
}

.swiper, .swiper-wrapper, .swiper-slide {
  height: calc(100vh - 160px); /* 56px = height of bottom navbar */
}

.swiper-slide-body {
  overflow-x: hidden;
  overflow-y: auto;
}

#home {
  padding-top: 1rem;
}
#home .swiper-slide-body {
  height: 100%;
}

#orders .swiper-slide-body,
#menu .swiper-slide-body,
#settings .swiper-slide-body {
  height: calc(100% - 58px);
}

#transactions .swiper-slide-body {
  height: calc(100% - 85px);
}

.category-scroll {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding: 0 0.5rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.category-scroll li {
  min-width: 80px;
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.scroll-btn {
  display: none;
}

/* Show scroll buttons only on devices with mouse (non-touch) */
@media (hover: hover) and (pointer: fine) {
  .category-scroll-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    z-index: 1001;
  }
  .scroll-btn.scroll-left {
    left: -1rem!important;
  }
  .scroll-btn.scroll-right {
    right: -1rem!important;
  }
}

#viewContainer img {
  object-fit: cover;
  border-radius: 0.5rem;
  width: 64px;
  height: 64px;
}

.accordion-button {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.accordion-button::after {
  content: none;
}

.accordion-button::before {
  content: "";
  background-image: var(--bs-accordion-btn-active-icon);
  flex-shrink: 0;
  width: var(--bs-accordion-btn-icon-width);
  height: var(--bs-accordion-btn-icon-width);
  margin-right: auto;
  background-image: var(--bs-accordion-btn-icon);
  background-repeat: no-repeat;
  background-size: var(--bs-accordion-btn-icon-width);
  transition: var(--bs-accordion-btn-icon-transition);
}

.accordion-button:not(.collapsed)::before {
  transform: var(--bs-accordion-btn-icon-transform);
}

.accordion-body > .d-flex {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.accordion-button:focus {
  box-shadow: none;
}

.nav-tabs {
  position: relative;
  border-bottom: none;
  display: flex;
  justify-content: space-around;
  background: transparent;
  max-width: 400px;
  margin: 0 auto;
  border: solid 1px var(--bs-border-color);
  border-radius: 10rem;
}

.nav-tabs .nav-item {
  flex-grow: 1;
}

.nav-tabs .nav-link {
  font-weight: 500;
  font-size: 1rem;
  color: var(--bs-body-color);
  border: none;
  background-color: transparent;
  position: relative;
  padding: 0.75rem 1rem;
  transition: color 0.3s ease;
  width: 100%;
  border-radius: 10rem;
  height: 100%;
}

.nav-tabs .nav-item:not(:first-child) .nav-link {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.nav-tabs .nav-item:not(:last-child) .nav-link {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.nav-tabs .nav-link.active, .trxn-date-link {
  background-color: var(--bs-highlight-color) !important
}

.table.bg-transparent th, .table.bg-transparent td {
  background-color: transparent!important; 
}

.list-group, .card {
  background-color: var(--bs-accent-color);
}

.list-group, .list-group-item, .list-group-item-action {
  border: none;
}

.list-group-item, .list-group-item-action {
  background-color: transparent !important;
  padding: 0.75rem;
}

.list-group-item-action:hover {
  background-color: var(--bs-accent-color)!important;
}

.list-group-item[data-active='0'] * {
  opacity: 0.85;
  filter: saturate(0);
}

.list-group-item[data-active='0'] h6::after {
  content: "x";
  color: #ff0000;
  font-size: 85%;
  margin-left: 0.5rem;
  display: inline-block;
  filter: none!important;
}

.nav-tabs.scroll-x {
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  max-width: 100%;
  margin: 0 0;
  border: none !important;
  border-radius: 0 !important;
  font-size: 0.75rem;
  -webkit-overflow-scrolling: touch;
  justify-content: start;
}

@media (min-width: 576px) {
  .nav-tabs.scroll-x {
    justify-content: center;
  }
}
.nav-tabs.scroll-x::-webkit-scrollbar {
  display: none;
}

.nav-tabs.scroll-x .nav-link {
  display: inline-flex;
  width: auto;
  white-space: nowrap;
  font-weight: normal;
  flex-shrink: 0;
  padding: 0.25rem 1rem 0.375rem;
  margin: 0 0.5rem;
  border: var(--bs-highlight-color) solid 2px;
  border-radius: 10rem;
}

.nav-tabs.scroll-x .nav-link:not(.active) {
  border: var(--bg-highlight-subtle) solid 2px !important;
}

#selectOutlet img {
  width: 100px;
  height: 100px;
}

#toast-container > div {
  border-radius: 10rem;
}

#menuContainer {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

#navHeader {
  flex: 0 0 auto; /* Keep header only as tall as its content */
}

#navHeader .list-group-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

#viewContainer {
  flex: 1 1 auto; /* Fill remaining space */
  overflow-y: auto; /* Scrollable if content overflows */
  position: relative;
} 

.view-panel {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  transition: transform 0.3s ease;
}

.view-panel img, #navHeader img {
  height: 64px;
  width: 64px;
}

.slide-in-left {
  transform: translateX(100%);
}

.slide-in-right {
  transform: translateX(-100%);
}

.slide-center {
  transform: translateX(0);
}

.select2-container {
  width: 100%!important;
}

.select2-container .select2-selection--single {
  height: 37.6px !important;
  border-color: var(--bs-border-color);
}

.select2-container--default .select2-selection--single {
  border-radius: 1.125rem; /*var(--bs-border-radius) !important;*/
  padding: .375rem 2rem .375rem .75rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  width: 2rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: initial!important;
  line-height: initial!important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: initial!important;
  padding-right: initial!important;
}

.select2-dropdown {
  border-radius: 1rem;
  overflow: hidden;
}
/*----------------------------------------------*/
/*----------------Accordion Menu----------------*/
/* Hide Bootstrap's default caret */
#menuContainer .accordion-button::before {
  content: none !important;
  display: none !important;
}

/* Keep text/images aligned left */
#menuContainer .accordion-button {
  text-align: left;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

  /* Hover effect */
  #menuContainer .accordion-button:hover {
    background-color: rgba(0, 0, 0, 0.03);
  }

  /* Chevron rotation */
  #menuContainer .accordion-button .bx {
    transition: transform 0.3s ease;
  }

  #menuContainer .accordion-button:not(.collapsed) .bx {
    transform: rotate(180deg);
  }

/* Remove borders between nested accordions */
#menuContainer .accordion-item {
  border: none;
}

/* Portion cards */
#menuContainer .accordion-body .card {
  border-radius: 0.5rem;
  background: var(--bs-light-bg-subtle, #f8f9fa);
}

#menuContainer .accordion-button:not(.collapsed) {
  box-shadow: none !important;
  border-bottom: solid 1px var(--bs-border-color);
}
/*----------------Accordion Menu----------------*/
/*----------------------------------------------*/

/*--Shadows--*/
.modal-content {
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .075) !important
}

@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content {
    border-radius: 0!important;
  }
}

@media (max-width: 767.98px) {
  .modal-fullscreen-md-down .modal-content {
    border-radius: 0 !important;
  }
}

@media (max-width: 991.98px) {
  .modal-fullscreen-lg-down .modal-content {
    border-radius: 0 !important;
  }
}

@media (max-width: 1199.98px) {
  .modal-fullscreen-xl-down .modal-content {
    border-radius: 0 !important;
  }
}

.popover, .dropdown-menu {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .075) !important
}

@media (min-width: 576px) {
  .modal-fullscreen-sm-down .modal-content {
    border-radius: var(--bs-border-radius-xl) !important;
  }
  .modal-sm {
    max-width: 360px !important;
  }
}
@media (max-width: 575px) {
  .modal-fullscreen-sm-down .modal-header {
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
  .modal-fullscreen-sm-down .btn-close {
    margin: calc(-.5 * var(--bs-modal-header-padding-y)) calc(.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) !important;
    background: transparent url(data:image/svg+xml,%3Csvg%20width%3D%22256px%22%20height%3D%22256px%22%20viewBox%3D%220%200%20512.00%20512.00%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22%23000000%22%3E%3Cg%20id%3D%22SVGRepo_bgCarrier%22%20stroke-width%3D%220%22%3E%3C%2Fg%3E%3Cg%20id%3D%22SVGRepo_tracerCarrier%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fg%3E%3Cg%20id%3D%22SVGRepo_iconCarrier%22%3E%3Ctitle%3Eionicons-v5-a%3C%2Ftitle%3E%3Cpolyline%20points%3D%22244%20400%20100%20256%20244%20112%22%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-width%3A48px%22%3E%3C%2Fpolyline%3E%3Cline%20x1%3D%22120%22%20y1%3D%22256%22%20x2%3D%22412%22%20y2%3D%22256%22%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-width%3A48px%22%3E%3C%2Fline%3E%3C%2Fg%3E%3C%2Fsvg%3E) center / 1em auto no-repeat !important;
    background-size: 24px 24px!important;
  }
}