@font-face {
  font-family: "MyFont";
  src: url("ms_sans_serif.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

.list-col {
  display: flex;
  font-family: "MyFont", sans-serif;
  align-items: center;
  padding: 0 4px;
  height: 20px;
  border-right: 1px solid var(--win-shadow-dark);
  font-size: var(--font-size-ui);
  cursor: pointer;
  background: var(--win-face);
  font-weight: normal;
  user-select: none;
  border-bottom: 2px solid var(--win-shadow-dark);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-col:hover {
  background: var(--win-highlight-dim);
}

.list-col:active {
  background: var(--win-face-dark);
  border-top: 2px solid var(--win-shadow-darker);
}

.col-status { width: 18px; min-width: 18px; flex-shrink: 0; }
.col-from { width: 160px; min-width: 80px; }
.col-subject { flex: 1; min-width: 100px; }
.col-received { width: 130px; min-width: 80px; flex-shrink: 0; border-right: none; }

.sort-arrow {
  margin-left: 4px;
  font-size: 8px;
  opacity: 0.5;
}

.sort-arrow.active {
  opacity: 1;
}

.email-row {
  display: flex;
  align-items: center;
  height: 18px;
  cursor: default;
  border-bottom: 1px solid transparent;
}

.email-row:hover {
  background: #ffffff;
  color: #000000;
}

.email-row.selected {
  background: var(--win-selected-bg);
  color: var(--win-selected-text);
}

.email-row:hover .email-cell-from,
.email-row:hover .email-cell-subject,
.email-row:hover .email-cell-received {
  color: #000000;
}

.email-row.unread .email-cell-from,
.email-row.unread .email-cell-subject {
  font-weight: bold;
}

.email-cell {
  padding: 0 4px;
  font-size: var(--font-size-ui);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 18px;
  display: flex;
  align-items: center;
}

.email-cell-status {
  width: 18px;
  min-width: 18px;
  flex-shrink: 0;
  justify-content: center;
  padding: 0;
}

.email-cell-from { width: 160px; min-width: 80px; }
.email-cell-subject { flex: 1; min-width: 100px; }
.email-cell-received { width: 130px; min-width: 80px; flex-shrink: 0; }

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--win-title-active-start);
  flex-shrink: 0;
}

.email-row.selected .unread-dot {
  background: var(--win-title-text);
}

#preview-header {
  padding: 4px 8px;
  border-bottom: 1px solid var(--win-shadow-dark);
  background: var(--win-face);
  flex-shrink: 0;
}

.preview-label {
  font-weight: bold;
  font-size: var(--font-size-ui);
  margin-right: 6px;
  color: var(--win-text);
}

#preview-from-row,
#preview-date-row,
#preview-to-row,
#preview-subject-row {
  display: flex;
  align-items: baseline;
  min-height: 17px;
  line-height: 1.4;
}

#preview-from,
#preview-date,
#preview-to,
#preview-subject {
  font-size: var(--font-size-ui);
  word-break: break-all;
}

#preview-subject {
  font-weight: bold;
}

#preview-body {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  color: var(--win-text);
  background: var(--win-input-bg);
  white-space: pre-wrap;
  word-break: break-word;
}

#preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--win-input-bg);
  pointer-events: none;
}

#preview-pane {
  position: relative;
}

#preview-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}

.oe-logo-big {
  width: 48px;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='2' y='8' width='44' height='32' fill='%23ffd700' stroke='%23404040' stroke-width='2'/%3E%3Cpath d='M2 14 L24 28 L46 14' stroke='%23404040' stroke-width='2' fill='none'/%3E%3Ccircle cx='36' cy='14' r='10' fill='%23000080'/%3E%3Cline x1='36' y1='8' x2='36' y2='20' stroke='white' stroke-width='2'/%3E%3Cline x1='30' y1='14' x2='42' y2='14' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

#preview-empty-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--win-title-active-start);
}

#preview-empty-sub {
  font-size: 11px;
  color: var(--win-shadow-dark);
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 8px;
  border-top: 1px solid var(--win-shadow-dark);
  background: var(--win-face);
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-style: solid;
  border-width: 2px;
  border-color: var(--win-highlight) var(--win-shadow-darker) var(--win-shadow-darker) var(--win-highlight);
  font-size: var(--font-size-ui);
  cursor: pointer;
  background: var(--win-face);
}

.attachment-item:hover {
  background: var(--win-highlight-dim);
}

.html-preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}