@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
  box-shadow: none;
}

body,
html {
  padding: 0;
  margin: 0;
  font-size: 14px;
  background-color: #f5f5f5;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif !important;
}

main {
  background-color: rgb(255 255 255) !important;
  overflow-y: auto !important;
}

.wrapper {
  display: flex;
  height: 100vh;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-left: 0.1rem;
  margin-right: 0.1rem;
}

.sidebar {
  flex-shrink: 0;
  width: 280px;
  background-color: #ffffff;
  color: #333;
  transition: width 0.3s ease;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar .nav-link {
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
  background-color: #f5f5f5;
  color: #333;
}

.sidebar .nav-link.active {
  background-color: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
  border-left: 3px solid #1976d2;
  padding-left: 17px;
}

.sidebar .nav-item span {
  transition: opacity 0.3s;
  margin-left: 12px;
}

.sidebar.collapsed .nav-item span {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-nav .nav-link {
  justify-content: center;
  padding-left: 26px;
  padding-right: 0;
}

.sidebar.collapsed .sidebar-nav .nav-link.active {
  border-left: none;
}

.sidebar .nav-link i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  color: #666;
}

.sidebar .nav-link.active i {
  color: #1976d2;
}

.content-area {
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

.topbar {
  height: 56px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar .toggle-btn {
  border: none;
  background: none;
  font-size: 1.25rem;
}

.main-content {
  flex-grow: 1;
  overflow-x: auto;
  padding: 1.5rem;
  background: #f5f5f5;
  transition: margin-left 0.3s ease;
}

/* Sidebar Header */
.sidebar-collapse-btn img {
  width: 20px;
  height: 20px;
}

.sidebar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 20px 10px;
  font-weight: 600;
  font-size: 18px;
}

.sidebar-brand img {
  margin-right: 8px;
}

.sidebar-brand-text {
  font-weight: 400;
}

.sidebar-collapse-btn {
  position: absolute; /* move it upward onto the edge line */
  top: 10px;
  right: -10px; /* adjust horizontally to sit on the right edge */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.sidebar-collapse-btn:hover {
  background-color: #f5f5f5;
}

.sidebar-collapse-btn .collapse-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.sidebar.collapsed .sidebar-brand-text {
  display: none;
}

.sidebar.collapsed .sidebar-collapse-btn {
  margin: 0 auto;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.sidebar-nav .nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Notification Badge */
.notification-badge {
  position: relative;
}

.notification-badge .nav-link {
  position: relative;
}

.notification-badge .nav-link::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: #ff9800;
  border-radius: 50%;
  border: 2px solid #ffffff;
  z-index: 1;
}

.sidebar.collapsed .notification-badge .nav-link::after {
  left: 50%;
  transform: translate(-50%, -50%);
}

/* User Profile Section */
.sidebar-user-profile-wrapper {
  margin-top: auto;
  border-top: 1px solid #e0e0e0;
  position: relative;
  z-index: 1000;
}

.sidebar-user-profile {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
}

.sidebar-user-profile:hover {
  background-color: #f5f5f5;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4caf50;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  margin-left: 12px;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  color: #666;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-arrow {
  color: #666;
  font-size: 14px;
  flex-shrink: 0;
}

/* Sidebar User Dropdown */
.sidebar-user-dropdown {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.sidebar.collapsed .sidebar-user-dropdown {
  left: 100%;
  right: auto;
  min-width: 180px;
  margin-left: 10px;
}

.sidebar-user-dropdown .dropdown-item {
  font-size: 14px;
  padding: 8px 16px;
}

.sidebar-user-dropdown .dropdown-item:hover {
  background-color: #f5f5f5;
}

.sidebar-user-dropdown .dropdown-toggle::after {
  margin-left: auto;
  float: right;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .user-arrow {
  display: none;
}

.sidebar.collapsed .sidebar-user-profile {
  justify-content: center;
  padding: 20px 10px;
}

.sidebar.collapsed .sidebar-user-profile-wrapper {
  position: relative;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 20px 10px;
}

.sidebar.collapsed .sidebar-brand {
  margin: 0;
}

.sidebar.collapsed .sidebar-brand > div:first-child {
  margin-right: 0;
}

.sidebar.collapsed
  .sidebar-brand
  > div:first-child
  img[src*='hairgeartxt.png'] {
  display: none;
}

.dt-container {
  margin-top: 20px;
  font-size: 12px;
}

.dt-input {
  border: 1px solid #c2c2c2;
  border-radius: 5px;
}

.dt-paging-button {
  margin-left: 5px;
  margin-right: 5px;
  border-radius: 5px;
  background-color: #fcfcfc;
  border: 1px solid #c2c2c2;
  color: #5f5f5f;
  font-size: 14px;
}

.pointer {
  cursor: pointer;
}

.dt-info {
  margin-bottom: 10px;
}

.form-group label {
  color: #000;
  font-weight: bold;
  font-size: 12px;
  margin-top: 10px;
  user-select: none;
}

.form-group label i {
  cursor: pointer;
}

.form-group input,
.form-group select,
.form-check input,
.form-group textarea {
  font-size: 12px;
  border: 1px solid rgba(167, 178, 255, 0.5);
  background-color: rgb(224, 234, 255);
}

.alert {
  font-size: 12px;
  font-weight: bold;
  padding: 15px;
  margin-left: 10px;
}

label.error {
  color: #ff0000 !important;
  margin-top: 4px;
  font-weight: normal;
}

fieldset {
  border: 1px solid rgb(167, 178, 255);
  border-radius: 10px;
}

.modal-body fieldset {
  border: 1px solid #000;
}

legend {
  color: rgb(167, 178, 255);
  font-size: 14px;
}

.modal-body legend {
  color: #000;
  font-size: 14px;
  font-weight: bold;
}

.pageTitle {
  color: rgb(167, 178, 255);
  font-size: 20px;
}

.pageTitle a {
  font-size: 12px;
  text-decoration: none;
  margin-left: 40px;
}

.form-check label {
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  line-height: 30px;
  margin-left: 10px;
}

.adjust-margin{
  margin-left: 0 !important;
}

.nav i {
  margin-right: 5px;
  font-size: 14px;
}

.collapsed.drop::before {
  visibility: visible;
  content: '\F231';
}

.drop::before {
  visibility: visible !important;
  font-family: bootstrap-icons !important;
  content: '\F229';
  font-size: 12px;
  float: left;
  line-height: 24px;
  margin-right: 10px;
  color: rgb(182, 191, 255);
}

.nav li a.active {
  background-color: #e3f2fd !important;
  color: #1976d2 !important;
}

.nav li a::before {
  display: none;
}

.nav li {
  margin-top: 0;
}

.nav li a {
  background: transparent;
  padding-left: 20px;
  cursor: pointer;
}

.nav ul {
  list-style: none;
}

#resultMessage {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 30%;
  display: none;
  z-index: 10000;
}

.text-right {
  text-align: right;
}

label span {
  font-weight: bold;
  font-size: 12px;
}

.nav-link {
  font-size: 14px;
}

.productImage {
  width: 150px;
  height: 150px;
  border: 1px solid rgb(167, 178, 255);
  border-radius: 5px;
  line-height: 150px;
  margin: 10px;
  font-size: 60px;
  text-align: center;
  color: rgba(167, 178, 255, 0.2);
  background-size: 100%;
}

.productImage div {
  font-size: 12px;
  line-height: 20px;
  margin-top: -105px;
  color: rgba(167, 178, 255);
}

.detailes_lbl {
  font-size: 12px;
  font-weight: bold;
  line-height: 32px;
}

.detailes_lbl_info {
  line-height: 32px;
}

.plistImage {
  border: 1px solid rgb(167, 178, 255);
  border-radius: 10px;
}

.attHeading {
  background-color: rgb(167, 178, 255, 0.25);
  border-radius: 4px;
  margin-right: 4px;
}

.attData {
  background-color: rgb(211, 211, 211, 0.2);
  border-radius: 4px;
  margin-right: 4px;
  font-size: 12px;
  line-height: 24px;
}

.modal-backdrop {
  background-color: transparent;
}

.modal-content {
  border: 1px solid rgb(161, 172, 255);
  color: #fff;
  padding: 1px;
}

.modal-header {
  border-bottom: unset;
  background: linear-gradient(
    90deg,
    rgb(161, 172, 255) 50%,
    rgba(116, 161, 255, 1) 100%
  );
}

.modal-body {
  padding: 25px;
  color: #151515;
}

.modal-footer {
  border-top: unset;
}

.productImage:hover {
  color: #ff0000;
  cursor: pointer;
}

p {
  font-size: 12px;
}

.row span {
  font-size: 12px;
  line-height: 26px;
}

.fs-5 {
  font-size: 20px !important;
}

.modal-header .btn-close {
  font-size: 12px !important;
  margin-right: -8px;
  margin-top: -32px;
}

.modal-title {
  margin-left: 5px;
}

::placeholder {
  color: #000 !important;
  opacity: 0.25 !important;
}

body {
  overflow: hidden;
}

.select2-container {
  width: 100% !important;
}

.select2-selection--single {
  font-size: 14px !important;
  border: 1px solid rgb(167, 178, 255) !important;
  background-color: rgb(224, 234, 255) !important;
  height: 35px !important;
  line-height: 35px !important;
  border-radius: 7px !important;
}

.select2-selection__arrow {
  height: 35px !important;
}

.ml {
  margin-left: 10px;
}

table.table.dataTable > :not(caption) > * > * {
  background-color: transparent !important;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgb(167, 178, 255);
}

.readonly {
  cursor: not-allowed;
  background-color: transparent !important;
  border: unset !important;
  font-weight: bold;
}

.ml {
  margin-left: 20px;
}

.select2-results__option {
  padding: 10px;
  font-size: 12px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-top: 3px;
}

.lang-select {
  position: absolute;
  top: 18px;
  right: 14px;
}

.lang-select button {
  background-color: transparent;
  color: #fff;
  border: none;
}

.dropdown-item {
  color: #000 !important;
  font-size: 12px;
}

.lang-select_form {
  bottom: 10px;
  top: unset;
}

.fullScr_reset {
  position: absolute;
  right: 210px;
  top: 30px;
}

.fullScr_submit {
  position: absolute;
  right: 80px;
  top: 30px;
}

.pull-right {
  float: right;
}

.close_ShippingSection {
  /*position: absolute;
    top: 10px;
    right: 10px;*/

  font-size: 16px;
  color: rgb(167, 178, 255);
  cursor: pointer;
}

.showMeNOW {
  display: block !important;
}

.Add-billing_create,
.Add-billing_update {
  color: rgba(116, 161, 255, 1);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.pagination {
  --bs-pagination-padding-x: 7px;
  --bs-pagination-padding-y: 1px;
  --bs-pagination-font-size: 16px;
}

.dt-paging-button {
  margin-left: 3px;
  margin-right: 3px;
  border-radius: 3px;
  background-color: #fcfcfc;
  border: 0px;
  color: #5f5f5f;
  font-size: 16px;
}

.tracking div {
  text-align: center;
  line-height: 24px;
  font-size: 14px;
}

.tracking div i {
  font-size: 24px;
  line-height: 24px;
}

.gray-text i {
  color: #c2c2c2;
  font-size: 14px !important;
}

.redtext {
  color: red;
}

.subProText {
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid #ccc;
  margin-top: 0px;
  width: 80%;
  margin-left: 1%;
}

.commentAlert {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.dt-paging-button button {
  font-size: 10px;
}

.no-margin {
  margin: 0;
}

div.dts div.dt-scroll-body,
div.dts div.dataTables_scrollBody {
  background: #fff !important;
}

.ml-8 {
  margin-left: 8px;
}

.validation-summary-errors {
  color: red;
  background-color: lightblue;
  border-radius: 5px;
  margin-top: 20px;
}

.icon-link {
  color: dodgerblue;
}

.icon-link:hover {
  color: blue;
}

.field-validation-error {
  color: red;
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }
  .sidebar.collapsed {
    width: 70px;
  }

  .content-area {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .toggle-btn {
    display: none;
  }
}

@media (max-width: 767.98px) {
  #sidebar {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    z-index: 1050;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    width: 70px;
    background: rgb(103, 112, 179);
    background: linear-gradient(
      135deg,
      rgba(103, 112, 179, 1) 20%,
      rgba(116, 161, 255, 1) 100%
    );
  }

  body.sidebar-open #sidebar {
    display: block !important;
  }
  body.sidebar-open #sidebar .nav-link span {
    display: none !important;
  }
  body.sidebar-open #sidebar .nav-link i {
    font-size: 1.5rem;
    margin-right: 0;
  }
  .content-area {
    width: 100% !important;
  }
  #sidebarToggle {
    display: inline-block !important;
    z-index: 1100;
    position: fixed;
    top: 16px;
    left: 16px;
    transition: left 0.3s;
  }
  body.sidebar-open #sidebarToggle {
    left: 80px;
  }
}

