/* ===== PANTALLA "TU RED" ===== */

.red-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  z-index: 50;
}

.red-screen.active {
  display: flex;
}

/* Tabs fijos */
.red-tabs {
  position: sticky;
  top: 0;
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--borde);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 10;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.red-tabs::-webkit-scrollbar {
  display: none;
}

.red-tab {
  flex: 1;
  min-width: max-content;
  padding: 14px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gris);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.red-tab.active {
  color: var(--azul);
  font-weight: 600;
}

.red-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--azul);
  border-radius: 3px 3px 0 0;
}

/* Contenido scrolleable */
.red-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom) + 8px);
}

.red-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

/* ===== Tarjeta de persona (compartida en varias tabs) ===== */
.red-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--borde);
}

.red-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b3b8f, #1e5fd6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
}

.red-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.red-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.red-name {
  font-weight: 600;
  font-size: 15px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.red-username {
  font-size: 13px;
  color: var(--gris);
  margin-top: 2px;
}

.red-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.red-bio {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.red-action {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--azul);
  color: #fff;
  transition: all 0.2s;
  flex-shrink: 0;
}

.red-action.outline {
  background: #fff;
  border: 1px solid var(--azul);
  color: var(--azul);
}

.red-action.sent,
.red-action.following {
  background: #e5e7eb;
  color: var(--gris);
  border: none;
}

.red-action:hover {
  opacity: 0.9;
}

/* ===== TAB: Buscar ===== */
.red-search-box {
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--borde);
  position: sticky;
  top: 0;
  z-index: 5;
}

.red-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  font-size: 15px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.red-search-input:focus {
  border-color: var(--azul);
}

.red-search-hint {
  padding: 24px;
  text-align: center;
  color: var(--gris);
  font-size: 14px;
}

/* ===== Estados vacíos ===== */
.red-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gris);
}

.red-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.red-empty p {
  font-size: 14px;
  line-height: 1.5;
}
