/* TheaCRM v2.8.623 – mobile UX cleanup */

/* Compact mobile dashboard --------------------------------------------- */
.thea-android-home--compact {
  padding-top: .1rem;
}

.thea-android-home--compact > .thea-mobile-dashboard {
  margin-top: .25rem;
}

.thea-android-home--compact .thea-mobile-dashboard__head {
  margin-bottom: .75rem;
}

.thea-android-home--compact .thea-mobile-dashboard__head h2 {
  font-size: 1.35rem;
}

/* Chat: preserve the full bottom quick navigation ---------------------- */
@media (max-width: 767.98px) {
  .thea-mobile-chat-list {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .thea-mobile-chat-thread {
    padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px));
  }

  .thea-mobile-chat-composer {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1035;
  }

  #theaMobileBottomNav {
    z-index: 1045;
  }
}

.thea-mobile-chat-list__head p {
  letter-spacing: .045em;
}

.thea-mobile-chat-thread__head span {
  font-size: .72rem;
}

/* Cleaner mobile email actions ----------------------------------------- */
.thea-mobile-email-detail__head {
  align-items: center;
}

.thea-mobile-email-detail__head-label {
  margin-left: auto;
  color: #758078;
  font-size: .72rem;
  font-weight: 750;
}

.thea-mobile-email-message__actions--clean {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: .55rem;
}

.thea-mobile-email-message__actions--clean > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.75rem;
}

.thea-mobile-email-more {
  position: relative;
}

.thea-mobile-email-more > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 2.75rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.thea-mobile-email-more > summary::-webkit-details-marker {
  display: none;
}

.thea-mobile-email-more[open] > summary {
  border-color: #a9c8b1;
  color: #1f6937;
  background: #eff8f1;
}

.thea-mobile-email-more__menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  z-index: 1050;
  display: grid;
  width: min(19rem, calc(100vw - 2rem));
  overflow: hidden;
  border: 1px solid #d9e5dc;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 15px 38px rgba(18, 48, 27, .18);
}

.thea-mobile-email-more__menu a,
.thea-mobile-email-more__menu button {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .72rem .8rem;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  color: #294936;
  background: #fff;
  font-size: .78rem;
  text-align: left;
  text-decoration: none;
}

.thea-mobile-email-more__menu > :last-child {
  border-bottom: 0;
}

.thea-mobile-email-more__menu a:active,
.thea-mobile-email-more__menu button:active {
  background: #eff7f1;
}

.thea-mobile-email-more__menu i {
  color: #327448;
  text-align: center;
}

@media (min-width: 768px) {
  .thea-mobile-email-more__menu {
    width: 20rem;
  }
}

@media (max-width: 360px) {
  .thea-mobile-email-message__actions--clean {
    grid-template-columns: 1fr;
  }

  .thea-mobile-email-more > summary {
    width: 100%;
  }

  .thea-mobile-email-more__menu {
    right: auto;
    left: 0;
  }
}
