/* 
 * Trinkaspace User System Styles
 * 
 * Handles styles for:
 * - User identification
 * - User profile display
 * - User profile editing
 * - User menu
 * - Bookmarks
 */

/* User Area */
.trinkaspace-user-area {
  position: fixed;
  bottom: 20px;
  left: 20px;
  min-width: 150px;
  display: flex;
  justify-content: flex-start;
  z-index: var(--z-a1-foreground, 1050);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trinkaspace-user-area:hover {
  transform: scale(1.05);
}

/* User Display Info */
.user-info {
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 24px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(42, 255, 247, 0.3),
    0 0 15px rgba(42, 255, 247, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(42, 255, 247, 0.25);
}

.user-info:hover {
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(42, 255, 247, 0.4),
    0 0 20px rgba(42, 255, 247, 0.25);
}

.user-avatar {
  position: relative;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  border: 2px solid rgba(42, 255, 247, 0.5);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(42, 255, 247, 0.2);
}

.user-avatar:hover {
  border-color: rgba(42, 255, 247, 1);
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(42, 255, 247, 0.4);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 128px;
  max-height: 128px;
}

.avatar-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-frame.large {
  width: 80px;
  height: 80px;
}

.avatar-frame.small {
  width: 40px;
  height: 40px;
}

.user-name {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(42, 255, 247, 0.5);
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #ACABBB, #E1E0FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 15px rgba(42, 255, 247, 0.2);
}

.user-name:hover, .user-name:focus {
  background-color: rgba(255,255,255,0.1);
}

/* Pronouns display */
.user-pronouns {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  opacity: 0.8;
  transition: all 0.2s ease;
  font-style: italic;
}

.user-info:hover .user-pronouns {
  opacity: 1;
  color: rgba(255, 255, 255, 0.9);
}

/* Register Button – match the frosted/glass pill of .user-info */
.register-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.035); /* slightly more transparent */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #E1E0FF;
  padding: 10px 18px; /* header-fixes may slightly adjust; look remains consistent */
  border-radius: 24px;
  border: 1px solid rgba(42, 255, 247, 0.22);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(42, 255, 247, 0.28),
    0 0 15px rgba(42, 255, 247, 0.12);
  transition: all 0.3s ease;
  font-weight: 600;
}

.register-btn:hover, .register-btn:focus {
  box-shadow:
  0 6px 24px rgba(0, 0, 0, 0.32),
  0 0 0 2px rgba(42, 255, 247, 0.38),
  0 0 20px rgba(42, 255, 247, 0.22);
}

/* User Menu */
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(24, 24, 36, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  z-index: calc(var(--z-a1-foreground, 1050) + 1);
  box-shadow: 
    0 5px 25px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(42, 255, 247, 0.2),
    0 0 20px rgba(42, 255, 247, 0.1);
  border: 1px solid rgba(42, 255, 247, 0.15);
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.user-menu-item {
  padding: 10px 16px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.user-menu-item:hover {
  background: rgba(42, 255, 247, 0.1);
  color: #2AFFF7;
}

.user-menu-item i {
  font-size: 1rem;
  opacity: 0.8;
}

.user-menu hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

/* Modal Styles */
.trinkaspace-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-a5-modal, 5400);
}

.trinkaspace-modal-content {
  background: #333;
  padding: 2em;
  border-radius: 15px;
  width: 95%;
  max-width: 800px;
  /* Ensure at least 2 ixu space above and below the modal content */
  max-height: calc(100vh - (var(--ixu, 60px) * 4));
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 2px solid #2AFFF7;
}

.modal-title {
  margin-top: 0;
  color: #2AFFF7;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5em;
  color: #ccc;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Forms */
.user-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  color: #ddd;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  background-color: #444;
  border: 1px solid #666;
  padding: 10px;
  border-radius: 5px;
  color: #fff;
  font-size: 1em;
}

.form-group input:focus {
  outline: none;
  border-color: #2AFFF7;
  box-shadow: 0 0 5px rgba(42, 255, 247, 0.5);
}

.form-group small {
  margin-top: 5px;
  color: #999;
  font-size: 0.85em;
}

/* Set profile username input width */
#profile-username {
  width: 300px;
  max-width: 100%;
}

