/**
 * SIC SAP Docs — ERD Interactive Hotspot & Drawer Stylesheet
 * File: assets/css/erd.css
 */

/* ========================================================= */
/* ERD CANVAS CONTAINER                                      */
/* ========================================================= */
.erd-canvas-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 1080px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  user-select: none;
  line-height: 0;
}

.erd-canvas-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================================= */
/* PULSING HOTSPOT PINS & PINS LAYER                         */
/* ========================================================= */
.erd-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.erd-pins-layer.pins-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.erd-pins-layer.pins-hidden .erd-hotspot-pin {
  pointer-events: none !important;
}

.erd-hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.5);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
}

.erd-hotspot-pin::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.4);
  animation: erd-pulse 2s infinite ease-out;
  z-index: -1;
}

.erd-hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.22);
  background: #0369a1;
}

/* Color Variants for Hotspot Pins */
.erd-hotspot-pin.pin-blue {
  background: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.55);
}
.erd-hotspot-pin.pin-blue::before {
  background: rgba(2, 132, 199, 0.4);
}
.erd-hotspot-pin.pin-blue:hover {
  background: #0369a1;
}

.erd-hotspot-pin.pin-red,
.erd-hotspot-pin.pin-danger {
  background: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.55) !important;
}
.erd-hotspot-pin.pin-red::before,
.erd-hotspot-pin.pin-danger::before {
  background: rgba(220, 38, 38, 0.45) !important;
}
.erd-hotspot-pin.pin-red:hover,
.erd-hotspot-pin.pin-danger:hover {
  background: #b91c1c !important;
}

.erd-hotspot-pin.pin-green,
.erd-hotspot-pin.pin-success {
  background: #059669;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.55);
}
.erd-hotspot-pin.pin-green::before,
.erd-hotspot-pin.pin-success::before {
  background: rgba(5, 150, 105, 0.4);
}
.erd-hotspot-pin.pin-green:hover,
.erd-hotspot-pin.pin-success:hover {
  background: #047857;
}

.erd-hotspot-pin.pin-amber,
.erd-hotspot-pin.pin-warning,
.erd-hotspot-pin.pin-yellow {
  background: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.55);
}
.erd-hotspot-pin.pin-amber::before,
.erd-hotspot-pin.pin-warning::before,
.erd-hotspot-pin.pin-yellow::before {
  background: rgba(217, 119, 6, 0.4);
}
.erd-hotspot-pin.pin-amber:hover,
.erd-hotspot-pin.pin-warning:hover,
.erd-hotspot-pin.pin-yellow:hover {
  background: #b45309;
}

.erd-hotspot-pin.pin-purple {
  background: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.55);
}
.erd-hotspot-pin.pin-purple::before {
  background: rgba(124, 58, 237, 0.4);
}
.erd-hotspot-pin.pin-purple:hover {
  background: #6d28d9;
}

@keyframes erd-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

.erd-pin-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}

/* ========================================================= */
/* HOVER TOOLTIP                                             */
/* ========================================================= */
.erd-hotspot-pin .erd-pin-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 30;
}

.erd-hotspot-pin .erd-pin-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
}

.erd-hotspot-pin:hover .erd-pin-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================= */
/* SLIDE DRAWER (TABLE DETAILS)                              */
/* ========================================================= */
.erd-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.erd-drawer-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.erd-drawer, .erd-slide-drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 520px;
  min-width: 440px;
  max-width: 95vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.25);
  z-index: 1100;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.erd-drawer.active, .erd-slide-drawer.active {
  transform: translateX(0) !important;
}

/* Left-Edge Resizer Handle for Slide Drawer */
.erd-drawer-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  margin-left: -7px;
  cursor: col-resize;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.erd-drawer-resizer-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.erd-drawer-resizer:hover .erd-drawer-resizer-line,
