/* =========================================================
   Phones — mockups recreados en HTML/CSS (sin imágenes)
   Replican los widgets reales de la app TikBoosTTS.
   ========================================================= */

.phone {
  --phone-w: 280px;
  --phone-radius: 38px;
  --bezel: 8px;

  position: relative;
  width: var(--phone-w);
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(160deg, #1a1a1c 0%, #0a0a0c 100%);
  border-radius: var(--phone-radius);
  padding: var(--bezel);
  box-shadow:
    0 0 0 1.5px #2a2a2e inset,
    0 0 0 3px #050507,
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(254, 44, 85, 0.18);
  user-select: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--phone-radius) - var(--bezel));
  overflow: hidden;
  background: #0a0418;
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
}

/* Punch-hole camera */
.phone::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #050505;
  box-shadow: inset 0 0 0 1px #1d1d22;
  z-index: 5;
}

/* Status bar */
.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  flex-shrink: 0;
}
.ph-status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}
.ph-status-icons svg { width: 11px; height: 11px; }

/* App bar */
.ph-appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 10px;
  flex-shrink: 0;
}
.ph-appbar-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B2BE2, #FE2C55);
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.ph-appbar-title {
  flex: 1;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.01em;
}
.ph-appbar-title .accent {
  background: linear-gradient(135deg, #FE2C55, #FF5C8A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ph-appbar-icons {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
}
.ph-appbar-icons svg { width: 13px; height: 13px; opacity: 0.6; }

/* Body wrapper */
.ph-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  gap: 8px;
  overflow: hidden;
}

/* Inputs */
.ph-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}
.ph-input.with-at::before {
  content: "@ ";
  color: rgba(255,255,255,0.4);
}

