:root {
  --datatable-search-border-color: #ddd;
}

:root {
  --bg3-color:
    linear-gradient(to right, rgba(180, 200, 230, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(180, 200, 230, 0.2) 1px, transparent 1px);

  --pill-color: #8c57ff;

  --border-default: rgba(0, 0, 0, 0.08);
  --border-active: rgba(140, 87, 255, 0.4);

  --pulse-glow: rgba(13, 110, 253, 0.3);
  --pulse-glow-fade: rgba(13, 110, 253, 0);
}

[data-style="dark"] {
  --bg3-color:
    linear-gradient(to right, rgba(180, 200, 230, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(180, 200, 230, 0.05) 1px, transparent 1px);

  --border-default: rgba(255, 255, 255, 0.12);

  --pulse-glow: rgba(13, 110, 253, 0.55);
  --pulse-glow-fade: rgba(13, 110, 253, 0);
}

body {
  background-image: var(--bg3-color) !important;
  background-size: 52px 52px !important;
  background-attachment: fixed !important;
}

/* Dark mode */
[data-style="dark"] {
  --datatable-search-border-color: rgba(255, 255, 255, 0.09);
}

.datatable-search:focus {
  outline: none !important;
  border-color: var(--datatable-search-border-color) !important;
}

.icon-circle {
  height: 70px;
  width: 70px;
  border-radius: 50%;
  position: absolute;
  top: -15px;
  /* Move the circle upwards */
  background-color: white;
  /* Ensure background matches modal */
}

.dark-style .icon-circle {
  background-color: #312d4b;
}

/************************************     WHAT'S NEW ********************************************/
.whats-new-pill {
  border: 1px solid var(--border-default);
  background: var(--bg3-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  text-decoration: none !important;
  transition: all 0.25s ease;
  color: inherit;
}

/* Vertical layout */
.layout-vertical .whats-new-pill {
  width: 2.5rem;
  height: 2.5rem;
}

/* Horizontal layout */
.layout-horizontal .whats-new-pill {
  width: 2.1rem;
  height: 2.1rem;
}

/* icon */
.whats-new-pill i {
  font-size: 20px;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: all 0.25s ease;
}

/* hover effect*/
.whats-new-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--border-active, rgba(13, 110, 253, 0.25));
}

/* icon animation on hover */
.whats-new-pill:hover i {
  color: var(--pill-color);
  transform: rotate(-10deg) scale(1.15);
}

/* active = press feedback */
.whats-new-pill:active,
.whats-new-pill.active {
  border-color: var(--border-active, rgba(13, 110, 253, 0.25));
}

/* force no color change on active */
.whats-new-pill:active i,
.whats-new-pill.active i {
  transform: rotate(-10deg) scale(1.15);
  color: var(--pill-color);
}

/* New Update Dot*/
.whats-new-pill.has-update::after {
  content: "";
  position: absolute;
  bottom: 0;
  background: #ff3b30;
  border-radius: 100%;
  box-shadow: 0 0 0 2px var(--bg3-color);
}

/* Vertical layout */
.layout-vertical .whats-new-pill.has-update::after {
  right: 3px;
  width: 8px;
  height: 8px;
}

/* Horizontal layout */
.layout-horizontal .whats-new-pill.has-update::after {
  right: 2px;
  width: 0.4rem;
  height: 0.4rem;
}

/* Smooth glow pulse (only when update exists)*/
.whats-new-pill.has-update::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: pulseGlow 1.8s infinite;
  pointer-events: none;
  z-index: 0;
}

[data-style="dark"] .whats-new-pill.has-update::before {
  filter: brightness(4.2);
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 0.4;
    box-shadow: 0 0 0 0 var(--pulse-glow);
  }

  70% {
    transform: scale(1.05);
    opacity: 0;
    box-shadow: 0 0 0 12px var(--pulse-glow-fade);
  }

  100% {
    opacity: 0;
  }
}
