/* ========================= ROOT ========================= */

#twinks-admin {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  font: 15px/1.5 system-ui, sans-serif;
  border-radius: 20px;
  color: rgb(var(--text900));
}

.twinks-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1em;
  color: rgb(var(--text900));
}

#twinks-search { display: none; }

/* ========================= BUTTONS ========================= */

#audit-all, .primary {
    font-size: 10px;
    width: auto;
    transition: all 0.5s ease-in-out;
    font-weight: 400 !important;
    line-height: 13px !important;
    padding: 4px 20px !important;
    cursor: pointer;
    border-radius: 20px;
    text-transform: uppercase;
    color: var(--navi-link);
    border: none !important;
    font-family: var(--sec-font) !important;
    margin: 0 10px;
  background-color: var(--link-acc) !important;
}
.primary:hover { background: #000; }

/* ========================= GRID ========================= */

.twinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
}

/* ========================= MAIN BLOCK ========================= */

.main-block {
    transition: background .2s ease;
    background: #aba89e70;
    padding: 0px 0px 10px 0px;
    border-radius: 8px;
    max-height: 120px;
    overflow-y: scroll;
}

.main-block:hover { background: rgb(var(--light100) / .7); }

/* блок при аудит-подсветке */
.main-block.highlight {
  border-radius: 8px;
  background: rgba(108,192,255,0.08);
  transition: background .4s ease;
}

/* ========================= MAIN HEADER ========================= */

.main-header {
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  background: var(--link-acc);
}

/* имя мэйна (основы) */
.main-name {
    font-weight: 199 !important;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    border-radius: 6px;
    padding: 6px 0 0 20px;
    font-family: var(--main-font);
    font-size: 12px;
    width: 100%;
    font-style: italic;
  color: var(--link-acc) !important;
}

.main-name a {
    font-weight: 200;
    text-decoration: none;
    color: var(--quo2) !important;
}
.main-name a:hover { text-decoration: underline; }

/* кнопка "✎" */
.edit-btn {
  opacity: 0;
  transition: opacity .2s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: rgb(var(--accent));
}
.main-block:hover .edit-btn { opacity: 1; }

/* ========================= TWINKS LIST ========================= */

.twinks-list {
  text-transform: lowercase;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  margin-left: 20px;
  list-style: disc;
  font-weight: bold;
  font-size: 11px;
  color: var(--link-acc) !important;
}

.twink-name {
  text-transform: lowercase;
  font-size: 14px;
  text-decoration: none;
  position: relative;
  padding-left: 10px;
}
.twink-name:hover { text-decoration: underline; }

/* ========================= MODAL BACKDROP ========================= */

.twinks-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity .25s ease;
}
.twinks-backdrop.visible {
  display: flex;
  opacity: 1;
}

/* ========================= MODAL INNER ========================= */

.twinks-modal-inner {
  background: var(--base-bg2);
  padding: 20px;
  border-radius: 12px;
  color: rgb(var(--text900));
  width: 420px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.twinks-modal-inner input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid rgb(var(--light100) / .5);
  border-radius: 6px;
  margin-bottom: 8px;
}

/* ========================= TWINK ROW ========================= */

.twink-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
}

.twink-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    justify-content: space-between;
}

.twink-name {
  text-transform: lowercase;
  font-size: 12px;
  margin-left: 6px;
  user-select: none;
}

/* ========================= HINT DROPDOWN ========================= */

.twink-hint {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10001;
  display: none;
  flex-direction: column;
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 4px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background: #c2bfb6;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s ease;
}

.twink-hint.visible {
  display: flex;
  opacity: 1;
}

.twink-hint div {
  padding: 4px 6px;
  cursor: pointer;
  transition: background .15s;
  font-size: 13px;
}
.twink-hint div:hover {
  background: rgba(255,255,255,0.1);
}