/* Mi Bebé · estilos custom — complementan Tailwind CDN */

* { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: contain; }

/* Vistas */
.view { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

/* Bottom nav activo */
.nav-btn.active { color: #ec4899; }
.nav-btn.active i { transform: scale(1.15); }

/* Tabs perfil */
.profile-tab.active {
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: #fff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, .35);
}
.profile-tab:not(.active) { color: #6b7280; }

/* Tarjeta perfil grid (home) */
.profile-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.profile-card:active { transform: scale(.96); }
.profile-card:hover { box-shadow: 0 6px 18px rgba(236, 72, 153, .2); }
.profile-card img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 50%);
  display: flex; align-items: flex-end; padding: 8px;
}
.profile-card .overlay p {
  color: #fff; font-weight: 700; font-size: 13px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* Galería fotos perfil */
.gallery-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  position: relative;
  cursor: pointer;
}
.gallery-item img { width:100%; height:100%; object-fit:cover; }
.gallery-item .del-btn {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.gallery-item:hover .del-btn,
.gallery-item:active .del-btn { opacity: 1; }

/* Slot horario tomas */
.feed-slot {
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
}
.feed-slot:hover { border-color: #f9a8d4; }
.feed-slot.active {
  border-color: #ec4899;
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  color: #be185d;
  box-shadow: 0 2px 6px rgba(236,72,153,.15);
}

/* Botones de sonido alarma */
.alarm-sound-btn { background: #fff; transition: all .15s; }
.alarm-sound-btn:hover { transform: translateY(-1px); }
.alarm-sound-btn.active {
  border-color: #ec4899 !important;
  background: linear-gradient(135deg, #fdf2f8, #fce7f3) !important;
  box-shadow: 0 2px 8px rgba(236,72,153,.2);
}

/* Slot horario baños */
.bath-slot {
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
}
.bath-slot:hover { border-color: #93c5fd; }
.bath-slot.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(59,130,246,.15);
}

/* Botones de sonido baño */
.bath-sound-btn { background: #fff; transition: all .15s; }
.bath-sound-btn:hover { transform: translateY(-1px); }
.bath-sound-btn.active {
  border-color: #3b82f6 !important;
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  box-shadow: 0 2px 8px rgba(59,130,246,.2);
  color: #1d4ed8;
}

/* Tip cards */
.tip-cat-btn.active {
  background: linear-gradient(135deg, #ec4899, #a855f7) !important;
  color: #fff;
}
.tip-cat-btn.active p { color: #fff !important; }
.tip-cat-btn.active .w-10 { background: rgba(255,255,255,.25) !important; }
.tip-cat-btn.active .w-10 i { color: #fff !important; }

.tip-result {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.tip-result:active { transform: scale(.98); }
.tip-result:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.tip-result .yt-thumb {
  width: 110px; min-width: 110px; aspect-ratio: 16/9;
  border-radius: 10px;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.tip-result .yt-thumb img { width:100%; height:100%; object-fit:cover; }
.tip-result .yt-thumb .play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); color: #fff; font-size: 22px;
}

/* Wardrobe */
.wardrobe-filter {
  border-color: #e5e7eb;
  background: #fff;
  color: #6b7280;
  white-space: nowrap;
}
.wardrobe-filter.active {
  border-color: #a855f7;
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  color: #7e22ce;
}

.wardrobe-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  position: relative;
}
.wardrobe-card .img-wrap {
  aspect-ratio: 1;
  background: #f9fafb;
  overflow: hidden;
}
.wardrobe-card .img-wrap img { width:100%; height:100%; object-fit:cover; }
.wardrobe-card .info { padding: 8px; }
.wardrobe-card .info p { font-size: 11px; line-height: 1.3; }
.wardrobe-card .cat-tag {
  font-size: 10px; padding: 2px 6px; border-radius: 99px;
  background: #f3e8ff; color: #7e22ce; font-weight: 600;
  display: inline-block;
}
.wardrobe-card .del-btn {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* Outfit recomendación */
.outfit-look-card {
  background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
  border: 2px solid #fce7f3;
  border-radius: 18px;
  padding: 14px;
}
.outfit-piece {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.outfit-piece img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.outfit-piece .ph {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg,#fce7f3,#f3e8ff);
  display:flex;align-items:center;justify-content:center;
  color:#a855f7;
}

/* Toast animation */
#toast.show {
  display: block !important;
  animation: toastIn .25s ease-out, toastOut .3s ease-in 2.7s forwards;
}
@keyframes toastIn { from{opacity:0;transform:translate(-50%,12px)} to{opacity:1;transform:translate(-50%,0)} }
@keyframes toastOut { to{opacity:0;transform:translate(-50%,12px)} }

/* Spinner */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid #fce7f3;
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* iOS safe areas */
@supports (padding: max(0px)) {
  body { padding-bottom: max(96px, env(safe-area-inset-bottom)); }
  nav.fixed { padding-bottom: env(safe-area-inset-bottom); }
}
