/* === SUNNY ROLES MODALS (stable) === */

#roles {
  font: 300 11px/150% var(--font)
}

.roles-header > h2 {
  display: none
}

.roles-header {
  margin-bottom: 10px;
}

.roles-actions {
  display: flex;
  gap: 2px;
}

/* ôîí */
.nc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;       /* JS ñòàâèò display:flex */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s ease;
}

.nc-modal-backdrop.visible {
  opacity: 1;
}

/* êîíòåéíåð ìîäàëêè */
.nc-modal {
  background: var(--dark100);
  padding: 20px 28px;
  border-radius: 10px;
  max-width: 420px;
  width: calc(100% - 40px);
  color: var(--text3);
  box-shadow: 0 0 30px rgba(0,0,0,0.35);
  position: relative;
  z-index: 10000;
  font-family: var(--font)
}

/* ïîëÿ */
.nc-modal .nc-field {
  margin-bottom: 14px;
}

.nc-modal label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 13px
}

.nc-modal input,
.nc-modal select {
  width: 100%;
  padding: 6px 7px;
  border: 1px solid var(--opacity-bg2) !important;
  background: var(--opacity-bg2) !important;
  color: var(--links) !important;
  border-radius: 8px;
  font-size: 12px
}

/* êíîïêè */
.nc-modal-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.nc-btn {
  cursor: pointer;
  height:auto;
  margin:0px !important;
  transition: 0.1s;
  color: var(--text3);
  padding: 4px 15px 6px !important;
  font: 500 11px var(--font)
}

.nc-btn.primary {
  background: var(--accent);
}

.nc-btn.warn {
  background: #8a1f1f;
  border-color: #8a1f1f;
}

.nc-btn:hover {
  filter: brightness(1.15);
}


/* ====== 4-ÊÎËÎÍÎ×ÍÀß ÑÅÒÊÀ ====== */

.roles-grid-4col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  background: var(--cover);
  border-radius: 10px;
  padding: 15px;
}

.roles-row-4 {
display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px 40px;
    align-items: flex-start;
}

.col.fandom-col {
  width: 100%;
  box-sizing: border-box
}

.col.fandom-col + .col.chars-col {
  margin-left: -35px
}

.col {
  position: relative;
}

/* ====== ÔÀÍÄÎÌÛ ====== */

.fandom-col {
  background: var(--cover2);
  text-align: right;
  border-radius: 10px;
  padding: 10px 15px;
}

.fandom-en {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.fandom-ru {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.chars-col {
  background: var(--cover2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: flex-start;
}

/* êíîïêà &#9851; — ñêðûòà ïî óìîë÷àíèþ */
.fandom-col .edit-cast {
    transition: opacity 0.15s;
    padding: 5px 8px !important;
  background: var(--text2);
  margin: 0 !important;
}


/* ====== ÏÅÐÑÎÍÀÆÈ ====== */

.chars-col .char-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cover);
  padding: 5px 10px !important;
  border-radius: 6px;
}

.chars-col a {
    flex: 1;
    font-weight: 700;
    font-size: 12px !important;
    text-transform: lowercase !important;
}

/* êíîïêà &#9999; — ñêðûòà ïî óìîë÷àíèþ */
.char-line .edit-btn {
  pointer-events: none;
  transition: opacity 0.15s;
  margin: 0 !important;
  padding: 5px 8px !important;
  background: var(--text2);
}

.char-line:hover .edit-btn {
  opacity: 1;
  pointer-events: auto;
}

/* ====== ÏÓÑÒÛÅ ÊÎËÎÍÊÈ ====== */
.empty-col {
  opacity: 0.12;
}

/* ====== ÁÓÊÂÛ ====== */

.roles-letter-title {
    display: block;
    text-align: center;
    padding: 3px 15px;
    text-transform: uppercase;
    color: var(--text3);
    background-color: var(--text1);
    font-size: 17px !important;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 5px;
}

button.edit-btn, button.edit-cast {
  font-size: 0
}

button.edit-btn:before {
  content: "\f303";
  font: normal 11px FOntAwesome;
}

button.edit-cast:before {
  content: "\f0ad";
  font: normal 11px FOntAwesome;
}

/* === TOASTS === */
.nc-toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 6px;
  background: rgba(30,30,30,0.9);
  color: #fff;
  font-size: 14px;
  z-index: 99999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.nc-toast.visible {
  opacity: 1;
}