/* Modal stacking solution */
.modal {
  z-index: 1055 !important; /* Base z-index */
}

/* Dynamic z-index classes for modal stacking */
.modal-stack-1 {
  z-index: 1055 !important;
}
.modal-stack-2 {
  z-index: 1065 !important;
}
.modal-stack-3 {
  z-index: 1075 !important;
}
.modal-stack-4 {
  z-index: 1085 !important;
}
.modal-stack-5 {
  z-index: 1095 !important;
}

/* Ensure modal backdrops also stack properly */
.modal-backdrop {
  z-index: 1050 !important; /* Base backdrop z-index */
}

.modal-backdrop-stack-1 {
  z-index: 1050 !important;
}
.modal-backdrop-stack-2 {
  z-index: 1060 !important;
}
.modal-backdrop-stack-3 {
  z-index: 1070 !important;
}
.modal-backdrop-stack-4 {
  z-index: 1080 !important;
}
.modal-backdrop-stack-5 {
  z-index: 1090 !important;
}

/* Remove margin from Bootstrap row element added by DataTables between table and footer */
/* This row element is created by DataTables Bootstrap 5 integration for layout */
.dataTables_wrapper .row.mt-2.justify-content-between {
  margin-top: 0 !important; /* remove gap between table and footer */
  margin-bottom: 0 !important; /* remove bottom margin */
}

