.rw-auth-avatar-btn,
.rw-auth-preview,
.rw-auth-avatar-item,
.rw-auth-profile-avatar {
  --avatar-offset-x: 0px;
  --avatar-offset-y: 0px;
}

.rw-auth-avatar-btn {
  position: fixed;
  right: 24px;
  top: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #334155;
  background-color: #111827;
  background-image: url("/images/usericon.jpg");
  background-size: 500% 500%;
  background-position: 0% 0%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 40;
}

.rw-auth-avatar-btn:hover {
  border-color: #0ea5e9;
}

.rw-auth-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(3, 7, 18, 0.55);
  z-index: 45;
}

.rw-auth-backdrop.is-open {
  display: block;
}

.rw-auth-modal {
  position: fixed;
  right: 24px;
  top: 84px;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  color: #e5e7eb;
  padding: 12px;
}

.rw-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.rw-auth-tab {
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 8px;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
}

.rw-auth-tab.is-active {
  border-color: #0ea5e9;
  color: #e2e8f0;
}

.rw-auth-panel {
  display: none;
}

.rw-auth-panel.is-open {
  display: block;
}

.rw-auth-form {
  display: grid;
  gap: 8px;
}

.rw-auth-form input,
.rw-auth-form textarea,
.rw-auth-form button {
  height: 36px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e5e7eb;
  padding: 0 10px;
}

.rw-auth-form textarea {
  height: 70px;
  padding-top: 8px;
  resize: vertical;
}

.rw-auth-form button {
  background: linear-gradient(135deg, #0f766e, #155e75);
  border-color: #0e7490;
  cursor: pointer;
  font-weight: 600;
}

.rw-auth-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rw-auth-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #334155;
  background-color: #0f172a;
  background-image: url("/images/usericon.jpg");
  background-size: 500% 500%;
  background-position: 0% 0%;
}

.rw-auth-avatar-menu-wrap {
  position: relative;
}

.rw-auth-avatar-btn-select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  padding: 0 10px;
  cursor: pointer;
}

.rw-auth-avatar-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  grid-template-columns: repeat(5, 28px);
  gap: 6px;
  max-height: 172px;
  overflow: auto;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  z-index: 50;
}

.rw-auth-avatar-menu.is-open {
  display: grid;
}

.rw-auth-avatar-item {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #334155;
  background-color: #111827;
  background-image: url("/images/usericon.jpg");
  background-size: 500% 500%;
  background-position: 0% 0%;
  cursor: pointer;
}

.rw-auth-avatar-item.is-active {
  border-color: #0ea5e9;
}

.rw-auth-msg {
  min-height: 18px;
  font-size: 12px;
  color: #94a3b8;
}

.rw-auth-msg.is-error {
  color: #fecaca;
}

.rw-auth-msg.is-success {
  color: #86efac;
}

.rw-auth-profile {
  display: grid;
  gap: 10px;
}

.rw-auth-profile-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rw-auth-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #334155;
  background-color: #111827;
  background-image: url("/images/usericon.jpg");
  background-size: 500% 500%;
  background-position: 0% 0%;
}

.rw-auth-profile-name {
  margin: 0;
  font-size: 15px;
  color: #e2e8f0;
}

.rw-auth-profile-bio {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.rw-auth-profile-actions {
  display: flex;
  gap: 8px;
}

.rw-auth-profile-actions button {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e5e7eb;
  padding: 0 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .rw-auth-avatar-btn {
    right: 12px;
    top: 12px;
  }

  .rw-auth-modal {
    right: 12px;
    top: 70px;
  }
}
