/* MailCatcher NG UI Styles - Complete stylesheet
   This is the single source of truth for all MailCatcher NG UI styling.
   Extracted from index.erb for better maintainability.
   All changes should be made here for modern, responsive design.
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  border-bottom: 1px solid #e8eaed;
  padding: 20px 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

header > div:first-child {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

header h1 a {
  color: #2196F3;
  text-decoration: none;
  transition: color 0.2s;
}

header h1 a:hover {
  color: #1976D2;
}

.version-badge {
  font-size: 11px;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.version-notification {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-left: 8px;
  border: none;
}

.version-notification.update-available {
  background: #e3f2fd;
  color: #1976D2;
}

.version-notification.update-available:hover {
  background: #bbdefb;
  color: #1565c0;
}

.version-notification.update-available:active {
  transform: scale(0.98);
}

.version-notification.latest-version {
  background: #e8f5e9;
  color: #2e7d32;
  cursor: default;
  pointer-events: none;
}

.version-notification svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.header-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  flex: 0 1 440px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 9px 32px 9px 36px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  cursor: pointer;
  display: none;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s;
}

.search-clear:hover {
  color: #666;
}

.search-box input:not(:placeholder-shown) ~ .search-clear {
  display: block;
}

/* Hide browser's native search clear button */
.search-box input::-webkit-search-cancel-button {
  display: none;
}

.attachment-filter {
  display: flex;
  gap: 4px;
  align-items: center;
}

.attachment-filter select {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.2s;
}

.attachment-filter select:hover {
  border-color: #2196F3;
}

.attachment-filter select:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.header-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.status-badge .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34a853;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-badge.disconnected .indicator {
  background: #ea4335;
  animation: none;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #2196F3;
  color: #ffffff;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #1976D2;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.email-count {
  font-size: 13px;
  color: #5f5f5f;
  padding: 8px 12px;
  background: #f9f9f9;
  border-radius: 6px;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
}

#messages {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-bottom: 1px solid #e8eaed;
  overflow: hidden;
  min-height: 150px;
}

#resizer {
  width: 100%;
  height: 8px;
  background: #e8eaed;
  cursor: row-resize;
  flex-shrink: 0;
  transition: background 0.2s;
  position: relative;
  z-index: 5;
  user-select: none;
}

#resizer:hover {
  background: #2196F3;
}

#resizer .ruler {
  display: none;
}

#messages table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#messages thead {
  background: #f9f9f9;
  border-bottom: 1px solid #e8eaed;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  display: flex;
  width: 100%;
}

#messages thead tr {
  display: flex;
  width: 100%;
}

#messages th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #5f5f5f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

#messages th.col-attachments {
  flex: 0 0 40px;
  padding: 12px 8px;
  text-align: center;
}

#messages th.col-bimi {
  flex: 0 0 40px;
  padding: 12px 8px;
  text-align: center;
}

#messages th.sortable {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s, color 0.2s;
}

#messages th.sortable:hover {
  background-color: #f0f0f0;
  color: #3f3f3f;
}

#messages th.sortable .sort-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.2s;
}

#messages th.sortable:hover .sort-icon {
  opacity: 0.6;
}

#messages th.sortable.active .sort-icon {
  opacity: 1;
  color: #2196F3;
}

#messages tbody {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

#messages tbody tr {
  display: flex;
  width: 100%;
  flex-shrink: 0;
}

#messages tr {
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.15s;
}

#messages tr:hover {
  background-color: #f9f9f9;
}

#messages tr.selected {
  background-color: #f0f4ff;
}

#messages tr.selected:hover {
  background-color: #e6ecff;
}

#messages td {
  padding: 12px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  text-align: left;
  flex: 1;
}

#messages td.blank {
  color: #999;
  font-style: italic;
}

#messages td.col-attachments {
  flex: 0 0 40px;
  padding: 12px 8px;
  text-align: center;
  font-size: 16px;
  overflow: visible;
  white-space: normal;
}

#messages td.col-bimi {
  flex: 0 0 40px;
  padding: 12px 8px;
  text-align: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

