/* JDServer-Webs — modules/webcams/webcams.css (v2.1 - timelapse button smaller + accent) */
#webcams{ margin: 14px 0 28px; }

.wc-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wc-title{ font-weight:600; }

/* ✅ Botón Timelapse pequeño + color por paleta del site (via --wc-accent) */
.wc-timelapse-btn{
  --a: var(--wc-accent, var(--text));

  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;           /* 👈 más pequeño */
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--a) 45%, var(--border));
  background: color-mix(in srgb, var(--a) 12%, var(--bg));
  color: color-mix(in srgb, var(--a) 70%, var(--text));
  text-decoration: none;
  font-weight: 700;
  font-size: .85rem;           /* 👈 más pequeño */
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: var(--shadow-1);
}

.wc-timelapse-btn:hover{
  background: color-mix(in srgb, var(--a) 16%, var(--bg));
  border-color: color-mix(in srgb, var(--a) 60%, var(--border));
}

.wc-timelapse-btn:active{
  transform: translateY(1px);
}

/* Grid rows */
.wc-row{
  display:grid;
  gap:12px;
  margin-bottom: 12px;
}
.wc-row.wc-pano{ grid-template-columns: 1fr; }
.wc-row.wc-pair{ grid-template-columns: repeat(2, 1fr); }

/* Cards */
.wc-fig{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  padding: 0;
  margin: 0;
  position: relative;
}

/* PANORÁMICAS (DEFAULT): sin recorte */
.wc-row.wc-pano .wc-fig{ display:block; }
.wc-row.wc-pano .wc-fig img{
  display:block;
  width:100%;
  height:auto;
  object-fit: contain;
}

/* CERDANYOLA: 16:9 estirando */
.wc-row.wc-pano.wc-stretch .wc-fig{
  aspect-ratio: 16 / 9;
  background: var(--card);
}
.wc-row.wc-pano.wc-stretch .wc-fig img{
  width:100%;
  height:100%;
  object-fit: fill;
}

/* Pares */
.wc-row.wc-pair .wc-fig{ aspect-ratio: 3 / 2; }
.wc-row.wc-pair .wc-fig img{
  width:100%;
  height:100%;
  object-fit: cover;
}

/* Placeholder */
.wc-fig-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.wc-ph{
  color: var(--muted);
  font-size: .95rem;
  text-align:center;
  max-width: 320px;
  margin:0;
}
.wc-ph-title{
  font-weight:600;
  margin-bottom:4px;
}
.wc-ph-body{
  font-size:.85rem;
  line-height:1.4;
}

/* Overlay stale */
.wc-fig-stale::after{
  content:"FORA DE SERVEI TEMPORALMENT";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 8px;
  text-align:center;
  font-weight:700;
  font-size:.9rem;
  color:#fff;
  text-shadow: 0 0 4px rgba(0,0,0,.7);
  background: radial-gradient(circle at center, rgba(0,0,0,.35), rgba(0,0,0,.15));
  pointer-events:none;
  z-index:2;
  animation: wc-stale-blink 1.8s ease-in-out infinite;
}
@keyframes wc-stale-blink{
  0%, 100%{ opacity:0; }
  35%, 65%{ opacity:1; }
}

/* Mobile */
@media (max-width: 520px){
  .wc-row{
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .wc-row.wc-pair{ grid-template-columns: repeat(2, 1fr); }
  .wc-row.wc-pano{ grid-template-columns: 1fr; }
  .wc-row.wc-pair .wc-fig{ aspect-ratio: 4 / 3; }

  .wc-timelapse-btn{
    padding: 6px 9px;
    font-size: .84rem;
  }
}
