@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

.badge {
  color: black;
  margin-right: 4px;
}

body {
  background-color: var(--michitheme100) !important;
}

.nav {
  @media screen and (max-width: 480px) {
    --bs-nav-link-padding-x: 0.5rem;
  }
}

.page-admin {
  padding: 24px;
  padding-top: env(safe-area-inset-top, 0px);
}

h1 {
  padding-bottom: 12px;
  margin-bottom: 32px;
  border-bottom: 1px var(--michitheme300) solid;
}

.navbar-admin {
  background-color: var(--michitheme300) !important;
}


.card {
  background-color: white;
  border-radius: var(--corner);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .15), 0 3px 6px rgba(0, 0, 0, .10);
}

.table {
  --bs-table-bg: white;
  border-radius: var(--corner);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .15), 0 3px 6px rgba(0, 0, 0, .10);
}

.table.flat {
  box-shadow: none;
  margin-top: 16px;
}



.table td {
  font-size: 14px;
}

.table tr:hover td {
  background-color: var(--michitheme100);
}

.table tr:first-of-type th {
  position: sticky;
  top: 0;
}

.table tr:first-of-type th {
  background-color: var(--michigray200);
  color: var(--michigray800);
  font-size: 14px;
  text-transform: uppercase;
}

.table:not(.flat) tr:first-of-type th:first-of-type {
  border-top-left-radius: var(--corner);
}

.table:not(.flat) tr:first-of-type th:last-of-type {
  border-top-right-radius: var(--corner);
}

.table:not(.flat) tr:last-of-type td:first-of-type {
  border-bottom-left-radius: var(--corner);
}

.table:not(.flat) tr:last-of-type td:last-of-type {
  border-bottom-right-radius: var(--corner);
}

.navbar-admin ul.nav.nav-pills {
  --bs-nav-pills-link-active-bg: var(--michitheme600);
  --bs-nav-link-color: black;
  --bs-link-hover-color: var(--michitheme700);
}

.btn {
  font-weight: bold;

}

.btn-primary {
  --bs-btn-bg: var(--michitheme500);
  --bs-btn-border-color: var(--michitheme500);

  --bs-btn-hover-bg: var(--michitheme400);
  --bs-btn-hover-border-color: var(--michitheme400);

  --bs-btn-active-bg: var(--michitheme300);
  --bs-btn-active-border-color: var(--michitheme300);
}

.customermeta th,
.customermeta td {
  padding: 4px 16px 4px 0;
}

.customermeta th {
  color: var(--michigray600);
  font-size: 14px;
}

.customermeta .btn {
  white-space: nowrap;
}

.customermeta .btn svg {
  margin-right: 4px;
}


.kpi {
  margin: 0.5rem;
  padding-top: 8px;
  padding-bottom: 8px;
  position: relative;
  height: 140px;
  border: 1px var(--michigray200) solid;
  background-color: white;
}

.kpi label {
  color: var(--michigray500);
  font-size: 12px;
  font-weight: bold;
}

.kpi img.caption {
  position: absolute;
  bottom: 8px;
  right: 8px;
  height: 16px;
}

.kpi h2 {
  margin-top: 1rem;
  margin-bottom: 0;
  font-weight: bold;
  text-align: center;
}

.kpi h3 {
  margin-top: 0;
  text-align: center;
  font-size: 18px;
  color: var(--michigray700);
}

.inbox-container {
  height: calc(100vh - 60px);
  overflow: hidden;
}

.customer-list {
  flex: 0 0 350px;
  overflow-y: auto;
}

.message-thread {
  overflow: hidden;
  padding-bottom: 72px;
}

#replyForm {
  display: none;
  position: fixed;
  bottom: 0;
  width: 100%;
  background: white;
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 8px);
}

.message-text {
  white-space: pre-wrap;
}

@media (min-width: 768px) {
  #replyForm {
    width: calc(100% - 350px);
  }
}

.navbar.fixed-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.customer-item {
  transition: background-color 0.2s;
}

.customer-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.customer-item.active {
  border-left: 6px solid var(--bs-primary);
}

.message-bubble {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile sidebar styles */
@media (max-width: 767px) {
  .sidebar {
    padding-top: env(safe-area-inset-top, 0px);
    position: fixed;
    left: -300px;
    width: 300px;
    top: 64px;
    bottom: 0;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  .message-thread {
    margin-left: 0 !important;
  }

  .sidebar-toggle {
    position: fixed;
    top: 64px;
    top: calc(env(safe-area-inset-top, 0px) + 64px);
    left: 10px;
    z-index: 1000;
    transition: left 0.3s ease;
  }

  .sidebar-toggle.active {
    left: 290px;
    transform: rotate(180deg);
  }
}