@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body {
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  background-color: white;
}

* {
  scroll-margin-top: 170px;
}

.header-shadow {
  box-shadow: -1px 10px 24px -10px rgba(15, 15, 15, 0.75);
  -webkit-box-shadow: -1px 10px 24px -10px rgba(15, 15, 15, 0.75);
  -moz-box-shadow: -1px 10px 24px -10px rgba(15, 15, 15, 0.75);
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

h1 {
  color: #0f0f0f;
  font-size: 22px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0%;
  text-transform: capitalize;
}

h2 {
  color: #0f0f0f;
  font-size: 20px;
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0%;
  text-transform: uppercase;
}

h3 {
  color: #0f0f0f;
  font-size: 18px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0%;
}

p {
  color: #5d5d5d;
  font-size: 16px;
  font-style: normal;
  letter-spacing: 0%;
}

.small-text {
  color: #5d5d5d;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0%;
}

.patro-text {
  color: #999999;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  font-optical-sizing: auto;
  font-size: 12px;
}

.topic-container {
  color: #0f0f0f;
  background-color: #d1d1d1;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
}

@media (min-width: 768px) {
  h1 {
    font-size: 26px;
    line-height: 32px;
  }
  h2 {
    font-size: 24px;
    line-height: 28px;
  }
  h3 {
    font-size: 20px;
    line-height: 28px;
  }
  p {
    font-size: 18px;
    line-height: 28px;
  }
  .small-text {
    font-size: 14px;
    line-height: 100%;
  }
}

ul {
  list-style-type: disc;
  list-style-position: outside;
  margin-left: 1.5em;
  padding-left: 0;
}

ul li {
  margin: 0.75em 0;
  padding-left: 0.5em;
  text-indent: 0;
}

/* ============== Las Kalacas ============== */

@keyframes sk-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Overlay base (full-screen por defecto) */
#app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: grid;
  place-items: start center;
  padding: 16px;
  overflow-y: auto;
  padding-top: 230px;
}
#app-loader.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* Bloques "skeleton" */
.sk-block {
  border-radius: 10px;
  background: linear-gradient(90deg, #eee 25%, #f6f6f6 37%, #eee 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.2s linear infinite;
}

/* Layout del overlay */
#app-loader .wrap {
  width: 100%;
  max-width: 72rem;
}
#app-loader .hero {
  height: 240px;
  margin: 12px 0;
}
#app-loader .grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 16px 0 8px;
}
#app-loader .card {
  height: 180px;
}

/* Breakpoints */
@media (min-width: 768px) {
  #app-loader .hero {
    height: 300px;
  }
  #app-loader .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #app-loader .card {
    height: 200px;
  }
}
@media (min-width: 1024px) {
  #app-loader .hero {
    height: 360px;
  }
  #app-loader .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  #app-loader .card {
    height: 220px;
  }
}

/* Accesibilidad: menos animación si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .sk-block {
    animation: none;
  }
}

/* ===== Modo contenedor: overlay solo sobre <main> ===== */
#app-main {
  position: relative;
}

#app-main > #app-loader.as-child {
  position: absolute; /* se posiciona dentro del main */
  inset: 0;
  z-index: 30; /* suficiente para cubrir el contenido del main */
}

/* ===== Suavizado de imágenes (lo que ya habías agregado) ===== */
img {
  transition: opacity 0.3s ease;
}
img:not([src]),
img[src=''] {
  opacity: 0;
} /* por si algún src queda vacío */

/* ============== Colores de topics ============== */
.internacional-color {
  color: white;
  background-color: #3b76f6;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

.latam-color {
  color: white;
  background-color: #22c55e;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

.finanzas-color {
  color: white;
  background-color: #877829;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

.negocios-color {
  color: white;
  background-color: #ec4751;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

.cripto-color {
  color: white;
  background-color: #f17d1e;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

.valores-color {
  color: white;
  background-color: #8075ff;
  padding: 4px 12px;
  text-transform: uppercase;
  width: fit-content;
  border-radius: 3px;
  font-weight: 500;
}

/* ============== Colores de comentarios PP ============== */
.comment-pp-1 {
  background-color: #fde2e4;
  color: #e63946;
}

.comment-pp-2 {
  background-color: #e0f7fa;
  color: #00796b;
}

.comment-pp-3 {
  background-color: #fff3b0;
  color: #f6aa1c;
}

.comment-pp-4 {
  background-color: #e6e6fa;
  color: #6a5acd;
}

.comment-pp-5 {
  background-color: #e3f2fd;
  color: #1565c0;
}

.comment-pp-6 {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.comment-pp-7 {
  background-color: #fff0f5;
  color: #9c27b0;
}

.comment-pp-8 {
  background-color: #faf3e0;
  color: #8d6e63;
}

.comment-pp-9 {
  background-color: #f1f8e9;
  color: #558b2f;
}

.comment-pp-10 {
  background-color: #f3e5f5;
  color: #7b1fa2;
}
