/* PlantillasYA v2 — Custom CSS */
/* Tailwind CDN maneja la mayor parte — aquí solo complementos */

html[data-theme='light'] {
  color-scheme: light;
}

html[data-theme='dark'] {
  color-scheme: dark;
}

.search-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-backdrop {
  opacity: 0;
  transition: opacity 180ms ease;
}

.search-modal.is-open .search-modal-backdrop {
  opacity: 1;
}

.search-modal-panel {
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: transform 220ms ease, opacity 180ms ease;
}

.search-modal.is-open .search-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.search-modal-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: inherit;
}

.search-modal .bg-white\/3 {
  background-color: rgba(255, 255, 255, 0.03);
}

.search-modal .bg-white\/7 {
  background-color: rgba(255, 255, 255, 0.07);
}

.search-modal .border-white\/8 {
  border-color: rgba(255, 255, 255, 0.08);
}

.search-modal .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1);
}

.search-modal .text-brand-300 { color: #a5b4fc !important; }
.search-modal .text-accent-300 { color: #fdba74 !important; }

@media (prefers-reduced-motion: reduce) {
  .search-modal,
  .search-modal-backdrop,
  .search-modal-panel {
    transition: none;
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #4f46e5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Selection color */
::selection { background: rgba(99,102,241,.3); color: #fff; }

html[data-theme='light'] ::selection { background: rgba(37, 99, 235, .18); color: #0f172a; }

/* Image lazy */
img { transition: opacity .3s ease; }
img[loading] { opacity: 0; }
img.loaded { opacity: 1; }

/* Focus ring accesible */
*:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 4px;
}
