.alert {
  position: relative;
  overflow: hidden;

  &:hover {
    background-color: #f0f0f0;
  }
}

.alert__map-wrapper {
  position: relative;
  margin-bottom: 1rem;

  & .spot__map-container {
    margin-bottom: 0;
  }
}

.alert__wind-compass {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.alert__filter-checkbox {
  position: relative;
  z-index: 513;
  cursor: pointer;
  display: inline-flex;
  align-items: center;

  & input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
  }
}

/* Track */
.alert__toggle {
  display: block;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #d1d5db;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;

  /* Knob */
  &::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
  }
}

.alert__filter-checkbox:has(input:checked) {
  & .alert__toggle {
    background: #10b981;

    &::after {
      transform: translateX(14px);
    }
  }  
}

.alert__link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-indent: -9999px;
  z-index: 512;
}

.alert__subscribe-btn {
  position: relative;
  z-index: 513;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  white-space: nowrap;

  &:hover {
    background: #e5e7eb;
  }

  &.alert__subscribe-btn--active {
    background: #ecfdf5;
    border-color: #10b981;
    color: #059669;

    &:hover {
      background: #d1fae5;
    }
  }
}