/* Roleplay page styles (MVP, per-character cards, avatar fixes) */

.role-card {
  background: #fff;
  border-radius: 13px;
  border: 1.2px solid #f4eafd;
  box-shadow: 0 1px 12px #e7e7e844;
  padding: 16px 14px 14px 14px;
}

.role-section-title {
  margin: 0 0 10px 0;
  color: #a21caf;
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.2px;
  text-align: center; /* center the title */
}

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-weight: 600;
  color: #7b257c;
  margin-bottom: 6px;
}
.field input[type="text"], .field textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1px solid #ded9ea;
  padding: 11px 12px;
  background: #faf7ff;
  color: #4d4458;
  font-size: 1.02rem;
  transition: border 0.13s, background 0.13s;
}
.field input[type="text"]:focus, .field textarea:focus {
  border: 1.3px solid #a21caf;
  background: #fff;
  outline: none;
}

.hint { color: #8d8497; font-size: 0.86em; margin-top: 6px; }

.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.char-counter.mini {
  position: static;
  background: #f0f0f0;
  border: 1px solid #ede9fe;
  box-shadow: none;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78em;
  color: #a21caf;
}

/* Buttons – unified sizing and centering (fixes Upload alignment) */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
  box-sizing: border-box;
}
.btn-primary {
  background: #a21caf; color: #fff; box-shadow: 0 2px 8px #a21caf1a;
}
.btn-primary:hover, .btn-primary:focus { background: #851b8a; }
.btn-secondary {
  background: #f8f0fc; color: #7c468f; border: 1px solid #e6c5f6;
}
.btn-secondary:hover, .btn-secondary:focus { background: #f1d7f9; color: #a21caf; }
.btn-ghost {
  background: transparent; color: #7c468f; border: 1px dashed #e6c5f6;
}
.btn-ghost:hover, .btn-ghost:focus { border-color: #b568bb; color: #a21caf; }
.btn-ghost.danger { color: #b13737; border-color: #f0c9c9; }
.btn-ghost.danger:hover { border-color: #e66; color: #e33; }

.actions { display: flex; gap: 8px; margin-top: 10px; }

.privacy-note {
  margin-top: 12px;
  font-size: 0.92rem;
  color: #4e4364;
  background: #f8f8fb;
  border: 1px solid #f4eafd;
  border-radius: 10px;
  padding: 10px 12px;
}

/* Avatar uploader (form) */
.avatar-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.avatar-preview {
  width: 72px; height: 72px;
  border-radius: 14px;
  border: 1px solid #e6c5f6;
  background: #f8f0fc;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: #c7b3db; /* tints placeholder SVG via currentColor */
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-ph-svg { width: 70%; height: 70%; display: block; }

/* Force Upload & Remove to match perfectly */
.avatar-actions { display: flex; gap: 8px;  }
.avatar-actions .btn-secondary,
.avatar-actions .btn-ghost {
  height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
}
.avatar-btn { min-width: 104px; }
.avatar-remove-btn { min-width: 104px; }

/* Character list – each character is its own card */
.character-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr; gap: 10px;
}


.character-item {
  border: 1px solid #f4eafd;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 1px 7px #e9cdf61a;
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.char-avatar {
  width: 100px; height: 100px;
  border-radius: 10px;
  object-fit: cover;
  background: #f8f0fc;
  border: 1px solid #e6c5f6;
  display: block;
}
.char-avatar.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #c7b3db;
}
.char-avatar .avatar-ph-svg { width: 70%; height: 70%; }

.char-name { font-weight: 700; color: #7b257c; margin: 0 0 5px 0; letter-spacing: -0.2px; }
.char-desc { color: #4e4364; font-size: 0.98rem; white-space: pre-wrap; margin: 0; }

.item-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.item-actions .tiny-btn {
  font-size: 0.92rem;
  padding: 0px 10px;
  border-radius: 9px;
  border: 1px solid #e6c5f6;
  background: #f8f0fc;
  color: #7c468f;
  cursor: pointer;
  height: 34px;
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  text-decoration: none;
}
.item-actions .tiny-btn:hover { background: #f1d7f9; color: #a21caf; }
.item-actions .tiny-btn.primary {
  background: #a21caf; border-color: #a21caf; color: #fff;
}
.item-actions .tiny-btn.primary:hover { filter: brightness(0.95); }
.item-actions .danger { color: #b13737; border-color: #f0c9c9; }
.item-actions .danger:hover { color: #e33; border-color: #e66; }

.empty-state {
  text-align: center; color: #8d8497; padding: 18px 0;
}
.empty-emoji { font-size: 1.6rem; margin-bottom: 8px; }



.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7); /* or dark if your theme is dark */
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 5;
}
.locked-overlay span {
  background: #fff;
  color: #a21caf;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.role-card.locked {
  position: relative;
  pointer-events: none; /* disables all form fields */
  opacity: 0.6;         /* subtle fade */
}
