/* assets/common.css */

.hidden { display: none !important; }

.overlay{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(2px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 9999;
  flex-direction: column;
  gap: 10px;
}
.spinner{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(0,0,0,.15);
  border-top-color: rgba(0,0,0,.65);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg);} }

.tagwrap{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items:center;
}
.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
  font-size: 12px;
  line-height: 1;
}
.tag .x{
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: .75;
}
.tag .x:hover{ opacity: 1; }

.tag-editor{
  position: relative;              /* NEU: damit Dropdown absolut positioniert werden kann */
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.tag-editor input{
  width: 100%;
  margin-top: 8px;
}

/* NEU: Suggest als Dropdown */
.tag-suggest{
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% - 6px);
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  display: none;                  /* wichtig: default hidden */
  z-index: 9999;
}

.tag-suggest.is-open{ display: flex; }
.tag-suggest{
  flex-wrap: wrap;
  gap: 6px;
}

.tag-suggest .opt{
  cursor:pointer;
  user-select:none;
}
.tag-suggest .opt:hover{
  background: rgba(0,0,0,.09);
}


.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 99999;
}
.modal{
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal h3{ margin: 0 0 8px 0; }
.modal p{ margin: 0 0 14px 0; opacity: .85; }
.modal .actions{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
}
/* Search Select (Single value) */
.ssel{ position: relative; }
.ssel-input{ width:100%; }
.ssel-list{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 6px);
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  box-shadow:0 18px 50px rgba(0,0,0,.18);
  max-height:240px;
  overflow:auto;
  padding:6px;
  display:none;
  z-index: 99999;
}
.ssel-list.is-open{ display:block; }
.ssel-item{
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
}
.ssel-item:hover{ background: rgba(103,139,67,.10); }
.ssel-item.muted{ opacity:.7; cursor:default; }
