/* TempMy Inbox Pages (rebuilt) */
/* Scoped to .tmx-* to avoid affecting other pages. */

#tm-toast-container{
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}
#tm-toast-container .tmx-toast{ pointer-events: auto; }
:dir(rtl) #tm-toast-container{
  left: auto;
  right: 16px;
  align-items: flex-end;
}

.tmx-inbox{
  padding: 24px 0 64px;
}

.tmx-inbox-app{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}

.tmx-inbox-app__top{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(var(--color1-rgb,255,165,0), .10);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.tmx-inbox-app__title{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}

.tmx-inbox-app__meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tmx-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  font-size: 12px;
  line-height: 1;
}
.tmx-pill__label{ opacity: .75; }
.tmx-pill__value{ font-weight: 800; }

.tmx-inbox-grid{
  display: grid;
  gap: 14px;
  padding: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 992px){
  .tmx-inbox-app.is-free .tmx-inbox-grid{
    grid-template-columns: 1fr 1.35fr;
    align-items: start;
  }
  .tmx-inbox-app.is-pro .tmx-inbox-grid{
    grid-template-columns: 320px 1fr 1.35fr;
    align-items: start;
  }
}

.tmx-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  overflow: hidden;
}

.tmx-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.tmx-card__title{
  font-weight: 800;
  font-size: 14px;
}

.tmx-card__meta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
}

.tmx-card__body{
  padding: 12px;
}

.tmx-email-field{ width: 100%; }

.tmx-email-input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-size: 14px;
}

.tmx-actions,
.tmx-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tmx-toolbar{ align-items: center; }

.tmx-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(0,0,0,.05);
  color: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;
}

.tmx-btn i{ font-size: 14px; }

.tmx-btn--primary{
  background: var(--color1,#ffa500);
  color: #111;
  border-color: rgba(0,0,0,.08);
}

.tmx-btn--ghost{
  background: #fff;
  border-color: rgba(0,0,0,.12);
}

.tmx-btn--danger{
  background: #fff;
  border-color: rgba(220,53,69,.55);
  color: #dc3545;
}

.tmx-btn--block{
  width: 100%;
  justify-content: center;
}

.tmx-btn:disabled{
  opacity: .6;
  cursor: not-allowed;
}

.tmx-select,
.tmx-input{
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

.tmx-input{ width: 120px; }

.tmx-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

.tmx-toggle input{
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tmx-toggle__ui{
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0,0,0,.14);
  position: relative;
  flex-shrink: 0;
}

.tmx-toggle__ui:after{
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.tmx-toggle input:checked + .tmx-toggle__ui{
  background: rgba(var(--color1-rgb,255,165,0), .65);
}
.tmx-toggle input:checked + .tmx-toggle__ui:after{
  transform: translateX(16px);
}

.tmx-toggle__label{
  font-size: 13px;
  font-weight: 700;
}

.tmx-status{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0,0,0,.6);
  min-height: 16px;
}

.tmx-alert{
  border: 1px solid rgba(220,53,69,.35);
  background: rgba(220,53,69,.06);
  color: #b02a37;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.tmx-skeleton{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.tmx-skel-row{
  height: 56px;
  border-radius: 14px;
  background: rgba(0,0,0,.06);
  overflow: hidden;
  position: relative;
}

.tmx-skel-row:after{
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: rgba(255,255,255,.45);
  transform: skewX(-20deg);
  animation: tmx-shimmer 1.1s infinite;
}

@keyframes tmx-shimmer{
  0%{ left: -40%; }
  100%{ left: 120%; }
}

.tmx-message-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tmx-msg{
  display: block;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.tmx-msg:hover{ background: rgba(0,0,0,.02); }

.tmx-msg__from{
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 2px;
}

.tmx-msg__subject{
  font-size: 13px;
  color: rgba(0,0,0,.75);
}

.tmx-msg__meta{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tmx-msg__dot{ opacity: .55; }

.tmx-msg__badge{
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(var(--color1-rgb,255,165,0), .18);
  color: rgba(0,0,0,.78);
  font-weight: 800;
}

:dir(rtl) .tmx-msg__badge{
  right: auto;
  left: 10px;
}

.tmx-msg.is-new{
  border-color: rgba(var(--color1-rgb,255,165,0), .55);
}

.tmx-empty{
  text-align: center;
  padding: 16px 10px;
  color: rgba(0,0,0,.6);
}

.tmx-empty__icon{
  font-size: 20px;
  margin-bottom: 8px;
  opacity: .7;
}

.tmx-inbox-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tmx-inbox-list__item{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
}

.tmx-inbox-list__item.is-active{
  border-color: rgba(var(--color1-rgb,255,165,0), .55);
}

.tmx-inbox-list__email{
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmx-inbox-list__actions{
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.tmx-divider{
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 12px 0;
}

.tmx-muted{
  color: rgba(0,0,0,.55);
  font-size: 12px;
}

.tmx-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.1);
  background: rgba(0,0,0,.03);
}

.tmx-field{ margin-bottom: 10px; }
.tmx-label{
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(0,0,0,.65);
}

/* Toast */
.tmx-toast{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.85);
  color: #fff;
  margin-top: 10px;
  max-width: 420px;
}

.tmx-toast__msg{ font-size: 13px; }
.tmx-toast__close{
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.tmx-toast--success{ background: rgba(25,135,84,.92); }
.tmx-toast--error{ background: rgba(220,53,69,.92); }
.tmx-toast--info{ background: rgba(13,110,253,.92); }

/* Mobile */
@media (max-width: 575.98px){
  .tmx-inbox-app__top{ align-items: flex-start; }
  .tmx-btn{ width: 100%; }
  .tmx-actions .tmx-btn,
  .tmx-toolbar .tmx-btn,
  .tmx-toolbar .tmx-toggle,
  .tmx-toolbar .tmx-select,
  .tmx-toolbar .tmx-input{
    width: 100%;
  }
  .tmx-toolbar{ align-items: stretch; }
}
