/* TheaCRM v2.8.630 – mobile e-mail delete and long-press selection */

.thea-mobile-email-more__separator {
  display: block;
  height: 1px;
  margin: .25rem .65rem;
  background: rgba(100, 116, 139, .22);
}

.thea-mobile-email-more__danger {
  color: #b42318 !important;
}

.thea-mobile-email-more__danger i {
  color: inherit !important;
}

.thea-mobile-emails.is-email-selection-mode .thea-mobile-email-card {
  -webkit-touch-callout: none;
  user-select: none;
}

.thea-mobile-email-card {
  touch-action: pan-y;
  transition:
    border-color .16s ease,
    background-color .16s ease,
    box-shadow .16s ease,
    opacity .16s ease,
    transform .16s ease;
}

.thea-mobile-email-card [data-thea-email-selection-icon] {
  display: none;
}

.thea-mobile-emails.is-email-selection-mode
.thea-mobile-email-card__state {
  border: 2px solid rgba(100, 116, 139, .42);
  background: transparent;
  color: transparent;
}

.thea-mobile-emails.is-email-selection-mode
.thea-mobile-email-card [data-thea-email-state-icon] {
  display: none;
}

.thea-mobile-emails.is-email-selection-mode
.thea-mobile-email-card [data-thea-email-selection-icon] {
  display: block;
  opacity: 0;
  color: #fff;
  font-size: 1rem;
}

.thea-mobile-emails.is-email-selection-mode
.thea-mobile-email-card > .bi-chevron-right {
  visibility: hidden;
}

.thea-mobile-email-card.is-selected {
  border-color: var(--bs-primary, #1d6f42);
  background:
    color-mix(
      in srgb,
      var(--bs-primary, #1d6f42) 10%,
      var(--bs-body-bg, #fff)
    );
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--bs-primary, #1d6f42) 24%, transparent);
}

.thea-mobile-email-card.is-selected
.thea-mobile-email-card__state {
  border-color: var(--bs-primary, #1d6f42);
  background: var(--bs-primary, #1d6f42);
  color: #fff;
}

.thea-mobile-email-card.is-selected
[data-thea-email-selection-icon] {
  opacity: 1 !important;
}

.thea-mobile-email-card.is-removing {
  opacity: 0;
  transform: translateX(1rem);
  pointer-events: none;
}

.thea-mobile-email-selection-bar {
  position: fixed;
  right: .75rem;
  bottom: calc(4.85rem + env(safe-area-inset-bottom));
  left: .75rem;
  z-index: 1085;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  max-width: 46rem;
  min-height: 3.7rem;
  margin: 0 auto;
  padding: .55rem .65rem;
  border: 1px solid rgba(100, 116, 139, .24);
  border-radius: 1rem;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .25);
}

.thea-mobile-email-selection-bar[hidden] {
  display: none !important;
}

.thea-mobile-email-selection-bar__cancel,
.thea-mobile-email-selection-bar__delete {
  min-height: 2.65rem;
  border-radius: .75rem;
  font-weight: 750;
}

.thea-mobile-email-selection-bar__cancel {
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color, #667085);
  padding: .45rem .55rem;
}

.thea-mobile-email-selection-bar__count {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.thea-mobile-email-selection-bar__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid #b42318;
  background: #b42318;
  color: #fff;
  padding: .45rem .8rem;
}

.thea-mobile-email-selection-bar__delete:disabled {
  opacity: .55;
}

body.thea-email-delete-dialog-open {
  overflow: hidden;
}

.thea-mobile-email-delete-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  align-items: end;
  justify-items: center;
  padding:
    max(.75rem, env(safe-area-inset-top))
    .75rem
    max(.75rem, env(safe-area-inset-bottom));
}

.thea-mobile-email-delete-dialog[hidden] {
  display: none !important;
}

.thea-mobile-email-delete-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(2px);
}

.thea-mobile-email-delete-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 1.1rem;
  border: 1px solid rgba(100, 116, 139, .22);
  border-radius: 1.15rem;
  outline: 0;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .38);
}

.thea-mobile-email-delete-dialog__icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: .75rem;
  border-radius: 50%;
  background: #fee4e2;
  color: #b42318;
  font-size: 1.25rem;
}

.thea-mobile-email-delete-dialog__panel h2 {
  margin: 0 0 .45rem;
  font-size: 1.25rem;
}

.thea-mobile-email-delete-dialog__panel p {
  margin: 0;
  color: var(--bs-secondary-color, #667085);
}

.thea-mobile-email-delete-dialog__note {
  margin-top: .3rem !important;
  font-size: .85rem;
}

.thea-mobile-email-delete-dialog__error {
  margin-top: .7rem !important;
  padding: .55rem .65rem;
  border-radius: .65rem;
  background: #fee4e2;
  color: #991b1b !important;
  font-size: .85rem;
}

.thea-mobile-email-delete-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1rem;
}

.thea-mobile-email-delete-dialog__actions .btn {
  min-height: 2.9rem;
  border-radius: .75rem;
  font-weight: 750;
}

@media (min-width: 700px) {
  .thea-mobile-email-delete-dialog {
    align-items: center;
  }
}

@media (max-width: 390px) {
  .thea-mobile-email-selection-bar {
    grid-template-columns: auto 1fr auto;
    right: .5rem;
    left: .5rem;
    gap: .35rem;
    padding: .5rem;
  }

  .thea-mobile-email-selection-bar__cancel {
    padding-inline: .35rem;
  }

  .thea-mobile-email-selection-bar__delete {
    padding-inline: .6rem;
  }
}
