/* 1. The Global Heartbeat */
:root {
    --pulse-val: 1; /* Default value */
}

@property --pulse-val {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

@keyframes global-heartbeat {
    0%, 100% { --pulse-val: 1; }
    50% { --pulse-val: 0.6; }
}

/* Apply the animation to the root so it's always running in the background */
:root {
    animation: global-heartbeat 2s infinite ease-in-out;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
}

.board-tag {
  display: inline-flex;
  align-items: center;
  color: var(--text-sub);
  padding: 2px 3px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.board-tag::before {
  content: '#';
  color: var(--text-main);
  font-weight: 400;
  margin-right: 1px;
}

.modal-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  color: var(--text-sub);
  background-color: #aaaaaa;
  padding: 2px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #f5f9ff;
  transition: all 0.2s ease;
  cursor: default;
}

.tag-chip::before {
  content: '#';
  color: var(--text-sub);
  font-weight: 400;
}

.tag-chip:hover {
  background-color: #f8f8f8;
}

.remove-tag-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-left: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tag-chip:hover .remove-tag-btn {
  width: 12px;
  opacity: 1;
  margin-left: 8px;
}

.remove-tag-btn:hover {
  color: #ef4444;
}


/* The dimming effect */
.task-card.is-dimmed {
    opacity: 0.3;
    filter: grayscale(80%);
    pointer-events: none; /* Optional: prevents interaction with dimmed cards */
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Active tag styling */
.tag-pill.tag-active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
    font-weight: bold;
    transform: scale(1.1);
}

/* Make tags feel clickable */
.tag-pill {
    cursor: pointer;
    transition: transform 0.1s ease;
}

.tag-pill:hover {
    transform: scale(1.05);
}




/* 2. The Tag Style */
.board-tag {
    transition: background-color 0.2s; /* Smooth color transition */
}

/* 3. The Active Tag */
.board-tag.tag-active {
    background-color: #333 !important;
    color: #fff !important;
    font-weight: bold;
    /* This is the magic: it uses the global variable that is always in sync */
    opacity: var(--pulse-val);
    transform: scale(calc(0.95 + (var(--pulse-val) * 0.05)));

}