/* ══════════════════════════════════════════════════════════════════
   DISCOVERY OF DAY — "Heladería del Día"
   Componente sidebar: heladería destacada diaria + artículo relacionado.

   Autor: Dpto 06 UX & Diseño — GelatoMaps
   Fecha: 30 Mar 2026
   ══════════════════════════════════════════════════════════════════ */

/* ── Contenedor del bloque en sidebar ── */
#discoveryOfDay {
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

/* ── Estado loading (skeleton shimmer) ── */
#discoveryOfDay.dday-loading .dday-skeleton {
  display: block;
}
#discoveryOfDay.dday-loading .dday-card {
  display: none;
}

/* ── Skeleton placeholder ── */
.dday-skeleton {
  display: none;
  padding: 14px;
  background: var(--white, #fff);
  border-radius: 12px;
}
.dday-skeleton-header {
  width: 60%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--color-neutral-bg, #f3f4f6) 25%, var(--color-neutral-border, #e5e7eb) 50%, var(--color-neutral-bg, #f3f4f6) 75%);
  background-size: 200% 100%;
  animation: dday-shimmer 1.4s infinite;
  margin-bottom: 10px;
}
.dday-skeleton-img {
  width: 100%;
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color-neutral-bg, #f3f4f6) 25%, var(--color-neutral-border, #e5e7eb) 50%, var(--color-neutral-bg, #f3f4f6) 75%);
  background-size: 200% 100%;
  animation: dday-shimmer 1.4s infinite;
  margin-bottom: 8px;
}
.dday-skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--color-neutral-bg, #f3f4f6) 25%, var(--color-neutral-border, #e5e7eb) 50%, var(--color-neutral-bg, #f3f4f6) 75%);
  background-size: 200% 100%;
  animation: dday-shimmer 1.4s infinite;
  margin-bottom: 6px;
}
.dday-skeleton-line:last-child { width: 75%; }

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

/* ── Card principal ── */
.dday-card {
  background: var(--white, #fff);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  /* Borde gradiente animado — identidad premium */
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 1.5px rgba(13, 148, 136, 0.22),
    0 2px 10px rgba(11, 31, 56, 0.08);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.dday-card:hover {
  box-shadow:
    0 0 0 2px var(--color-accent, #0D9488),
    0 6px 24px rgba(13, 148, 136, 0.22);
  transform: translateY(-1px);
}

/* ── Header de sección ── */
.dday-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 0;
}
.dday-header-icon {
  font-size: 14px;
  line-height: 1;
}
.dday-header-label {
  font-size: 10px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--color-accent, #0D9488);
}
.dday-header-date {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-3, #6B7280);
  font-family: 'DM Sans', sans-serif;
}

/* ── Imagen ── */
.dday-img-wrap {
  position: relative;
  width: 100%;
  height: 80px;
  margin: 8px 0 0;
  overflow: hidden;
  background: var(--color-accent-pale, #F0FDFA);
}
.dday-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.dday-card:hover .dday-img {
  transform: scale(1.04);
}
.dday-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--color-accent-pale, #F0FDFA) 0%, var(--color-gold-pale, #FFFBEB) 100%);
}

/* Badge de bolas sobre imagen */
.dday-bolas-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(11, 31, 56, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--color-white);
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

/* Badge de categoría */
.dday-cat-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(13, 148, 136, 0.88);
  color: var(--color-white);
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Cuerpo de la card ── */
.dday-body {
  padding: 10px 12px 12px;
}
.dday-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text, #0B1F38);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.dday-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--color-text-3, #6B7280);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 10px;
}
.dday-meta-ciudad {
  display: flex;
  align-items: center;
  gap: 3px;
}
.dday-meta-sep {
  color: var(--color-neutral-border, #E5E7EB);
}
.dday-rating {
  color: var(--color-gold, #F59E0B);
  font-weight: 700;
}

/* ── CTAs ── */
.dday-actions {
  display: flex;
  gap: 6px;
}
.dday-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 10px;
  min-height: 44px; /* WCAG 2.5.5 touch target mínimo */
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
  text-decoration: none;
  border: none;
  line-height: 1;
}
.dday-btn:hover {
  transform: translateY(-1px);
}
.dday-btn-primary {
  background: var(--color-accent, #0D9488);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}
.dday-btn-primary:hover {
  background: var(--color-accent-darker, #0B6158);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}
.dday-btn-secondary {
  background: var(--color-accent-pale, #F0FDFA);
  color: var(--color-accent-dark, #0D7C72);
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.dday-btn-secondary:hover {
  background: rgba(13, 148, 136, 0.12);
}

/* ── Artículo relacionado ── */
.dday-article {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: var(--color-accent-pale, #F0FDFA);
  border-top: 1px solid rgba(13, 148, 136, 0.12);
  text-decoration: none;
  transition: background 0.15s ease;
}
.dday-article:hover {
  background: rgba(13, 148, 136, 0.1);
}
.dday-article-icon {
  font-size: 13px;
  flex-shrink: 0;
}
.dday-article-text {
  font-size: 10px;
  font-family: 'DM Sans', sans-serif;
  color: var(--color-accent-dark, #0D7C72);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.dday-article-arrow {
  font-size: 10px;
  color: var(--color-accent, #0D9488);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.dday-article:hover .dday-article-arrow {
  transform: translateX(2px);
}

/* ── Animación de entrada ── */
@keyframes dday-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dday-card {
  animation: dday-enter 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

/* ── Responsive 375px ── */
@media (max-width: 400px) {
  .dday-img-wrap { height: 68px; }
  .dday-btn { font-size: 10px; padding: 6px 8px; }
}

/* ── Respeta prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .dday-card,
  .dday-img,
  .dday-btn,
  .dday-article,
  .dday-article-arrow {
    animation: none !important;
    transition: none !important;
  }
  .dday-skeleton-header,
  .dday-skeleton-img,
  .dday-skeleton-line {
    animation: none !important;
    background: var(--color-neutral-bg, #f3f4f6) !important;
  }
}
