/* ==========================================================================
   UPDATES BUTTON IN HEADER
   ========================================================================== */
.updates-btn-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
}

.header-updates-btn {
  background-color: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 9999px; /* full rounded */
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-1);
}

.header-updates-btn:hover {
  background-color: rgba(71, 77, 197, 0.05); /* very light primary */
  border-color: rgba(71, 77, 197, 0.2);
}

.header-updates-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

/* Red Notification Dot with Pulse Animation */
.updates-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background-color: var(--error);
  border-radius: 50%;
  display: none; /* Controlled by JS */
  z-index: 2;
}

.updates-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--error);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
  z-index: 1;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ==========================================================================
   UPDATES MODAL (GLASSMORPHISM)
   ========================================================================== */
.updates-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(248, 249, 250, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.updates-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.updates-modal-card {
  background: var(--surface-lowest);
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-2);
  position: relative;
  transform: translateY(0) scale(1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.updates-modal-overlay.hidden .updates-modal-card {
  transform: translateY(30px) scale(0.95);
}

.updates-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--outline-variant);
}

.updates-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: 12px;
}

.updates-modal-close {
  background: var(--surface-low);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 14px;
  color: var(--on-surface-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.updates-modal-close:hover {
  background: var(--outline-variant);
  color: var(--on-surface);
}

/* Scrollable List Container */
.updates-list-container {
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar for Modal */
.updates-list-container::-webkit-scrollbar {
  width: 6px;
}
.updates-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.updates-list-container::-webkit-scrollbar-thumb {
  background: var(--outline-variant);
  border-radius: 3px;
}

/* Individual Update Item */
.update-item {
  padding: 20px 16px;
  border-bottom: 1px solid var(--outline-variant);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.2s, transform 0.2s;
}

/* Remove border from last item */
.update-item:last-child {
  border-bottom: none;
}

.update-item:hover {
  background: var(--surface-low);
  transform: translateX(4px);
}

.update-text {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 8px;
  line-height: 1.4;
}

.update-meta {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  color: var(--on-surface-variant);
}

/* Featured / Newest Update Item */
.update-item.featured {
  background: var(--surface-lowest);
  border: 1px solid rgba(71, 77, 197, 0.2);
  box-shadow: var(--shadow-1);
  margin-bottom: 12px;
  transform: scale(1.02);
  border-left: 4px solid var(--primary);
}

.update-item.featured:hover {
  background: rgba(71, 77, 197, 0.05);
  transform: scale(1.03) translateX(2px);
}

.update-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