#messages .bimi-placeholder-icon {
  width: 24px;
  height: 24px;
  color: #ccc;
  flex-shrink: 0;
}

#messages .bimi-image {
  max-width: 32px;
  max-height: 32px;
  flex-shrink: 0;
}

#messages td.subject-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 16px;
  overflow: hidden;
}

#messages .subject-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
}

#messages .subject-text strong {
  font-weight: 600;
  color: #1a1a1a;
}

#messages .preview-text {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
}

#messages td.from-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 16px;
  overflow: hidden;
}

#messages .sender-text-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

#messages .sender-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
}

#messages .sender-name strong {
  font-weight: 600;
  color: #1a1a1a;
}

#messages .sender-email {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
}

#messages td.to-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 16px;
  overflow: hidden;
}

#messages td.to-cell strong {
  font-weight: 600;
  color: #1a1a1a;
}

#messages .from-content {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

#messages .attachment-icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-right: -2px;
}

#messages .bimi-icon {
  flex-shrink: 0;
  font-size: 16px;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 4px;
}

#messages .sender-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#message {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}

#message > header {
  border-bottom: 1px solid #e8eaed;
  padding: 12px 28px;
  background: #f9f9f9;
  overflow-y: auto;
  max-height: 40%;
  flex-shrink: 0;
}

.metadata {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
}

.metadata-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metadata-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
}

.metadata dt {
  font-weight: 600;
  color: #5f5f5f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.metadata dd {
  color: #1a1a1a;
  font-size: 11px;
  word-break: break-word;
  line-height: 1.2;
}

.attachments-column {
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.attachments-column.visible {
  display: flex;
}

.attachments-header {
  font-weight: 600;
  color: #5f5f5f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  flex-shrink: 0;
}

.attachments-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
  min-width: 0;
}

.attachments-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 8px;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 11px;
}

.attachments-list a {
  color: #2196F3;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.attachments-list a:hover {
  text-decoration: underline;
}

.attachment-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.attachment-size {
  color: #666;
  font-size: 10px;
}

.attachment-type {
  color: #999;
  font-size: 9px;
}

#message > header {
  display: grid;
  grid-template-columns: auto minmax(300px, 0.6fr) 280px;
  gap: 20px;
  align-items: start;
}

.views-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  order: -1;
  align-items: flex-start;
}

.views {
  display: flex;
  gap: 16px;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.views ul {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-direction: row;
  margin: 0;
}

.views .views-tabs {
  flex: 0 0 auto;
}

.views .views-actions {
  flex: 1 0 auto;
  justify-content: flex-end;
  gap: 10px;
}

.views .views-actions li {
  display: flex;
  align-items: center;
}

.views-container .download-btn {
  padding: 6px 10px;
  font-size: 11px;
}

.views .format.tab {
  display: inline-block;
}

.views .format.tab a {
  padding: 8px 0 6px 0;
  border-radius: 0;
  background: transparent;
  color: #666;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-block;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  margin-right: 16px;
  outline: none;
}

.views .format.tab a:hover {
  color: #1a1a1a;
  text-decoration: none;
}

.views .format.tab a:focus {
  outline: none;
}

.views .format.tab.selected a,
.views .format.tab a.selected {
  color: #2196F3 !important;
  border-bottom: 3px solid #2196F3;
  text-decoration: none !important;
}

.views .format.tab.selected a:hover,
.views .format.tab a.selected:hover {
  color: #1976D2;
  border-bottom-color: #1976D2;
}

.download-btn {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.download-btn:hover {
  background: #f8f8f8;
  border-color: #d0d0d0;
}

.content-type-notice {
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fdecea;
  color: #c62828;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #f5c6cb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: auto;
  white-space: nowrap;
  min-height: 30px;
  line-height: 1;
  box-sizing: border-box;
}

.download-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
}

/* Accessibility Ratings */
.accessibility-ratings {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-top: 8px;
}

.accessibility-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}

.score-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.score-value {
  font-size: 18px;
  font-weight: 700;
  color: #2196F3;
}

