/* =============================================
   components.css — Buttons, Inputs, Avatars, Badges, Toggles
   ============================================= */

/* ── Buttons ── */

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0080ff, #0050cc);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,100,255,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(0,100,255,0.45);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px solid rgba(0,120,255,0.4);
  color: #4db8ff;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-outline:hover {
  background: rgba(0,120,255,0.12);
}
.btn-outline.small {
  width: auto;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-new,
.btn-create-group,
.btn-add {
  background: linear-gradient(135deg, #0080ff, #0050cc);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
}

/* ── Sheet input ── */

.sheet-input {
  display: flex;
  align-items: center;
  background: rgba(0,50,120,0.3);
  border: 1.5px solid rgba(0,120,255,0.4);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 10px;
}
.sheet-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 15px;
}
.sheet-input input::placeholder {
  color: rgba(255,255,255,0.35);
}

/* ── Avatars ── */

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(0,100,220,0.4);
  background: linear-gradient(135deg, #1a3a6a, #0d1f3c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #4db8ff;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

/* ── Badges ── */

.unread-badge,
.unread-count {
  background: #0070ff;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(0,100,255,0.5);
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
  display: inline-block;
}

/* ── Toggle ── */

.toggle {
  width: 44px;
  height: 24px;
  background: rgba(0,100,255,0.4);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle.on { background: #0070ff; }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s;
}
.toggle.on::after { transform: translateX(20px); }

/* ── Search result rows ── */

.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,100,255,0.1);
  transition: background 0.2s;
}
.search-row:hover {
  background: rgba(0,80,200,0.12);
}

.search-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a6a, #0d1f3c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #4db8ff;
  flex-shrink: 0;
}

.search-name {
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-id {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  font-family: 'Courier New', monospace;
}

.search-empty {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 13px;
  padding: 24px 0;
}
