/* ═══════════════════════════════════════════════════
   SentiMeter — history.css
   Riwayat Analisis Page Styles
   ═══════════════════════════════════════════════════ */

/* ── History Header Badge ── */
.hist-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--acc-d);
  color: var(--acc);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
  border: 1px solid var(--acc-d2);
}

/* ── History Header & Empty State ── */
.history-empty {
  text-align: center;
  padding: 100px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically if needed */
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Subtle glow effect for empty state */
.history-empty::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, var(--acc-d) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
}

.history-empty h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--tx1);
  letter-spacing: -0.4px;
  position: relative;
}

.history-empty p {
  color: var(--tx2);
  font-size: 13.5px;
  margin-bottom: 32px;
  max-width: 380px;
  line-height: 1.6;
  position: relative;
}

.empty-cta {
  min-width: 200px;
  position: relative;
  font-size: 13.5px;
}

/* ── Premium History Card ── */
.history-container {
  display: flex;
  flex-direction: column;
  gap: 24px; /* More compact gap */
}

.hist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r2); /* Neater radius */
  padding: 16px 20px; /* More compact padding */
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.hist-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--acc-d2);
}

.hist-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.hist-filename {
  font-size: 14.5px; /* Reduced font size */
  font-weight: 700;
  color: var(--tx1);
  font-size: 13.5px; /* Neater size */
  font-weight: 700;
  color: var(--tx1);
  margin-bottom: 2px;
  line-height: 1.2;
}

.hist-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px; /* Smaller meta */
  color: var(--tx3);
}

.hist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Visual Sentiment Bar ── */
.hist-visual {
  margin-top: 0px;
}

.hist-bar-outer {
  height: 6px; /* Slightly thinner */
  background: var(--bg-card2);
  border-radius: 100px;
  display: flex;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--border-s);
}

.hist-bar-segment {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hist-bar-segment.pos { background: var(--pos); }
.hist-bar-segment.neu { background: var(--neu); }
.hist-bar-segment.neg { background: var(--neg); }

/* ── Stats Row ── */
.hist-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 12px 16px; /* More compact stats area */
  background: var(--bg-card2);
  border-radius: var(--r2);
  border: 1px solid var(--border-s);
  margin-top: 2px;
}

.hist-stat-box {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.hist-stat-label {
  font-size: 10.5px; /* Tiny, elegant labels */
  color: var(--tx3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hist-stat-val {
  color: var(--tx1);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hist-stat-unit {
  font-size: 10px;
  font-weight: 500;
  color: var(--tx3);
}

.hist-stat-val.pos { color: var(--pos); }
.hist-stat-val.neg { color: var(--neg); }
.hist-stat-val.neu { color: var(--neu); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .history-header {
    padding: 24px 16px;
  }
  .hist-card {
    padding: 16px;
  }
  .hist-card-top {
    flex-direction: column;
    gap: 12px;
  }
  .hist-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hist-actions {
    width: 100%;
    justify-content: stretch;
    flex-direction: row; /* stack side-by-side but take full width */
    margin-top: 4px;
  }
  .hist-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .hist-stats {
    gap: 12px;
    padding: 12px;
    justify-content: flex-start;
  }
}
