/* 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;
}

.edit-tag-btn,
.remove-tag-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 10px;
  padding: 0;
  margin-left: 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tag-chip:hover .edit-tag-btn,
.tag-chip:hover .remove-tag-btn {
  width: 14px;
  opacity: 1;
  margin-left: 4px;
}

.remove-tag-btn:hover {
  transform: scale(1.3);
}


.tag-input-wrapper {
    position: relative;
}

.tag-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: var(--bg-main, #fff);
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tag-suggestion-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-sub);
}

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

.tag-suggestion-item:hover {
    background: var(--bg-hover, #f0f0f0);
}

/* 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)));

}