/* tempo/web/css/tags.css — все стили тегов: вики+local (унифицировано) и страница (нетронуто) */
/* --- вики + local, унифицировано --- */
.tags-panel {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 8px 0;
  background: var(--card);}
.tags-panel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-bottom: 8px;}
.tag-pill { position: relative; }
.tag-pill, .tag-pill-view {
    background-color: #E0F3D0;
    color: #0056b3;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 2px;
    border: 1px solid rgba(74, 69, 62, 0.15);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;}
.tag-pill-view:hover {background-color: #e2e6ea; transform: translateY(-1px);}
.tag-pill-view .card-icon,
.tag-pill-view .card-icon-wrapper {width: 16px; height: 16px; margin-right: 5px; vertical-align: text-bottom;}
.tag-pill-index {font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; color: var(--ink3); margin-left: 2px;}
.tag-pill-remove {cursor: pointer; font-weight: bold; color: #0056b3; opacity: 0.6;}
.tag-pill-remove:hover { opacity: 1; }
.tag-pill-title {cursor: pointer; text-decoration: underline dotted;}
.tag-pill-title:hover { color: var(--accent); }
.tag-pill-expand {cursor: pointer; color: var(--ink3); padding: 0 2px; font-size: 0.8rem;}
.tag-pill-expand:hover { color: var(--ink, #1a1a2e); }
.tag-pill-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  margin-right: 4px;
  vertical-align: middle;}
.tag-pill-icon-svg {
  display: inline-flex;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;}
.tag-pill-icon-svg svg {width: 14px; height: 14px;}
.tag-pill-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    padding: 8px 0 4px;}
.tag-pill-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: normal;
    color: #333;
    padding: 2px 0;
    white-space: nowrap;}
.tag-pill-list-item:hover { color: #2980b9; }
.tag-pill-list-marker { flex-shrink: 0; opacity: 0.6; font-size: 0.8em; }
.tag-pill-list-empty { color: #999; font-size: 0.9em; padding: 6px 0; }
.tags-panel-input-wrap {position: relative;}
.tags-panel-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Spectral', serif;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;}
.tags-panel-input:focus { border-color: var(--accent); }
.tags-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;}
.tags-autocomplete-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: 'Spectral', serif;
  display: flex;
  justify-content: space-between;
  align-items: center;}
.tags-autocomplete-item:hover { background: var(--bg2); }
.tags-autocomplete-index {font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; color: var(--ink3);}
.tags-autocomplete-new {color: var(--accent); font-style: italic;}
.tags-autocomplete-new:hover { background: #e8f0f8; }
.tags-panel-actions {display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end;}
.tags-input-field {
    border: none;
    outline: none;
    font-size: 0.9em;
    flex-grow: 1;
    min-width: 120px;}
.tag-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 10px;
    border-radius: 6px;
    z-index: 2000;
    min-width: 220px;
    max-width: 350px;
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;}
.tag-popup-header {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 5px;}
.tag-popup-list {list-style: none; padding: 0; margin: 0;}
.tag-popup-item {margin-bottom: 6px; line-height: 1.3;}
.tag-popup-link {
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
    cursor: pointer;
    border-bottom: 1px dotted #ccc;
    transition: color 0.2s;}
.tag-popup-link:hover {color: #3498db; border-bottom-color: #3498db;}
/* --- страница (page), нетронуто, вложено в .editor-container чтобы не конфликтовать с вики/local выше --- */
.editor-container .tags-container {display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;}
.editor-container .tag-editor-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 5px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    background: transparent;
    transition: border-color 0.3s;
    cursor: text;
    position: relative;}
.editor-container .tag-editor-container.active {border-bottom-color: #007bff;}
.editor-container .tag-pill {
    display: flex;
    align-items: center;
    background-color: #eef2f5;
    color: #333;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.9em;
    user-select: none;
    border: 1px solid #ccc;}
.editor-container .tag-pill .remove-tag-btn {
    margin-left: 6px;
    cursor: pointer;
    color: #999;
    font-weight: bold;
    line-height: 1;}
.editor-container .tag-pill .remove-tag-btn:hover {color: #d9534f;}
.editor-container .tag-input-ghost {
    border: none;
    outline: none;
    font-size: 1.2em;
    flex-grow: 1;
    min-width: 150px;
    background: transparent;
    padding: 5px;
    color: #333;}
.editor-container .tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 150px;
    overflow-y: auto;
    width: 100%;
    display: none;}
.editor-container .tag-suggestions.visible {display: block;}
.editor-container .tag-suggestion-item {padding: 8px 12px; cursor: pointer; font-size: 0.95em;}
.editor-container .tag-suggestion-item:hover, .editor-container .tag-suggestion-item.selected {background-color: #f1f1f1; color: #007bff;}
.tags-container .tag {
    display: inline-block;
    background-color: #eef2f5;
    color: #555;
    padding: 4px 10px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    margin-right: 8px;}
.tags-container .tag:hover {background-color: #e0e5e9; color: #333; border-color: #ccc; text-decoration: none;}