.score-unit {
  font-size: 11px;
  color: #999;
}

.accessibility-breakdown {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex: 1;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.breakdown-label {
  color: #999;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breakdown-value {
  color: #2196F3;
  font-weight: 700;
  font-size: 13px;
}

.accessibility-score-btn,
.accessibility-metric-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  display: inline;
  transition: opacity 0.2s;
}

.accessibility-score-btn:hover,
.accessibility-metric-btn:hover {
  opacity: 0.7;
}

.accessibility-score-btn:focus,
.accessibility-metric-btn:focus {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Accessibility Tooltip Styles */
.accessibility-tooltip {
  font-size: 12px;
  color: #333;
}

.accessibility-tooltip h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.accessibility-tooltip h5 {
  margin: 8px 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
}

.tooltip-stats {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.tooltip-stats > div {
  margin: 4px 0;
  font-size: 12px;
}

.tooltip-section {
  margin-top: 8px;
}

.tooltip-issues,
.tooltip-tips {
  margin: 6px 0 0 0;
  padding-left: 18px;
  list-style: none;
}

.tooltip-issues li,
.tooltip-tips li {
  margin: 4px 0;
  font-size: 11px;
  color: #555;
  line-height: 1.4;
  word-break: break-word;
}

.accessibility-tooltip ul:not(.tooltip-issues):not(.tooltip-tips) {
  margin: 6px 0 0 0;
  padding-left: 18px;
  list-style: disc;
}

.accessibility-tooltip li {
  margin: 4px 0;
  font-size: 11px;
}

#message iframe.body {
  flex: 1;
  border: none;
  background: #ffffff;
}

#message iframe.body[src*=".source"] {
  background: #f5f5f5;
}

#noscript-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#noscript {
  text-align: center;
  font-size: 18px;
  color: #333;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* Email Signature Info Button */
.signature-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: #e3f2fd;
  color: #1976D2;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.signature-info-btn:hover {
  background: #bbdefb;
  color: #1565c0;
  transform: scale(1.05);
}

.signature-info-btn:active {
  transform: scale(0.95);
}

.signature-info-btn svg {
  width: 18px;
  height: 18px;
}

.copy-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: #e3f2fd;
  color: #1976D2;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.copy-source-btn:hover {
  background: #bbdefb;
  color: #1565c0;
  transform: scale(1.05);
}

.copy-source-btn:active {
  transform: scale(0.95);
}

.copy-source-btn svg {
  width: 18px;
  height: 18px;
}

/* SMTP Transcript Styles */
#message iframe.body[src*=".transcript"] {
  background: #ffffff;
}

.transcript-container {
  padding: 20px 28px;
  font-family: 'Monaco', 'Courier New', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #ffffff;
}

.transcript-header {
  background: #f9f9f9;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.transcript-header h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5f5f5f;
  margin: 0 0 12px 0;
}

.transcript-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.transcript-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transcript-info-label {
  font-size: 10px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transcript-info-value {
  font-size: 12px;
  color: #1a1a1a;
  font-family: 'Monaco', 'Courier New', monospace;
  word-break: break-all;
}

.transcript-info-value.success {
  color: #34a853;
}

.transcript-search-box {
  margin-bottom: 16px;
  position: relative;
}

.transcript-search-box input {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto';
  background: #ffffff;
}

.transcript-search-box input:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.transcript-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  display: none;
  font-size: 18px;
  padding: 0;
  width: 20px;
  height: 20px;
  transition: color 0.2s;
}

.transcript-search-clear:hover {
  color: #666;
}

.transcript-search-box input:not(:placeholder-shown) ~ .transcript-search-clear {
  display: block;
}

.transcript-log {
  background: #f9f9f9;
  border: 1px solid #e8eaed;
  border-radius: 6px;
  padding: 16px;
  max-height: 600px;
  overflow-y: auto;
  font-family: 'Monaco', 'Courier New', monospace;
}

.transcript-entry {
  display: flex;
  gap: 12px;
  margin: 6px 0;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}

.transcript-entry:last-child {
  border-bottom: none;
}