/* Connect button (verde) */
.ph-btn-connect {
  background: linear-gradient(180deg, #1f6f3a, #14502a);
  color: rgba(255,255,255,0.85);
  border-radius: 10px;
  padding: 9px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ph-btn-disconnect {
  background: linear-gradient(180deg, #e34452, #c62a36);
  color: #fff;
  border-radius: 10px;
  padding: 9px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ph-btn-connect svg,
.ph-btn-disconnect svg { width: 12px; height: 12px; }

/* Tabs */
.ph-tabs {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  margin: 4px -14px 6px;
  padding: 0 14px;
}
.ph-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.5);
  font-size: 9px;
  font-weight: 600;
}
.ph-tab svg { width: 14px; height: 14px; }
.ph-tab.active {
  color: #fff;
}
.ph-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: #FE2C55;
  border-radius: 2px;
}

/* Setting row con toggle */
.ph-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ph-row-icon {
  width: 22px;
  display: grid;
  place-items: center;
  color: #FE2C55;
}
.ph-row-icon svg { width: 16px; height: 16px; }
.ph-row-icon.success { color: #2EE07A; }
.ph-row-icon.muted { color: rgba(255,255,255,0.4); }
.ph-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ph-row-title { font-size: 11px; font-weight: 600; }
.ph-row-sub   { font-size: 9px;  color: rgba(255,255,255,0.45); margin-top: 1px; }
.ph-row-value { font-size: 11px; color: rgba(255,255,255,0.7); }
.ph-row-chevron { color: rgba(255,255,255,0.3); }
.ph-row-chevron svg { width: 12px; height: 12px; }

/* Toggle */
.ph-toggle {
  width: 30px; height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
}
.ph-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.ph-toggle.on { background: #FE2C55; }
.ph-toggle.on::after { left: 14px; }

/* Dropdown / select */
.ph-select {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.ph-select::after {
  content: "";
  margin-left: auto;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,0.4);
}
.ph-select-label {
  position: absolute;
  top: -6px; left: 8px;
  background: #0a0418;
  padding: 0 4px;
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* Slider */
.ph-slider {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ph-slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
}
.ph-slider-head strong { color: #fff; font-weight: 600; }
.ph-slider-track {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  position: relative;
}
.ph-slider-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: #FE2C55;
  border-radius: 999px;
}
.ph-slider-thumb {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #FE2C55;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(254,44,85,0.18);
}

/* Welcome screen */
.ph-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  gap: 14px;
}
.ph-welcome-blob {
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,244,238,0.25), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.ph-mic {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FE2C55, #8B2BE2);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 6px rgba(254,44,85,0.12),
    0 12px 30px rgba(254,44,85,0.45);
  animation: phPulse 2.4s ease-in-out infinite;
  z-index: 1;
}
.ph-mic svg { width: 28px; height: 28px; color: #fff; }
@keyframes phPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(254,44,85,0.12), 0 12px 30px rgba(254,44,85,0.45); }
  50%      { box-shadow: 0 0 0 14px rgba(254,44,85,0.05), 0 12px 30px rgba(254,44,85,0.6); }
}
.ph-welcome h2 {
  font-size: 22px;
  font-weight: 800;
  font-style: italic;
  margin: 0;
  z-index: 1;
}
.ph-welcome h2 .accent {
  background: linear-gradient(135deg, #FE2C55, #FF5C8A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ph-welcome p {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin: 0;
  z-index: 1;
}

/* Chat list */
.ph-chat {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ph-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #2EE07A;
  font-weight: 600;
  padding: 4px 0;
}
.ph-chat-status .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2EE07A;
  box-shadow: 0 0 6px #2EE07A;
}
.ph-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  animation: phSlideUp .4s ease forwards;
  opacity: 0;
}
@keyframes phSlideUp {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.ph-msg-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.ph-msg-body { flex: 1; min-width: 0; }
.ph-msg-name {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}
.ph-msg-time {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
  margin-left: 4px;
  font-weight: 500;
}
.ph-msg-text {
  font-size: 10px;
  color: rgba(255,255,255,0.78);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TikTok LIVE pill (esquina) */
.ph-live-pill {
  position: absolute;
  top: 12px; right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: #FE2C55;
  font-weight: 800;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  letter-spacing: 0.05em;
}
.ph-live-pill .led {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #FE2C55;
}

/* Format hint */
.ph-format-hint {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  text-decoration: line-through;
}

/* Wave icon background */
.ph-wave {
  display: inline-flex;
  gap: 1.5px;
  align-items: center;
  height: 12px;
}
.ph-wave i {
  display: block;
  width: 2px;
  background: #2EE07A;
  border-radius: 1px;
  animation: phWave 1.2s ease-in-out infinite;
}
.ph-wave i:nth-child(1) { height: 4px;  animation-delay: 0s; }
.ph-wave i:nth-child(2) { height: 8px;  animation-delay: 0.15s; }
.ph-wave i:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.ph-wave i:nth-child(4) { height: 6px;  animation-delay: 0.45s; }
.ph-wave i:nth-child(5) { height: 10px; animation-delay: 0.6s; }
@keyframes phWave {
  0%, 100% { transform: scaleY(0.6); }
  50%      { transform: scaleY(1.3); }
}

/* Carousel slides son ahora contenedores de phones, no imgs */
.slide.is-phone {
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  aspect-ratio: 9/19;
  padding: 6px 0;
}
.slide.is-phone .phone {
  --phone-w: clamp(220px, 70%, 280px);
}

/* "Cómo funciona" — el contenedor how-media también aloja un phone */
.how-media.is-phone {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: grid;
  place-items: center;
  aspect-ratio: auto;
  height: auto;
  padding: 8px 0 4px;
  overflow: visible;
}
.how-media.is-phone .phone {
  --phone-w: 215px;
}

/* Hero phones override - ya tienen wrapper .phone-mock */
.phone-mock.is-phone {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
  padding: 0;
  width: auto;        /* deja que el .phone interno marque el ancho */
}
.hero-art .phone-mock.is-phone .phone {
  --phone-w: clamp(240px, 26vw, 320px);
}
.hero-art .phone-mock.phone-mock-back.is-phone .phone {
  --phone-w: clamp(190px, 22vw, 260px);
}

/* Section title (separadores en pantallas) */
.ph-section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  padding-bottom: 2px;
}

/* Filas de regalo (con thumbnail) */
.ph-gift-row .ph-gift-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254,44,85,0.3), transparent 70%);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ph-gift-row .ph-gift-thumb img {
  width: 22px; height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* CTA Agregar regalo */
.ph-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  margin-top: 4px;
  border: 1px dashed rgba(254,44,85,0.4);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* Variantes de tamaño */
.phone--sm { --phone-w: 220px; }
.phone--lg { --phone-w: 320px; }

/* Responsive */
@media (max-width: 480px) {
  .phone { --phone-w: 240px; }
}
