/* ==========================================================================
   System Information Dropdown & Hover Card Styles
   ========================================================================== */

/* Embedded inside user profile dropdown */
.system-info-dropdown-content {
  cursor: default;
  user-select: text;
  background-color: #fafbfc;
  border-radius: 6px;
}

.system-info-dropdown {
  display: inline-flex;
  align-items: center;
}

/* Invisible bridge to prevent hover flickering when moving cursor to card */
.system-info-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  height: 10px;
  width: 100%;
}

/* Information Icon Button (Flat & Clean, no white glow) */
.btn-system-info {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #1a3826;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: none !important;
  outline: none;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.btn-system-info:hover,
.btn-system-info:focus,
.system-info-dropdown.show .btn-system-info {
  background: transparent;
  color: #000000;
  opacity: 0.75;
  transform: scale(1.12);
  box-shadow: none !important;
  outline: none;
}

/* Floating Card Container */
.system-info-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1050;
  min-width: 250px;
  max-width: 290px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  overflow: hidden;
}

.system-info-dropdown:hover .system-info-card,
.system-info-dropdown.show .system-info-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Card Header */
.system-info-header {
  background: #f8fafc;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-info-title {
  font-size: 0.85rem;
  color: #1a202c;
}

/* Card Body */
.system-info-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.system-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  line-height: 1.4;
}

.system-info-label {
  color: #64748b;
  display: inline-flex;
  align-items: center;
}

.system-info-value {
  color: #1e293b;
  text-align: right;
}

.system-info-detail-row {
  flex-direction: column;
  align-items: flex-start;
  padding-top: 4px;
  border-top: 1px dashed #e2e8f0;
  margin-top: 3px;
}

.system-info-detail-row .system-info-value {
  text-align: left;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Environment Badges */
.env-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.env-badge.env-production {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.env-badge.env-test {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.env-badge.env-local {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Redis Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.status-pill.online {
  background-color: #dcfce7;
  color: #15803d;
}

.status-pill.inmemory {
  background-color: #fef3c7;
  color: #b45309;
}

.status-pill.offline {
  background-color: #fee2e2;
  color: #b91c1c;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  display: inline-block;
}

.status-dot.online {
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: pulse-green 2s infinite;
}

.status-dot.inmemory {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.status-dot.offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   Bootstrap Popover & Icon Button Styles
   ========================================================================== */

.btn-system-info-icon {
  background: transparent;
  border: none;
  color: #94a3b8; /* สีเทาอ่อน ไม่เด่นชัด */
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.btn-system-info-icon i {
  font-size: 0.85rem;
}

.btn-system-info-icon:hover,
.btn-system-info-icon:focus {
  color: #64748b;
  opacity: 0.95;
  background-color: rgba(0, 0, 0, 0.04);
  outline: none;
}

/* System Info Popover Window */
.system-info-popover {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  max-width: 300px;
  min-width: 275px;
  z-index: 1070;
  background: #ffffff;
}

.system-info-popover .popover-body {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.system-info-popover-card {
  width: 100%;
  background: #ffffff;
}


