/* ============================ Emails Page Layout Start ============================ */
.emails-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.emails-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.emails-toolbar h1 {
  margin: 0;
  color: var(--dark4txt);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
}

.emails-toolbar h1 .emails-count {
  font-family: var(--font-body);
  font-size: 14px;
}

/* ============================ Emails Page Layout End ============================ */


/* ============================ Emails Table Start ============================ */
.emails-table-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}

.emails-table-shell::-webkit-scrollbar {
  display: none;
}

.emails-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px 2px;
}

.emails-table thead.emails-table-head th {
  padding: 12px 24px;
  color: var(--dark4txt);
  background: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  /* Fill the 2px column gap between thead cells with the same white so the
     header reads as one continuous pill while tbody rows keep their gap. */
  box-shadow: 2px 0 0 0 var(--white);
}

.emails-table thead.emails-table-head th:first-child {
  width: 80px;
  text-align: center;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.emails-table thead.emails-table-head th:last-child {
  width: 48px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.emails-table-gap td {
  height: 10px;
  padding: 0;
  background: transparent !important;
  border-radius: 0 !important;
}

.emails-row td {
  padding: 14px 24px;
  color: var(--dark4txt);
  background: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  vertical-align: middle;
}

.emails-row.is-alt td {
  background: rgba(255, 255, 255, 0.3);
}

.emails-row:hover td {
  background: var(--white);
}

.emails-row td:first-child {
  width: 80px;
  text-align: center;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.emails-row td:last-child {
  width: 48px;
  text-align: center;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.emails-row .emails-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}


.emails-delete svg {
  width: 22px;
  height: 22px;
}

.emails-delete svg path:hover {
  fill: var(--accent-green);
}

/* Small info block inside the delete confirm modal — ID + email row pair. */
.emails-delete-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.emails-delete-info-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.emails-delete-info-row dt {
  flex: 0 0 80px;
  color: var(--grey4txt);
}

.emails-delete-info-row dd {
  margin: 0;
  color: var(--dark4txt);
  font-weight: 600;
  word-break: break-word;
}

/* ============================ Emails Table End ============================ */


/* ============================ Emails Responsive Start ============================ */
@media (max-width: 768px) {
  .emails-toolbar h1 {
    font-size: 18px;
  }

  .emails-table thead.emails-table-head,
  .emails-table-gap {
    display: none;
  }

  .emails-table,
  .emails-table tbody {
    display: block;
    width: 100%;
  }

  .emails-row {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) 48px;
    gap: 2px;
    margin-bottom: 8px;
    background: transparent;
  }

  .emails-row td {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6) !important;
    border: 0;
    width: auto;
  }

  .emails-row.is-alt td {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .emails-row:hover td {
    background: var(--white) !important;
  }

  /* Round outer corners only — gap rows in the middle stay square. */
  .emails-row td:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    width: 56px;
  }

  .emails-row td:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    width: 48px;
  }

  .emails-row td:nth-child(2) {
    word-break: break-word;
  }
}

/* ============================ Emails Responsive End ============================ */