/* More specific selector for direct children */
.dataTables_wrapper > .row.mt-2.justify-content-between {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Ensure footer connects seamlessly - remove any gap */
.dataTables_wrapper .dt-footer {
  margin-top: 0 !important;
}

/* Create a full-width footer area we control */
.dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: 0 !important; /* remove margin to connect with table */
  padding: 0.75rem 1rem; /* add padding for spacing */
  border: 2px solid #e9eaeb; /* match table border */
  border-top: none; /* remove top border to connect with table */
  border-radius: 0 0 12px 12px; /* rounded bottom corners to match table's top corners */
  background-color: #fff; /* ensure background matches table */
}

/* When footer is inside DataTables wrapper, ensure it connects to table */
.dataTables_wrapper .dt-footer {
  margin-top: 0 !important;
}

/* three zones */
.dt-footer .dt-left,
.dt-footer .dt-center,
.dt-footer .dt-right {
  display: flex;
  align-items: center;
}

.dt-footer .dt-left,
.dt-footer .dt-right {
  min-width: 120px; /* keeps edges visible */
  justify-content: flex-start;
}
.dt-footer .dt-right {
  justify-content: flex-end;
}

.dt-footer .dt-center {
  flex: 1 1 auto;
  justify-content: center;
}

/* style the actual page links (bootstrap structure preserved) */
.dt-footer .pagination .page-link {
  border-radius: 8px !important;
  margin: 0 4px !important;
  padding: 6px 12px !important;
}
.dt-footer .pagination .active .page-link {
  background-color: #e5edff !important;
  color: #0d6efd !important;
  border: none !important;
  font-weight: 600;
}
.dt-footer .pagination .disabled .page-link {
  opacity: 0.4;
}

