/* ── Container left (div1) ───────────────────────────────────── */
/* Sits permanently inside #app-shell at position left:0.        */
/* container-center slides right to expose it.                   */
#container-left {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  max-width: 100%;
  background: var(--surface1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1; /* behind container-center (2) — revealed by sliding center right */
  transition: all 0.35s;
}

#container-left .safe-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgb(0, 255, 191); /*test color*/
  overflow-x: hidden;
  overflow-y: visible;
}

/* ── Profile bubble — anchored to bottom of container-left ──── */
#profile-bub-wrap {
  position: absolute;
  height: fit-content;
  width: 100%;
  bottom: 6px;
  left: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 0;
  background: rgb(221, 160, 160);
  z-index: 1;
  overflow: visible;
}
#profile-bub {
  margin: 0rem 1rem 0rem 1rem;
  display: flex;
  flex-direction: column;
  background: rgb(32, 32, 31);
  border-width: 1.11111px;
  border-radius: var(--radius-xl) 16px 16px var(--radius-xl);
  border-color: color(srgb 1 1 1 / 0.1);
}
#profile-bub-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  min-height: 55px;
}


/* Left side: avatar + name — tappable, opens own profile card */
.pb-profile-btn {
  max-width: 80%;
  min-width: 0;
  height: 53px;
  padding: 0;
  display: flex;
  align-items: center;
  text-align: left;
  flex: 1;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  transition: background 0.12s;
}
.pb-profile-btn:hover { background: rgba(255,255,255,0.04); }

.pb-avatar {
  position: absolute;
  height: 60px;
  width: 60px;
  left: 0.75rem;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface3);
  border-radius: 50%;
  overflow: hidden;
}
.pb-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pb-info {
  min-width: 0;
  padding-left: calc(0.75rem + 60px);
  display: flex;
  flex-direction: column;
}
.pb-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right side: settings gear button */
.pb-settings-btn {
  height: 53px;
  width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--muted);
  background: none;
  border: none;
  border-left: 1px solid var(--border-md);
  transition: background 0.12s, color 0.12s;
}
.pb-settings-btn:hover { background: rgba(255,255,255,0.04); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   User card — content styles (wrapper/sheet/backdrop via .kofi-card)
   ═══════════════════════════════════════════════════════════════ */

/* Content padding and alignment for user-card sheet */
#user-card-sheet {
  align-items: center;
  gap: 0.75rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Avatar */
#uc-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
#uc-avatar-wrap {
  position: relative;
  width: 88px; height: 88px;
}
.uc-avatar-preview {
  width: 100%; height: 100%;
  border-radius: var(--radius-xl);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl); font-weight: 700;
  color: var(--text); text-transform: uppercase;
  overflow: hidden;
}
.uc-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.uc-avatar-edit {
  position: absolute;
  bottom: -6px; right: -6px;
  width: 26px; height: 26px;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--bg);
  transition: background 0.12s;
}
.uc-avatar-edit:hover { background: var(--accent-dk); }

.uc-avatar-remove {
  font-size: var(--text-xs); color: var(--muted);
  background: none; border: none; cursor: pointer;
  font-family: var(--font); padding: 0;
  transition: color 0.1s;
}
.uc-avatar-remove:hover { color: var(--accent); }

/* Name */
#uc-name-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}
.uc-name-static {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
#uc-name-edit-row {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}
.uc-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.12s;
  min-width: 0;
}
.uc-input:focus        { border-color: var(--accent); }
.uc-input::placeholder { color: var(--muted); }

.uc-btn-primary {
  padding: 0.6rem 1rem;
  background: var(--accent);
  border: none; border-radius: var(--radius-md);
  color: var(--bg);
  font-size: var(--text-base); font-weight: 700;
  font-family: var(--font);
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s; flex-shrink: 0;
}
.uc-btn-primary:hover { background: var(--accent-dk); }
.uc-error {
  font-size: var(--text-xs); color: var(--accent);
  min-height: 1em; text-align: center;
}

/* UID badge */
.uc-uid {
  font-size: var(--text-xs); color: var(--muted);
  letter-spacing: 0.08em; font-family: var(--mono);
  padding: 0.15rem 0.5rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-full);
  user-select: all;
}