.transcript-entry.hidden {
  display: none;
}

.transcript-time {
  color: #999;
  min-width: 100px;
  flex-shrink: 0;
  font-size: 11px;
}

.transcript-type {
  min-width: 80px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.transcript-type.connection { color: #9c27b0; }
.transcript-type.command { color: #2196F3; }
.transcript-type.response { color: #34a853; }
.transcript-type.tls { color: #ff9800; }
.transcript-type.data { color: #607d8b; }
.transcript-type.error { color: #f44336; }

.transcript-direction {
  min-width: 60px;
  flex-shrink: 0;
  font-size: 11px;
  color: #666;
}

.transcript-direction.client::before {
  content: '→ ';
  color: #2196F3;
}

.transcript-direction.server::before {
  content: '← ';
  color: #34a853;
}

.transcript-message {
  flex: 1;
  color: #1a1a1a;
  font-size: 12px;
  word-break: break-word;
  white-space: pre-wrap;
}

.transcript-message.error {
  color: #f44336;
  font-weight: 500;
}

.transcript-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* Encryption/Signature Tooltip Styling */
.encryption-tooltip-content {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 400px;
}

.encryption-tooltip-content h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5f5f5f;
  margin: 0 0 8px 0;
  padding-top: 8px;
}

.encryption-tooltip-content h3:first-child {
  padding-top: 0;
  margin-top: 0;
}

.encryption-info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.encryption-info-item:last-child {
  margin-bottom: 0;
}

.encryption-info-label {
  font-weight: 500;
  color: #333;
  min-width: 100px;
}

.encryption-info-value {
  color: #666;
  flex-grow: 1;
  word-break: break-all;
}

.encryption-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-top: 8px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  transition: all 0.2s;
}

.encryption-copy-button:hover {
  background: #efefef;
  border-color: #d0d0d0;
}

.encryption-copy-button:active {
  transform: scale(0.98);
}

.encryption-copy-button svg {
  width: 14px;
  height: 14px;
}

.encryption-copy-button.copied {
  background: #c8e6c9;
  border-color: #4caf50;
  color: #2e7d32;
}

.encryption-copy-button.copied svg {
  stroke: #2e7d32;
}

.encryption-no-data {
  color: #999;
  font-size: 12px;
}

/* Tippy tooltip customization */
.tippy-box[data-theme~='light'] {
  background-color: #ffffff;
  border: 1px solid #e8eaed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  color: #1a1a1a;
}

.tippy-box[data-theme~='light'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #e8eaed;
}

.tippy-box[data-theme~='light'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: #e8eaed;
}

.tippy-box[data-theme~='light'][data-placement^='left'] > .tippy-arrow::before {
  border-left-color: #e8eaed;
}

.tippy-box[data-theme~='light'][data-placement^='right'] > .tippy-arrow::before {
  border-right-color: #e8eaed;
}

.signature-tooltip-content {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 360px;
}

.signature-tooltip-content h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5f5f5f;
  margin: 0 0 8px 0;
  padding-top: 8px;
}

.signature-tooltip-content h3:first-child {
  padding-top: 0;
  margin-top: 0;
}

.signature-tooltip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.signature-tooltip-item:last-child {
  margin-bottom: 0;
}

.signature-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.signature-status-badge.pass {
  background: #c8e6c9;
  color: #2e7d32;
}

.signature-status-badge.fail {
  background: #ffcdd2;
  color: #c62828;
}

.signature-status-badge.neutral {
  background: #f5f5f5;
  color: #666;
}

.signature-status-badge::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

/* Syntax highlighting for HTML source */
pre {
  margin: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', 'Monaco', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
}

code {
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: #1a1a1a;
}

/* Override highlight.js default styles for light theme compatibility */
.hljs {
  background: #ffffff;
  color: #1a1a1a;
}

.hljs-tag {
  color: #2196F3;
}

.hljs-attr {
  color: #2196F3;
}

.hljs-string {
  color: #34a853;
}

.hljs-number {
  color: #ea4335;
}

.hljs-literal {
  color: #ea4335;
}
