/**
 * Email-Card Styles fuer Kerio-Tool-Results
 */

.email-list-card,
.email-detail-card {
  background: #ffffff;
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 12px;
  padding: 0;
  margin: 12px 0;
  color: #1f2937;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.email-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-weight: 600;
}

.email-list-icon {
  font-size: 20px;
}

.email-list-title {
  flex: 1;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.email-list-count {
  font-size: 13px;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 999px;
}

.email-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.email-item {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
  transition: background-color 0.15s;
}

.email-item:last-child {
  border-bottom: none;
}

.email-item:hover {
  background-color: #f8fafc;
}

.email-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.email-item-from {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-item-date {
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.email-item-subject {
  margin-top: 4px;
  font-size: 14px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-list-card--empty .email-list-header {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Detail Card */

.email-detail-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.email-detail-subject {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-word;
}

.email-detail-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  margin: 0;
  font-size: 13px;
}

.email-detail-meta dt {
  font-weight: 600;
  opacity: 0.85;
}

.email-detail-meta dd {
  margin: 0;
  word-break: break-word;
}

.email-detail-body {
  padding: 18px 20px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #1f2937;
  max-height: 480px;
  overflow-y: auto;
}

.email-detail-attachments {
  border-top: 1px solid #e5e7eb;
  padding: 12px 20px 16px;
  background: #f9fafb;
}

.email-detail-attachments-header {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.email-detail-attachments-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.email-detail-attachments-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed #e5e7eb;
}

.email-detail-attachments-list li:last-child {
  border-bottom: none;
}

.email-detail-attachment-name {
  font-weight: 500;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-detail-attachment-meta {
  color: #6b7280;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Chat-bubble container fuer Card-Messages */

.message--email-card {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  border-left: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: 720px !important;
  font-size: 14px !important;
  opacity: 1 !important;
  margin: 12px 0 !important;
}

@media (max-width: 600px) {
  .email-list-header {
    padding: 12px 14px;
  }
  .email-item {
    padding: 10px 14px;
  }
  .email-detail-header,
  .email-detail-body,
  .email-detail-attachments {
    padding-left: 14px;
    padding-right: 14px;
  }
  .email-detail-meta {
    grid-template-columns: max-content 1fr;
    font-size: 12px;
  }
}