/* Aliases (own card only) */
#uc-aliases-section {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.uc-section-label {
  font-size: var(--text-sm); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 0.4rem;
}
.uc-section-label-sub { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: var(--text-sm); }
.uc-aliases-list { display: flex; flex-direction: column; gap: 0.2rem; }
.uc-alias-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.5rem; border-radius: var(--radius-md);
  cursor: pointer; transition: background 0.1s;
}
.uc-alias-row:hover       { background: rgba(255,255,255,0.04); }
.uc-alias-row.active      { background: rgba(224,122,95,0.1); }
.uc-alias-dot             { width: 6px; height: 6px; background: var(--muted); flex-shrink: 0; border-radius: 50%; }
.uc-alias-row.active .uc-alias-dot { background: var(--accent); }
.uc-alias-name            { font-size: var(--text-base); color: var(--text); flex: 1; }
.uc-alias-row.active .uc-alias-name { color: var(--accent); font-weight: 600; }
.uc-alias-badge {
  font-size: var(--text-xs); color: var(--muted);
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.35rem; border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

/* Close / done button */
.uc-close-btn {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.6rem;
  background: var(--surface2);
  border: none; border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: var(--text-base); font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.uc-close-btn:hover { background: var(--surface3); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   Settings card — content styles (wrapper/sheet/backdrop via .kofi-card)
   ═══════════════════════════════════════════════════════════════ */

/* Content padding for settings-card sheet */
#settings-card-sheet {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  gap: 0;
}

/* Section */
.sc-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.sc-section:first-of-type { padding-top: 0; }
.sc-section--actions { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.sc-section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.sc-input {
  background: var(--surface2);
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.12s;
  width: 100%;
  box-sizing: border-box;
}
.sc-input:focus        { border-color: var(--accent); }
.sc-input::placeholder { color: var(--muted); }

.sc-btn-primary {
  align-self: flex-start;
  padding: 0.6rem 1rem;
  background: var(--accent);
  border: none; border-radius: var(--radius-md);
  color: var(--bg);
  font-size: var(--text-base); font-weight: 700;
  font-family: var(--font); cursor: pointer;
  transition: background 0.12s;
}
.sc-btn-primary:hover { background: var(--accent-dk); }

.sc-error {
  font-size: var(--text-xs); color: var(--accent); min-height: 1em;
}

.sc-btn-danger {
  padding: 0.6rem 1rem;
  background: none;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: var(--text-base); font-family: var(--font); cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.sc-btn-danger:hover { border-color: var(--danger); color: var(--danger); }

.sc-btn-muted {
  padding: 0.6rem 1rem;
  background: none;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: var(--text-base); font-family: var(--font); cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.sc-btn-muted:hover { color: var(--text); }

/* ── Settings slider row ─────────────────────────────────────────────────── */
.sc-slider-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.sc-slider-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sc-slider-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
  outline: none;
  cursor: pointer;
  /* Filled portion driven via JS background-image update */
}
.sc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  transition: transform 0.12s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.sc-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}
.sc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.sc-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
}
.sc-slider-value {
  font-size: var(--text-xs);
  font-family: var(--mono);
  color: var(--accent);
  min-width: 3.8rem;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Version row */
.sc-version {
  padding: 0.75rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-version-text {
  font-size: var(--text-xs);
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* Close button */
.sc-close-btn {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.6rem;
  background: var(--surface2);
  border: none; border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: var(--text-base); font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sc-close-btn:hover { background: var(--surface3); color: var(--text); }

/* ── Settings toggle row ─────────────────────────────────────────────────── */
.sc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sc-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.sc-toggle-label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}
.sc-toggle-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.4;
}

/* Pill switch */
.sc-toggle {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  border: none;
  background: var(--surface3);
  cursor: pointer;
  padding: 3px;
  position: relative;
  transition: background 0.2s ease;
  outline: none;
}
.sc-toggle[aria-checked="true"] {
  background: var(--accent);
}
.sc-toggle-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
  pointer-events: none;
}
.sc-toggle[aria-checked="true"] .sc-toggle-thumb {
  transform: translateX(18px);
  background: var(--bg);
}