/* Profile Form */
.profile-form-landscape {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .profile-form-landscape {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-form-header {
    grid-column: 1 / 2;
  }
  
  .profile-pic-container {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
  }
  
  .form-actions {
    grid-column: 1 / 3;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
}

.current-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.current-profile-pic {
  margin-bottom: 10px;
}

.current-profile-pic img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  max-width: 128px;
  max-height: 128px;
}

.current-profile-name {
  font-size: 1.2em;
  color: #fff;
}

/* Modal-only: relax sans-serif font and shift pool left by 2 ixu on wide screens */
.trinkaspace-modal .trinkaspace-modal-content{
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, sans-serif;
}
@media (min-width: 768px){
  /* Removed previous negative offset that pushed the picture pool outside the modal
     causing horizontal jitter & scroll. Keep container in normal flow. */
  .trinkaspace-modal .trinkaspace-modal-content .profile-pic-container{
    position: relative;
    left: 0; /* stable */
  }
}

/* Raise the name field ~0.3 ixu to align with the pool label (wide screens) */
@media (min-width: 768px){
  .trinkaspace-modal .trinkaspace-modal-content .profile-form-header .form-group{
    margin-top: calc(var(--ixu, 60px) * -0.3);
  }
}

/* Thin cyan divider under the name input across the modal */
.trinkaspace-modal .trinkaspace-modal-content .profile-divider-line{
  height: 3px; /* slightly thicker for visibility */
  background-color: rgba(42,255,247,.75); /* stronger base */
  background-image: linear-gradient(90deg, transparent, rgba(42,255,247,.95), transparent);
  background-blend-mode: screen;
  box-shadow: 0 0 8px rgba(42,255,247,.35);
  margin: 10px 0 14px;
  grid-column: 1 / -1; /* span full grid width when inside grid */
}
@media (min-width: 768px){
  /* Divider no longer offset; keep natural width for stability */
  .trinkaspace-modal .trinkaspace-modal-content .profile-divider-line{
    margin-left: 0;
    width: 100%;
  }
}

/* Profile Picture Options */
.profile-pic-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
  max-height: 400px; /* Increased height */
  overflow-y: auto;
  padding: 10px;
  background-color: #444;
  border-radius: 5px;
}

.profile-pic-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.profile-pic-option.selected {
  background-color: rgba(42, 255, 247, 0.2);
  outline: 2px solid #2AFFF7;
}

.profile-pic-option:hover, 
.profile-pic-option:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

.profile-pic-option img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  max-width: 128px;
  max-height: 128px;
}

.profile-pic-option span {
  font-size: 0.8em;
  margin-top: 5px;
  text-align: center;
  color: #ddd;
}