.erd-drawer-resizer.is-dragging .erd-drawer-resizer-line {
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.erd-drawer-resizer-grip {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 42px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
  opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.erd-drawer-resizer:hover .erd-drawer-resizer-grip,
.erd-drawer-resizer.is-dragging .erd-drawer-resizer-grip {
  opacity: 1;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  transform: scale(1.1);
}

/* Header Action Buttons */
.erd-drawer-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.erd-drawer-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.erd-drawer-header {
  padding: 16px 24px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.erd-drawer-title-group h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.erd-drawer-title-group p {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.erd-drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.erd-drawer-close:hover {
  color: #ffffff;
}

.erd-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Mini Action Buttons in Header */
.erd-drawer-mini-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

/* Compact Mode Toggle Bar */
.erd-drawer-compact-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.erd-drawer-compact-bar:hover {
  background: #e2e8f0;
  color: #0369a1;
}

.erd-drawer-table-wrapper {
  max-height: calc(100vh - 280px);
}

/* When header-collapsed is active (Mode Fokus Tabel) */
.erd-drawer.header-collapsed .erd-drawer-header {
  padding: 9px 16px !important;
}

.erd-drawer.header-collapsed .erd-drawer-subtitle {
  display: none !important;
}

.erd-drawer.header-collapsed .erd-drawer-action-nav {
  display: none !important;
}

.erd-drawer.header-collapsed .erd-drawer-mini-actions {
  display: flex !important;
}

.erd-drawer.header-collapsed .erd-drawer-compact-bar {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  padding: 4px 10px !important;
}

.erd-drawer.header-collapsed .erd-drawer-table-wrapper {
  max-height: calc(100vh - 165px) !important;
}

/* Tabs inside Drawer */
.erd-drawer-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
  gap: 8px;
}

.erd-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.erd-tab-btn:hover,
.erd-tab-btn.active {
  color: var(--sap-primary);
  border-bottom-color: var(--sap-primary);
}

/* Field Table in Drawer */
.erd-field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.erd-field-table th {
  text-align: left;
  background: #f8fafc;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
}

.erd-field-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.erd-field-table tr:hover td {
  background: #f8fafc;
}

.erd-key-pill {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* ========================================================= */
/* ERD PIN COLOR LEGEND                                      */
/* ========================================================= */
.erd-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.erd-legend-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.erd-legend-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.erd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #475569;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.erd-legend-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.erd-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.erd-legend-dot.dot-blue { background: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2); }
.erd-legend-dot.dot-green { background: #059669; box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2); }
.erd-legend-dot.dot-amber { background: #d97706; box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2); }
.erd-legend-dot.dot-purple { background: #7c3aed; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2); }
.erd-legend-dot.dot-red { background: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2); }

.erd-hotspot-pin {
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

/* ========================================================= */
/* STUDIO / BUILDER MODE STYLES                              */
/* ========================================================= */
.studio-canvas {
  cursor: crosshair;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
}

.studio-hint {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================= */
/* COMMUNITY DISCUSSION & FEEDBACK COMPONENT STYLES          */
/* ========================================================= */
.erd-discussion-wrapper {
  margin-top: 24px;
}

.erd-discussion-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.erd-discussion-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.erd-discussion-card.is-pinned {
  border-left: 4px solid #0284c7;
  background: #fbfdff;
}

.erd-discussion-card.cat-missing_table {
  border-left: 4px solid #10b981;
}

.erd-discussion-card.cat-relation_fix {
  border-left: 4px solid #f59e0b;
}

.erd-discussion-card.cat-question {
  border-left: 4px solid #0284c7;
}

.erd-discussion-card.cat-tips {
  border-left: 4px solid #8b5cf6;
}

.erd-discussion-card.cat-general {
  border-left: 4px solid #64748b;
}

.erd-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.erd-avatar-admin {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.erd-reply-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0284c7;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #334155;
}

.erd-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.erd-like-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0284c7;
}

.erd-like-btn.liked {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
  font-weight: 600;
}

/* Helpful / Unhelpful Feedback Voting Group */
.erd-feedback-voting {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 6px;
  transition: all 0.15s ease;
}

.erd-feedback-voting:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.erd-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.erd-vote-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.erd-vote-btn.voted-helpful {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 600;
}

.erd-vote-btn.voted-helpful i {
  color: #059669;
}

.erd-vote-btn.voted-unhelpful {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  font-weight: 600;
}

.erd-vote-btn.voted-unhelpful i {
  color: #dc2626;
}

/* ERD Drawer Field Type Badge */
.erd-type-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap !important;
  display: inline-block;
  line-height: 1.4;
}

/* ========================================================== */
/* LEETCODE STYLE COMMUNITY DISCUSSION STYLES                 */
/* ========================================================== */
.lc-discussion-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lc-top-reactions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 13px;
}

.lc-reaction-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.lc-reaction-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.lc-vote-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px 8px;
}

.lc-vote-arrow {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lc-vote-arrow:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.lc-vote-arrow.voted-up {
  color: #0284c7;
  background: #f0f9ff;
}

.lc-vote-arrow.voted-down {
  color: #ef4444;
  background: #fef2f2;
}

/* Discussion Section Title & Sort Row */
.lc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.lc-title-heading {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lc-sort-select {
  font-size: 12.5px;
  padding: 5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.lc-sort-select:focus {
  border-color: #0284c7;
}

/* Input Form Container (Type comment here...) */
.lc-editor-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  transition: all 0.2s ease;
  margin-bottom: 24px;
  overflow: hidden;
}

.lc-editor-card:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.lc-editor-textarea {
  width: 100%;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.55;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  background: transparent;
}

.lc-editor-textarea::placeholder {
  color: #94a3b8;
}

.lc-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #fbfcfd;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-toolbar-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lc-tool-btn {
  background: none;
  border: none;
  color: #64748b;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lc-tool-btn:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.lc-submit-btn {
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lc-submit-btn:hover {
  background: #0369a1;
}

.lc-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* User Identity Info Strip */
.lc-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #334155;
}

.lc-config-btn {
  background: none;
  border: none;
  color: #0284c7;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Category Filter Tabs (Minimalist) */
.lc-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.lc-pill-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lc-pill-btn:hover {
  border-color: #cbd5e1;
  color: #0284c7;
}

.lc-pill-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* Comment Item Thread */
.lc-comment-thread {
  padding: 18px 0;
  border-bottom: 1px solid #f1f5f9;
}

.lc-comment-thread:last-child {
  border-bottom: none;
}

.lc-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.lc-author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.lc-avatar.is-admin {
  background: #0284c7;
}

.lc-author-info {
  display: flex;
  flex-direction: column;
}

.lc-author-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lc-author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

.lc-verified-dot {
  color: #0284c7;
  font-size: 11px;
}

.lc-role-tag {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.lc-comment-date {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.lc-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lc-table-badge {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lc-table-badge:hover {
  background: #e0f2fe;
}

.lc-category-badge {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.lc-comment-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  margin: 6px 0 10px 0;
  word-break: break-word;
}

.lc-link {
  color: #0284c7;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.lc-link:hover {
  color: #0369a1;
}

.lc-inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.lc-code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.lc-mention {
  color: #0284c7;
  font-weight: 600;
  background: #f0f9ff;
  padding: 1px 4px;
  border-radius: 3px;
}

.lc-read-more-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lc-read-more-btn:hover {
  color: #0284c7;
}

/* Actions Row Under Comment */
.lc-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.lc-action-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-action-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lc-action-btn:hover {
  background: #f8fafc;
  color: #0284c7;
}

.lc-action-btn.active {
  color: #0284c7;
}

/* Nested Replies Container with interactive hover thread line */
.lc-replies-container {
  margin-left: 20px;
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid #e2e8f0;
  transition: border-color 0.2s ease;
}

.lc-replies-container:hover {
  border-left-color: #0284c7;
}

.lc-nested-reply {
  padding: 12px 6px;
  border-bottom: 1px dashed #f1f5f9;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.lc-nested-reply:hover {
  background: #f8fafc;
}

.lc-nested-reply:last-child {
  border-bottom: none;
}

.lc-show-replies-toggle {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.lc-show-replies-toggle:hover {
  color: #0284c7;
  background: #f0f9ff;
}

/* Pagination Bar (< 1 2 >) */
.lc-pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.lc-page-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.lc-page-nav-btn:hover:not(:disabled) {
  border-color: #cbd5e1;
  color: #0284c7;
  background: #f0f9ff;
}

.lc-page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lc-page-num-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.lc-page-num-btn:hover {
  border-color: #cbd5e1;
  background: #f0f9ff;
  color: #0284c7;
}

.lc-page-num-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  font-weight: 700;
}

/* ========================================================= */
/* ERD HEADER & CONTROLS DESKTOP & MOBILE                    */
/* ========================================================= */
.erd-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.erd-control-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.erd-pin-hint-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 5px 10px;
  border-radius: 6px;
}

/* ========================================================= */
/* ERD & DISCUSSION MOBILE RESPONSIVENESS                    */
/* ========================================================= */
@media (max-width: 640px) {
  .erd-top-controls {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-top: 6px !important;
  }

  .erd-control-buttons {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .erd-control-buttons > * {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 11.5px !important;
    padding: 6px 8px !important;
  }

  .erd-pin-hint-box {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 11px !important;
    justify-content: center !important;
  }

  .erd-page-title {
    font-size: 16px !important;
  }

  /* ERD Slide Drawer on Mobile (Full Screen & Touch-Friendly) */
  .erd-drawer, .erd-slide-drawer {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    box-shadow: none !important;
  }

  .erd-drawer-resizer {
    display: none !important;
  }

  #drawerToggleWideBtn {
    display: none !important;
  }

  .erd-drawer-body {
    padding: 10px 14px !important;
  }

  .erd-drawer-table-wrapper {
    max-height: calc(100vh - 310px);
    max-height: calc(100dvh - 310px);
  }

  .erd-drawer.header-collapsed .erd-drawer-table-wrapper {
    max-height: calc(100vh - 150px) !important;
    max-height: calc(100dvh - 150px) !important;
  }

  /* ERD Canvas & Card Padding on Mobile */
  .erd-canvas-card {
    padding: 10px 4px !important;
  }

  .erd-canvas-wrapper {
    min-width: 650px; /* Memastikan diagram tetap tajam & nyaman di-pan horizontal di HP */
  }

  .erd-legend-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
  }

  .erd-legend-items {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    padding-bottom: 2px !important;
    gap: 6px !important;
  }

  .erd-legend-items::-webkit-scrollbar {
    display: none !important;
  }

  .erd-legend-item {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  /* Discussion Component on Mobile */
  .lc-discussion-box {
    padding: 16px 12px !important;
  }

  .lc-top-reactions {
    gap: 10px !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }

  .lc-header-row {
    margin-bottom: 12px !important;
    gap: 8px !important;
  }

  .lc-sort-select {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  .lc-editor-card {
    margin-bottom: 16px !important;
  }

  .lc-editor-textarea {
    padding: 10px 12px !important;
    font-size: 13px !important;
    min-height: 70px !important;
  }

  .lc-editor-toolbar {
    padding: 6px 10px !important;
  }

  .lc-filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    padding-bottom: 4px !important;
    margin-bottom: 8px !important;
    gap: 6px !important;
  }

  .lc-filter-pills::-webkit-scrollbar {
    display: none !important;
  }

  .lc-pill-btn {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  .lc-search-box-wrap {
    width: 100% !important;
  }

  .lc-search-box-wrap input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .lc-reaction-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .lc-comment-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .lc-replies-stream {
    margin-left: 10px !important;
    padding-left: 10px !important;
  }

  .lc-reply-editor-box {
    margin-left: 10px !important;
  }

  .lc-comment-box-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lc-submit-btn {
    width: 100%;
    justify-content: center;
  }

  .studio-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}



