/* ----------------------------------------
   Components CSS — supplements Phantom (main.css)
   Only includes classes Phantom doesn't provide:
   pagination, spinners, badges, events timeline,
   charts, timestamps, tooltips, expandable cards
   ---------------------------------------- */

/* Pagination (inside tfoot) */
#wrapper > #main > .inner {
  max-width: 54em;
}



#menu > ul > li > a,
#menu > .row ul > li > a {
  font-size: 1.1em;
  font-weight: 700;
}

#menu ul ul {
  padding-left: 1em;
  margin-top: 0;
  margin-bottom: 0.5em;
}

#menu ul ul li a {
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.8;
  padding: 0.3em 0;
}

.modern-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em 0;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-info {
  font-size: 0.9em;
  color: #999;
  font-weight: 400;
}

.pagination-placeholder {
  min-width: 80px;
}

/* Loading Spinner */
.table-loading-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #999;
}

.modern-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #65b3e6;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Empty State */
.table-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 1.5em;
  color: #999;
  text-align: center;
}

.table-empty-state .placeholder {
  font-size: 1.1em;
  font-weight: 500;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.badge-new {
  background: #e7ffd4;
  color: #3c763d;
  border: 1px solid currentColor;
}

/* Events Timeline */
table.list.events {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: block;
}

table.list.events thead {
  display: none;
}

table.list.events tbody {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 24px;
}

table.list.events tbody::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: #e5e7eb;
  z-index: 0;
}

table.list.events tr {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 16px;
  position: relative;
  transition: box-shadow 0.2s;
}

table.list.events tr:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

table.list.events td {
  border: none !important;
  padding: 4px 0 !important;
}

table.list.events td:nth-child(2) {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

table.list.events .circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #65b3e6;
  position: absolute;
  left: -20px;
  top: 24px;
  z-index: 1;
  border: 2px solid #fff;
}

table.list.events .exception .circle { background: #ef4444; }
table.list.events .unhandled .circle { background: #f59e0b; }
table.list.events .unauthorized .circle { background: #ec4899; }

table.list.events td.details {
  font-size: 0.9em;
  color: #666;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 12px !important;
  margin-top: 8px;
}

table.list.events td.details .inline {
  display: inline-block;
  margin-right: 8px;
}

table.list.events td:first-child {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #999;
  font-size: 0.85em;
}

/* Chart Container */
.chart-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 24px;
  margin: 16px 0;
}

/* Timestamp */
.relative-timestamp {
  display: inline-block;
  font-weight: 500;
  color: #999;
  border-bottom: 1px dotted #e5e7eb;
  cursor: help;
}

/* Tooltip */
.modern-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.modern-tooltip-popover {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 8px 12px;
  z-index: 50;
  white-space: nowrap;
  font-size: 0.8em;
  font-weight: 500;
  transition: all 0.2s;
}

.modern-tooltip-wrapper:hover .modern-tooltip-popover {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.modern-tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Expandable Cards (Long Message) */
.modern-longmessage {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.modern-longmessage-content {
  padding: 12px 16px;
  background: #f7f7f7;
  font-family: monospace;
  font-size: 0.85em;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modern-longmessage-content pre {
  margin: 0;
}

.modern-longmessage-toggle {
  width: 100%;
  background: #fff;
  border: none;
  border-top: 1px solid #e5e7eb;
  padding: 8px;
  color: #65b3e6;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modern-longmessage-toggle:hover {
  background: #f9fafb;
}
