/* =====================================================================
 * Adscreen - hoja de estilos local
 * Sustituye a cdn.tailwindcss.com (2026-07-30)
 *
 * Motivo del cambio: el CDN de Tailwind es un COMPILADOR que corre en el
 * navegador. Requiere internet en cada carga, retrasa el primer pintado y
 * si la red falla el panel aparece sin ningun estilo. Aqui estan solo las
 * ~160 utilidades que el proyecto usa realmente, con los valores exactos
 * de Tailwind v3, ya compiladas.
 * ===================================================================== */

/* ---------- Reset ---------- */
*, ::before, ::after { box-sizing: border-box; border: 0 solid #e5e7eb; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; }
body { line-height: inherit; }
h1,h2,h3,h4,h5,h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button, [type="button"], [type="submit"] { -webkit-appearance: button; background-color: transparent; background-image: none; cursor: pointer; }
table { border-collapse: collapse; }

/* ---------- Layout ---------- */
.block { display: block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-2 { top: .5rem; }
.left-2 { left: .5rem; }
.z-10 { z-index: 10; }
.overflow-hidden { overflow: hidden; }
.min-h-screen { min-height: 100vh; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.max-w-7xl { max-width: 80rem; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0,1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.col-span-full { grid-column: 1 / -1; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ---------- Espaciado ---------- */
.p-2 { padding: .5rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.ml-2 { margin-left: .5rem; } .ml-3 { margin-left: .75rem; } .ml-4 { margin-left: 1rem; }
.mr-2 { margin-right: .5rem; } .mr-4 { margin-right: 1rem; }

/* space-* : margen entre hermanos, como en Tailwind */
.space-x-3 > * + * { margin-left: .75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.-space-y-px > * + * { margin-top: -1px; }
.divide-y > * + * { border-top-width: 1px; }
.divide-gray-200 > * + * { border-color: #e5e7eb; }

/* ---------- Tamanos ---------- */
.w-4 { width: 1rem; } .w-5 { width: 1.25rem; } .w-8 { width: 2rem; }
.w-10 { width: 2.5rem; } .w-12 { width: 3rem; } .w-24 { width: 6rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; } .h-5 { height: 1.25rem; } .h-8 { height: 2rem; }
.h-10 { height: 2.5rem; } .h-12 { height: 3rem; } .h-16 { height: 4rem; }
.h-24 { height: 6rem; } .h-full { height: 100%; }

/* ---------- Tipografia ---------- */
.text-xs  { font-size: .75rem;   line-height: 1rem; }
.text-sm  { font-size: .875rem;  line-height: 1.25rem; }
.text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.leading-4 { line-height: 1rem; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Colores de texto ---------- */
.text-white { color: #fff; }
.text-gray-400 { color: #9ca3af; } .text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; } .text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-indigo-600 { color: #4f46e5; } .text-indigo-700 { color: #4338ca; }
.text-red-500 { color: #ef4444; } .text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; } .text-red-800 { color: #991b1b; }
.text-green-700 { color: #15803d; } .text-green-800 { color: #166534; }
.text-purple-800 { color: #6b21a8; }

/* ---------- Fondos ---------- */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-red-100 { background-color: #fee2e2; }
.bg-green-100 { background-color: #dcfce7; }
.bg-purple-100 { background-color: #f3e8ff; }

/* ---------- Bordes ---------- */
.border { border-width: 1px; }
.border-transparent { border-color: transparent; }
.border-gray-300 { border-color: #d1d5db; }
.border-red-300 { border-color: #fca5a5; }
.border-red-400 { border-color: #f87171; }
.border-green-400 { border-color: #4ade80; }
.rounded { border-radius: .25rem; }
.rounded-md { border-radius: .375rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-none { border-radius: 0; }
.rounded-t-md { border-top-left-radius: .375rem; border-top-right-radius: .375rem; }
.rounded-b-md { border-bottom-left-radius: .375rem; border-bottom-right-radius: .375rem; }

/* ---------- Sombras ---------- */
.shadow    { box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }

/* ---------- Objetos y utilidades ---------- */
.object-cover { object-fit: cover; }
.appearance-none { -webkit-appearance: none; appearance: none; }
.placeholder-gray-500::placeholder { color: #6b7280; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* aspect-ratio 16:9 (plugin @tailwindcss/aspect-ratio) */
.aspect-w-16 { position: relative; padding-bottom: 56.25%; width: 100%; }
.aspect-w-16 > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ---------- Estados ---------- */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:text-indigo-500:hover { color: #6366f1; }
.hover\:text-indigo-900:hover { color: #312e81; }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:text-red-900:hover { color: #7f1d1d; }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-indigo-500:focus { border-color: #6366f1; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
.focus\:ring-indigo-500:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
.focus\:z-10:focus { z-index: 10; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .sm\:flex { display: flex; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .sm\:justify-between { justify-content: space-between; }
    .sm\:mt-0 { margin-top: 0; }
    .sm\:px-0 { padding-left: 0; padding-right: 0; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:rounded-md { border-radius: .375rem; }
    .sm\:rounded-lg { border-radius: .5rem; }
    .sm\:text-sm { font-size: .875rem; line-height: 1.25rem; }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ---------- Estilos propios de Adscreen ---------- */
/* Avisos de compatibilidad SmartTV en la ficha de cada medio */
.compat { display: inline-flex; align-items: center; gap: .35rem;
          padding: .125rem .5rem; border-radius: 9999px;
          font-size: .75rem; font-weight: 500; }
.compat-ok   { background: #dcfce7; color: #166534; }
.compat-warn { background: #fef3c7; color: #92400e; }
.compat-bad  { background: #fee2e2; color: #991b1b; }

/* Arrastrar y soltar en el editor de playlists */
.drag-item { cursor: grab; transition: background-color .15s, box-shadow .15s; }
.drag-item:active { cursor: grabbing; }
.drag-item.dragging { opacity: .45; }
.drag-item.drop-target { box-shadow: inset 0 3px 0 0 #4f46e5; }
.drag-handle { color: #9ca3af; cursor: grab; -webkit-user-select: none; user-select: none; }
.drag-handle:hover { color: #4b5563; }
