/* ===== ramkael.pro — auth.css v2.0 ===== */

/* ── Navbar auth area ── */
.auth-area { display:flex; align-items:center; margin-left:4px; }

.auth-login-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: var(--radius-s);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.auth-login-btn:hover { border-color: var(--accent); color: var(--accent); }

/* User button + dropdown */
.auth-user-wrap { position: relative; }

.auth-user-btn {
  display: flex; align-items: center; gap: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 5px 10px 5px 6px;
  cursor: pointer;
  font-family: var(--font);
  font-size: .8rem;
  color: var(--text2);
  transition: all .2s;
}
.auth-user-btn:hover { border-color: var(--accent); color: var(--text); }

.auth-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-uname { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-caret  { font-size: .65rem; color: var(--text3); }

/* Dropdown */
.auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 200;
  overflow: hidden;
}
.auth-dropdown.open { display: block; }

.auth-dd-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.auth-dd-name  { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.auth-dd-role  { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; display: inline-block; margin-bottom: 4px; }
.auth-role-admin     { background: rgba(255,102,0,.15); color: var(--accent); }
.auth-role-moderator { background: rgba(52,211,153,.15); color: var(--green); }
.auth-role-user      { background: var(--bg2); color: var(--text3); }
.auth-dd-email { font-size: .75rem; color: var(--text3); word-break: break-all; }
.auth-dd-meta  { font-size: .72rem; color: var(--text3); margin-top: 3px; font-style: italic; }
.auth-dd-meta2 { font-size: .72rem; color: var(--text3); margin-top: 1px; font-style: italic; }

.auth-dd-item {
  display: block; width: 100%;
  padding: 10px 16px;
  background: none; border: none;
  color: var(--text2); font-family: var(--font); font-size: .85rem;
  text-align: left; cursor: pointer;
  transition: background .15s;
}
.auth-dd-item:hover { background: var(--bg2); }
.auth-dd-out:hover  { color: #f66; }

/* ── Modals ── */
.auth-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.7);
  align-items: center; justify-content: center;
  padding: 20px;
}
.auth-overlay.open { display: flex; }

.auth-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  width: 100%; max-width: 400px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.auth-modal-wide { max-width: 480px; }

.auth-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none;
  color: var(--text3); font-size: 1rem; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.auth-modal-close:hover { background: var(--bg2); color: var(--text); }

.auth-modal-title {
  font-size: 1.2rem; font-weight: 800;
  color: var(--text); margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: .78rem; font-weight: 600;
  color: var(--text3); margin-bottom: 5px; margin-top: 12px;
}
.auth-label:first-of-type { margin-top: 0; }
.auth-req { color: var(--accent); }

.auth-input, .auth-select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 9px 12px;
  font-family: var(--font);
  font-size: .88rem;
  box-sizing: border-box;
  transition: border-color .15s;
  appearance: none;
}
.auth-input:focus, .auth-select:focus { border-color: var(--accent); outline: none; }
.auth-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23777'%3E%3Cpath d='M0 0l6 8 6-8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.auth-row2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-top: 12px;
}
.auth-row2 .auth-label { margin-top: 0; }

.auth-error {
  font-size: .8rem; color: #f66;
  min-height: 18px; margin: 8px 0 4px;
  line-height: 1.4;
}
.auth-success {
  font-size: .85rem; color: var(--green);
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: var(--radius-s);
  padding: 10px 14px; margin-bottom: 12px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%; margin-top: 4px;
  background: var(--accent); color: #fff;
  border: none;
  padding: 11px;
  border-radius: var(--radius-s);
  font-family: var(--font); font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.auth-submit:hover   { background: var(--accent-h); }
.auth-submit:disabled{ opacity: .6; cursor: default; }

.auth-switch {
  text-align: center;
  font-size: .8rem; color: var(--text3);
  margin-top: 16px;
}
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Avatar in navbar ── */
.auth-avatar-img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* ── Avatar upload row in form ── */
.auth-avatar-row {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
}
.auth-avatar-preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover; background-position: center;
}
.auth-avatar-preview img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.auth-file-lbl {
  display: inline-block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 7px 14px;
  font-family: var(--font); font-size: .8rem;
  color: var(--text2); cursor: pointer;
  transition: all .15s;
}
.auth-file-lbl:hover { border-color: var(--accent); color: var(--accent); }

/* ── Checkbox row ── */
.auth-check-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.auth-check-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer; flex-shrink: 0;
}
.auth-check-row label {
  font-size: .82rem; color: var(--text2); cursor: pointer;
}

/* ── Hint text ── */
.auth-hint {
  font-size: .75rem; color: var(--text3);
  font-style: italic; margin-top: 4px; line-height: 1.4;
}

/* ── Forum collapsible section ── */
.auth-forum-toggle {
  display: flex; align-items: center; gap: 6px;
  width: 100%; margin-top: 18px; padding: 8px 0;
  background: none; border: none; border-top: 1px solid var(--border);
  color: var(--text3); font-family: var(--font); font-size: .82rem;
  cursor: pointer; text-align: left; transition: color .15s;
}
.auth-forum-toggle:hover { color: var(--accent); }

.auth-forum-extra {
  display: none; padding-top: 4px;
}
.auth-forum-extra.open { display: block; }

/* ── Profile edit button in dropdown ── */
.auth-dd-profile-btn {
  display: block; width: 100%;
  padding: 9px 16px;
  background: none; border: none; border-top: 1px solid var(--border);
  color: var(--text2); font-family: var(--font); font-size: .82rem;
  text-align: left; cursor: pointer;
  transition: background .15s;
}
.auth-dd-profile-btn:hover { background: var(--bg2); color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-uname  { display: none; }
  .auth-row2   { grid-template-columns: 1fr; }
  .auth-modal  { padding: 24px 18px 20px; }
}