.dt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dt-footer .dt-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.dt-footer .pagination .page-link {
  border-radius: 8px !important;
  margin: 0 5px;
}

.dt-footer .active .page-link {
  background: #e5edff !important;
  color: #0d6efd !important;
}

/* Outer border with rounded corners */
table.dataTable {
  border-radius: 12px 12px 0 0; /* rounded top corners only when footer is present */
  border: 2px solid #e9eaeb; /* outer border color */
  border-bottom: none; /* remove bottom border when footer is present */
  border-collapse: separate; /* important to keep outer border separate */
  overflow: hidden; /* clips inner rows to rounded corners */
}

/* Remove vertical borders inside cells */
table.dataTable th,
table.dataTable td {
  border-left: none !important;
  border-right: none !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Horizontal row separators */
table.dataTable tbody tr {
  border-bottom: 1px solid #f1f1f1 !important;
}

/* Remove double border at the bottom if no-footer */
table.dataTable.no-footer {
  border-bottom: 2px solid #e9eaeb; /* keep bottom border same as outer */
  border-radius: 12px; /* full rounded corners when no footer */
}

/* Header styling */
table.dataTable thead {
  background-color: #f5f5f5 !important;
  border-bottom: 2px solid #e9eaeb; /* header bottom separates from body */
}

/* Table header text styling */
table.dataTable thead th,
table thead th {
  font-family: Inter, sans-serif !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  line-height: 18px !important;
  letter-spacing: 0% !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Table body text styling (exclude headers) */
table.dataTable tbody td,
table tbody td {
  font-family: Inter, sans-serif !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 12px !important;
  letter-spacing: 0% !important;
}

/* Table cell padding for all tables */
table th,
table td {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* Outer border for the whole table including footer */
table.dataTable-wrapper {
  border: 2px solid #e9eaeb;
  border-radius: 12px;
  overflow: hidden;
  display: inline-block; /* shrink-wrap to table + footer */
  width: max-content;
}

/* Table itself */
table.dataTable {
  border-collapse: separate; /* prevents inner vertical borders */
}

/* Row separators */
table.dataTable tbody tr {
  border-bottom: 1px solid #f1f1f1;
}

/* ------------------------------------------------------------------ */
/* Language pill toggle (Views/Shared/_LanguageToggle.cshtml)         */
/* Mirrors the SV / EN segmented control in the Hairgear mobile app.  */
/* Lives anywhere the prior "EN ▾" dropdown did; the .lang-select     */
/* positioning wrapper still handles placement on form layouts.       */
/* ------------------------------------------------------------------ */
.lang-pill {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 3px;
  line-height: 1;
  gap: 0;
}
.lang-pill__opt {
  background-color: transparent;
  border: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  min-width: 36px;
  line-height: 1;
}
.lang-pill__opt.is-active {
  background-color: #111827;
  color: #fff;
}
.lang-pill__opt:not(.is-active):hover {
  color: #111827;
}
/* Override the legacy ".lang-select button" rule that painted the   */
/* dropdown text white on dark backgrounds — the pill carries its    */
/* own contrast.                                                     */
.lang-select .lang-pill__opt {
  color: #6b7280;
}
.lang-select .lang-pill__opt.is-active {
  color: #fff;
}