/* Restore avatar + favorites overlay in profile modal */
.trinkaspace-modal .trinkaspace-modal-content .current-profile-header{
  align-items: flex-start; /* top-left alignment */
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar{
  position: relative;
  width: 280px; /* overlay stage */
  height: 280px;
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .avatar-frame.super{
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .avatar-frame.super img{
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .favorites-scatter{
  position: absolute; inset: 0; pointer-events: none; /* let avatar interactions pass through */
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .fav-badge{
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  pointer-events: auto; /* allow clicking badges if needed */
}
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .fav-badge img{
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}


/* Pronouns Selector */
.pronouns-selector {
  margin-top: 10px;
}

.pronouns-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
/* In the modal, make pronouns tighter */
.trinkaspace-modal .trinkaspace-modal-content .pronouns-options{
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}

.pronoun-option {
  display: flex;
  align-items: center;
}

.pronoun-option input[type="checkbox"] {
  margin-right: 5px;
}

/* Custom pronouns field */
.custom-pronouns {
  margin-top: 15px;
  padding: 8px;
  background: rgba(30, 30, 40, 0.3);
  border-radius: 5px;
}

.custom-pronouns label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9em;
  color: #ACABBB;
}

.custom-pronouns input[type="text"] {
  width: 300px;
  padding: 8px 10px;
  background: rgba(30, 30, 40, 0.6);
  border: 1px solid rgba(42, 255, 247, 0.3);
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 0.9em;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.primary-btn, .secondary-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s;
}

.primary-btn {
  background: rgba(42, 255, 247, 0.2);
  color: #2AFFF7;
  border: 1px solid #2AFFF7;
}

.primary-btn:hover, .primary-btn:focus {
  background: rgba(42, 255, 247, 0.3);
  box-shadow: 0 0 10px rgba(42, 255, 247, 0.5);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ddd;
  border: 1px solid #666;
}

.secondary-btn:hover, .secondary-btn:focus {
  background: rgba(255, 255, 255, 0.2);
}

/* Form Error */
.form-error {
  padding: 10px;
  border-radius: 5px;
  background-color: rgba(255, 107, 107, 0.1);
  border: 1px solid #FF6B6B;
  color: #FF6B6B;
}

/* Bookmarks */
.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px;
  background-color: #444;
  border-radius: 5px;
}

.bookmark-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #333;
  border-radius: 5px;
  border: 1px solid #555;
  position: relative;
}

.bookmark-link {
  flex-grow: 1;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.bookmark-link:hover {
  color: #2AFFF7;
  text-decoration: underline;
}

.bookmark-meta {
  font-size: 0.8em;
  color: #999;
  margin: 0 15px;
}

.bookmark-remove {
  background: none;
  border: none;
  color: #FF6B6B;
  cursor: pointer;
  font-size: 1.2em;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.bookmark-remove:hover {
  opacity: 1;
}

.no-bookmarks {
  padding: 30px;
  text-align: center;
  color: #999;
}

/* Settings Form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  padding: 15px;
  background-color: #444;
  border-radius: 5px;
}

.settings-section h3 {
  margin-top: 0;
  color: #2AFFF7;
  font-size: 1.1em;
}

.settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.radio-label input {
  margin-right: 5px;
}

/* Accessibility */
.clickable {
  cursor: pointer;
}

[role="button"] {
  cursor: pointer;
}

[aria-hidden="true"] {
  display: none !important;
}

/* Focus Styles */
button:focus, 
a:focus, 
input:focus, 
[tabindex]:focus {
  outline: 2px solid #2AFFF7;
  outline-offset: 2px;
}

.profile-pic-option:focus-visible {
  outline: 2px solid #2AFFF7;
  outline-offset: 2px;
}

/* Form fields */
input[type="text"],
input[type="email"],
input[type="password"] {
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(30, 30, 40, 0.6);
  border: 1px solid rgba(42, 255, 247, 0.3);
  color: #FFFFFF;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: rgba(42, 255, 247, 0.7);
  box-shadow: 0 0 8px rgba(42, 255, 247, 0.3);
}

/* --- Stable Profile Modal Layout Overrides (appended) -------------------- */
/* Goal: Provide predictable two-column desktop layout without negative offsets
   while keeping a clean single-column stack on narrow screens. */

/* Reset prior grid experiment – return to a single flowing column aesthetic */
.trinkaspace-modal .profile-form-landscape { display:flex; flex-direction:column; gap:2.25rem; }
@media (min-width:900px){
  /* Keep vertical but constrain width for better reading rhythm */
  .trinkaspace-modal .profile-form-landscape { max-width:1150px; }
}

/* Unified section cards */
.trinkaspace-modal .profile-form-landscape .form-group, 
.trinkaspace-modal .profile-form-landscape .profile-pic-container, 
.trinkaspace-modal .profile-form-landscape .pronouns-selector { 
  background: linear-gradient(145deg, rgba(20,22,28,.55), rgba(40,46,54,.35));
  border:1px solid rgba(42,255,247,.18);
  padding:1.1rem 1.25rem 1.25rem;
  border-radius:14px;
  position:relative;
  box-shadow:0 2px 6px -1px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
}
.trinkaspace-modal .profile-form-landscape .form-group:focus-within { border-color:rgba(42,255,247,.38); box-shadow:0 0 0 1px rgba(42,255,247,.35), 0 2px 10px -1px rgba(0,0,0,.65); }

/* Header grouping (avatar + name) */
.trinkaspace-modal .trinkaspace-modal-content .profile-form-header { display:flex; flex-direction:row; gap:2.25rem; align-items:flex-start; flex-wrap:wrap; }
/* Slight downward shift of the name form-group for better vertical alignment with avatar center */
.trinkaspace-modal .trinkaspace-modal-content .profile-form-header .form-group { margin-top: .65rem; }
@media (max-width:760px){ .trinkaspace-modal .trinkaspace-modal-content .profile-form-header { flex-direction:column; align-items:center; gap:1.5rem; } }

/* Name field card refinement */
.trinkaspace-modal #profile-username { background:rgba(0,0,0,.35); border:1px solid rgba(42,255,247,.25); }
.trinkaspace-modal #profile-username:focus { border-color:rgba(42,255,247,.6); box-shadow:0 0 0 1px rgba(42,255,247,.35); }

/* Avatar stage tightened */
.trinkaspace-modal .current-profile-header { background:linear-gradient(160deg, rgba(42,255,247,.07), rgba(42,255,247,.0)); padding:1rem 1.5rem 1.4rem; border-radius:16px; border:1px solid rgba(42,255,247,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.05); }
.trinkaspace-modal .current-profile-pic.super-avatar { width:230px; height:230px; }
@media (max-width:600px){ .trinkaspace-modal .current-profile-pic.super-avatar { width:200px; height:200px; } }

/* Avatar frame subtle glow */
.trinkaspace-modal .current-profile-pic.super-avatar .avatar-frame.super { box-shadow:0 0 0 2px rgba(42,255,247,.25), 0 0 16px -2px rgba(42,255,247,.35); background:radial-gradient(circle at 50% 40%, rgba(42,255,247,.18), rgba(0,0,0,.2)); }

/* Favorite orbit badges polish */
.trinkaspace-modal .current-profile-pic.super-avatar .fav-badge { backdrop-filter:blur(4px); background:rgba(20,24,28,.55); border:1px solid rgba(42,255,247,.35); }
.trinkaspace-modal .current-profile-pic.super-avatar .fav-badge img { filter:saturate(1.2) drop-shadow(0 0 4px rgba(42,255,247,.35)); }

/* Divider replaced by a soft glow line */
.trinkaspace-modal .profile-divider-line { height:2px; background:linear-gradient(90deg, rgba(42,255,247,0), rgba(42,255,247,.85), rgba(42,255,247,0)); border:none; margin: 0.25rem 0 0.75rem; box-shadow:0 0 8px -2px rgba(42,255,247,.55); opacity:.85; }

/* Picture pool panel refinement */
.trinkaspace-modal .profile-pic-container { background:linear-gradient(135deg, rgba(18,20,26,.75), rgba(30,36,44,.55)); }
.trinkaspace-modal .profile-pic-options { background:rgba(0,0,0,.28); border:1px solid rgba(42,255,247,.15); border-radius:10px; padding:12px; gap:12px; max-height:48vh; }

/* Cycle states: liked vs avatar */
.trinkaspace-modal .profile-pic-option { position:relative; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:8px 6px 10px; transition:.18s background, .18s transform, .18s border-color; }
.trinkaspace-modal .profile-pic-option:hover { background:rgba(255,255,255,.09); }
.trinkaspace-modal .profile-pic-option.liked { border-color:rgba(42,255,247,.55); box-shadow:0 0 0 1px rgba(42,255,247,.35); }
.trinkaspace-modal .profile-pic-option.selected-avatar { background:rgba(42,255,247,.18); border-color:rgba(255,255,255,.55); box-shadow:0 0 0 1px rgba(255,255,255,.35), 0 0 12px -2px rgba(42,255,247,.55); }
.trinkaspace-modal .profile-pic-option span { font-size:.7rem; letter-spacing:.25px; opacity:.85; }

/* Pronouns card modifications */
.trinkaspace-modal .pronouns-selector { background:linear-gradient(145deg, rgba(18,20,26,.55), rgba(30,36,44,.45)); border:1px solid rgba(42,255,247,.18); border-radius:14px; padding:1rem 1.1rem 1.25rem; }
.trinkaspace-modal .pronouns-options { background:rgba(255,255,255,.04); padding:.75rem .75rem .25rem; border-radius:10px; }
.trinkaspace-modal .pronoun-option { background:rgba(255,255,255,.06); padding:4px 6px; border-radius:8px; display:flex; align-items:center; gap:4px; font-size:.75rem; }
.trinkaspace-modal .pronoun-option:hover { background:rgba(42,255,247,.14); }

/* Custom pronouns field blend */
.trinkaspace-modal .custom-pronouns { background:rgba(0,0,0,.25); border:1px dashed rgba(42,255,247,.25); }
.trinkaspace-modal .custom-pronouns input { background:rgba(0,0,0,.45); }

/* Actions layout */
.trinkaspace-modal .form-actions[data-form-actions] { background:linear-gradient(90deg, rgba(42,255,247,.08), rgba(42,255,247,0)); padding: .75rem .5rem .5rem; margin-top:.25rem; border-radius:12px; }

/* Subtle entrance animation: scale & fade */
.trinkaspace-modal .trinkaspace-modal-content { animation: profileModalGlow .45s cubic-bezier(.22,.9,.3,1); }
@keyframes profileModalGlow { from { opacity:0; transform:translateY(14px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }

/* Super avatar stage scaled slightly smaller for narrow screens */
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar {
  width: 260px;
  height: 260px;
  max-width: 100%;
}
@media (max-width: 600px) {
  .trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar {
    width: 200px; height: 200px;
  }
}

/* Ensure scatter badges never force scrollbars */
.trinkaspace-modal .trinkaspace-modal-content .current-profile-pic.super-avatar .favorites-scatter {
  overflow: hidden;
}

/* Keep pronouns block from stretching awkwardly; allow internal wrapping */
.trinkaspace-modal .trinkaspace-modal-content .pronouns-selector {
  min-width: 0; /* allow grid to shrink */
}

/* Prevent horizontal scroll due to grid / badges interplay */
.trinkaspace-modal .trinkaspace-modal-content { overflow-x: hidden; }

/* Buttons row consistency if injected late */
.trinkaspace-modal .trinkaspace-modal-content .form-actions[data-form-actions] {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
}

/* Accessibility: ensure focus ring visible inside darker grid cells */
.trinkaspace-modal .trinkaspace-modal-content .profile-pic-option:focus-visible {
  outline: 2px solid var(--neoncyan, #2AFFF7);
  outline-offset: 2px;
}

/* Reduce risk of layout shift when scrollbar appears: reserve space subtly */
@supports (scrollbar-gutter: stable) {
  .trinkaspace-modal .trinkaspace-modal-content { scrollbar-gutter: stable both-edges; }
}

