/* =========================
✅ TABS
========================= */
.wdi-media-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.wdi-tab-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.wdi-tab-btn.active {
  background: #c59d5f;
  color: #fff;
}

/* =========================
✅ TAB CONTENT
========================= */
.wdi-media-tab {
  display: none;
}

.wdi-media-tab.active {
  display: block;
}


/* =========================
✅ CARD
========================= */
.wdi-media-card {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 10px;

  break-inside: avoid;     /* ✅ evita tagli */
  -webkit-column-break-inside: avoid;
}

/* =========================
✅ LOADER
========================= */
.wdi-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  z-index: 2;
  border-radius: 10px;
}

.wdi-loader::after {
  content: '';
  width: 22px;
  height: 22px;
  border: 3px solid #ddd;
  border-top: 3px solid #c59d5f;
  border-radius: 50%;
  animation: wdiSpin 1s linear infinite;
}

@keyframes wdiSpin {
  to { transform: rotate(360deg); }
}

/* =========================
✅ IMG / VIDEO
========================= */
.wdi-media-card img,
.wdi-media-card video {
  width: 100%;
  height: auto;           /* ✅ mantiene proporzioni */
  display: block;
  border-radius: 6px;
}

.wdi-media-card img {
  opacity: 0;
  transition: opacity .3s ease;
}

.wdi-media-card img.loaded {
  opacity: 1;
}

/* =========================
✅ ACTIONS
========================= */
.wdi-media-actions {
  position: absolute;
  top: 4px;
  right: 4px;
}

.wdi-media-delete {
  background: #c00;
  color: #fff;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 10px;
}

/* =========================
✅ LIKE (INSTAGRAM STYLE)
========================= */

/* visibilità controllata */
.wdi-media-card .wdi-like-pill {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.wdi-media-card.is-loaded .wdi-like-pill {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

/* pill */
.wdi-like-pill {
  position: absolute;
  left: 8px;
  bottom: 14px; /* ✅ leggermente più alto */

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  cursor: pointer;
  z-index: 3;
}

/* cuore via mask */
.wdi-heart {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.wdi-heart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #222;

  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.1 8.64l-.1.1-.11-.11C10.14 6.7 7.4 6.7 5.6 8.5c-1.8 1.8-1.8 4.6 0 6.4l6.5 6.5 6.5-6.5c1.8-1.8 1.8-4.6 0-6.4-1.8-1.8-4.54-1.8-6.4.14z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.1 8.64l-.1.1-.11-.11C10.14 6.7 7.4 6.7 5.6 8.5c-1.8 1.8-1.8 4.6 0 6.4l6.5 6.5 6.5-6.5c1.8-1.8 1.8-4.6 0-6.4-1.8-1.8-4.54-1.8-6.4.14z'/%3E%3C/svg%3E") center / contain no-repeat;

  opacity: 0.85;
}

/* liked */
.wdi-like-pill.is-liked .wdi-heart::before {
  background: #e0245e;
  opacity: 1;
}

/* count */
.wdi-like-count {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

/* =========================
✅ FULLSCREEN
========================= */
.wdi-fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.wdi-like-pill {
  pointer-events: auto;
}

.wdi-like-pill {
  width: fit-content;
}

/* =========================/* ========================= Instagram
========================= */
.wdi-like-burst{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  opacity:0;
  z-index:4;
}

.wdi-like-burst__heart{
  width:84px;
  height:84px;
  display:block;
  background:#e0245e;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.1 8.64l-.1.1-.11-.11C10.14 6.7 7.4 6.7 5.6 8.5c-1.8 1.8-1.8 4.6 0 6.4l6.5 6.5 6.5-6.5c1.8-1.8 1.8-4.6 0-6.4-1.8-1.8-4.54-1.8-6.4.14z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.1 8.64l-.1.1-.11-.11C10.14 6.7 7.4 6.7 5.6 8.5c-1.8 1.8-1.8 4.6 0 6.4l6.5 6.5 6.5-6.5c1.8-1.8 1.8-4.6 0-6.4-1.8-1.8-4.54-1.8-6.4.14z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.25));
  transform: scale(.4);
}

.wdi-like-burst.play{
  opacity:1;
  animation: wdiBurstFade .65s ease forwards;
}

.wdi-like-burst.play .wdi-like-burst__heart{
  animation: wdiBurstPop .65s cubic-bezier(.2,1.3,.3,1) forwards;
}

@keyframes wdiBurstPop{
  0%   { transform: scale(.35); }
  55%  { transform: scale(1.15); }
  100% { transform: scale(1.0); }
}

@keyframes wdiBurstFade{
  0%   { opacity:0; }
  15%  { opacity:1; }
  100% { opacity:0; }
}

/* =========================
✅ piccola “pulse” sul pill
========================= */
.wdi-like-pill.pulse{
  animation: wdiPillPulse .22s ease;
}
@keyframes wdiPillPulse{
  0%{ transform: scale(1); }
  60%{ transform: scale(1.08); }
  100%{ transform: scale(1); }
}


/* =========================
✅ FULLSCREEN STAGE + GESTURE
========================= */
.wdi-fullscreen{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.wdi-fs-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 28px;
  line-height: 42px;
  cursor: pointer;
}

.wdi-fs-stage{
  width: 100%;
  height: 100%;
  display:flex;
  justify-content:center;
  align-items:center;
  touch-action: none; /* ✅ abilita pinch/swipe gestito da JS */
}

.wdi-fs-media{
  max-width: 92vw;
  max-height: 92vh;
  display:flex;
  justify-content:center;
  align-items:center;
}

.wdi-fs-img{
  max-width: 92vw;
  max-height: 92vh;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}


.wdi-media-card img {
  opacity: 0;
  transition: opacity .3s ease;
}

.wdi-media-card.is-loaded img {
  opacity: 1;
}

.wdi-loader {
  opacity: 1;
  transition: opacity .3s ease;
}

.wdi-media-card.is-loaded .wdi-loader {
  opacity: 0;
  pointer-events: none;
}

.wdi-grid-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.wdi-tabs-head {
  display:flex;
  gap:10px;
  margin:12px 0;
}

.wdi-tab-btn {
  padding:8px 14px;
  border-radius:8px;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer;
}

.wdi-tab-btn.active {
  background:#c78665;
  color:#fff;
  border-color:#c78665;
}

.wdi-media-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.wdi-media-card img,
.wdi-media-card video {
  width: 100%;
  height: auto;            /* ✅ NON forzare altezza */
  display: block;
}

/* ✅ container scroll */
.wdi-grid-scroll {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
}

.wdi-media-card img,
.wdi-media-card video {
  width: 100%;
  height: auto;
  display: block;
}

.wdi-media-card {
  display: block;
  width: 100%;
}


.wdi-fs-prev,
.wdi-fs-next {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:40px;
  color:#fff;
  background:none;
  border:0;
  cursor:pointer;
  z-index:10;
}

.wdi-fs-prev { left:20px; }
.wdi-fs-next { right:20px; }

.wdi-media-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
}

.wdi-media-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);

  display: flex;
  align-items: center;
  justify-content: center;

  color: #333;
}

.wdi-media-btn:hover {
  transform: scale(1.08);
}

/* delete rosso */
.wdi-media-delete {
  color: #e0245e;
}

.wdi-media-actions {
  top: 4px;
  right: 4px;
  gap: 4px;
}

/* dimensione base */
.wdi-media-btn {
  width: var(--icon-size, 30px);
  height: var(--icon-size, 30px);
}

.wdi-media-btn svg {
  width: calc(var(--icon-size, 30px) * 0.5);
  height: calc(var(--icon-size, 30px) * 0.5);
}

.wdi-modal-delete {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  /* ✅ meno invasivo */
  background: rgba(0,0,0,0.25);

  z-index: 9999999;
}

.wdi-modal-delete.is-open {
  display: flex;
}

.wdi-modal-box {
  background: #ffffff !important;

  position: relative;
  z-index: 2; /* ✅ sopra overlay del builder */

  filter: none !important;
  opacity: 1 !important;
}

/* ✅ BOX CENTRALE */
.wdi-modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 14px;

  width: 300px;
  max-width: 90%;

  text-align: center;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);

  position: relative; ✅
  z-index: 1; ✅ (fondamentale)
}

/* testo */
.wdi-modal-box p {
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 400;
}

/* bottoni */
.wdi-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.wdi-btn-cancel {
  padding: 8px 12px;
  border-radius: 8px;
  background: #eee;
  border: none;
  cursor: pointer;
}

.wdi-btn-confirm {
  padding: 8px 12px;
  border-radius: 8px;
  background: #e0245e;
  color: #fff !important;
  border: none;
  cursor: pointer;
}

.wdi-modal-delete,
.wdi-modal-delete * {
  box-sizing: border-box;
}

.wdi-modal-box {
  opacity: 1;
}

#wdi-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#wdi-viewer .wdi-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.wdi-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 5;
}

.wdi-loader::after {
  content: "";
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: wdi-spin 1s linear infinite;
}

.wdi-media-card {
  cursor: url('data:image/svg+xml;utf8,\
  <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24">\
    <circle cx="10" cy="10" r="6" fill="none" stroke="white" stroke-width="2"/>\
    <line x1="15" y1="15" x2="20" y2="20" stroke="white" stroke-width="2" stroke-linecap="round"/>\
  </svg>') 12 12, zoom-in;
}

.wdi-fs-img {
  transition: opacity 0.25s ease;
}

.wdi-fs-img {
  transition: opacity .2s ease;
}

.wdi-btn-zip {
  background: #c78665;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.wdi-btn-zip:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
    transform: translateY(-0.5px);
}

.wdi-btn-zip:disabled {
  opacity: 0.6;
}

#wdi-zip-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.wdi-zip-box {
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  text-align: center;
  width: 280px;
}

.wdi-zip-title {
  font-weight: 600;
  font-size: 16px;
}

.wdi-zip-sub {
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.4;
  font-weight: 400;
}

.wdi-zip-confirm-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #c78665;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.wdi-zip-confirm-btn:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
    transform: translateY(-0.5px);
}

.wdi-zip-box {
  position: relative;
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  text-align: center;
  width: 280px;
}

/* ✅ close */
.wdi-zip-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

/* ✅ header */
.wdi-zip-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wdi-zip-logo {
  height: 26px;
}

.wdi-zip-drive {
  height: 28px;
}

/* ✅ freccia animata */
.wdi-zip-arrow {
  font-size: 18px;
  opacity: .7;
  animation: wdi-arrow-move 1.2s ease-in-out infinite;
}

@keyframes wdi-arrow-move {
  0% { transform: translateX(0); opacity: .6; }
  50% { transform: translateX(6px); opacity: 1; }
  100% { transform: translateX(0); opacity: .6; }
}


.wdi-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.wdi-slider {
  flex: 1;
  max-width: 60%;
}

.wdi-slider-value {
  font-size: 12px;
  width: 16px;
  text-align: right;
}

@media (max-width: 600px) {

  .wdi-slider-wrap {
    min-width: 0;              /* ✅ rimuove overflow */
    width: 50%;               /* ✅ occupa spazio disponibile */
    gap: 6px;
  }

  .wdi-slider {
    flex: 1;
  }

  .wdi-slider-value {
    width: 20px;
    font-size: 11px;
  }

}


.wdi-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top: 2px solid #c78665;
  border-radius: 50%;
  animation: wdi-spin 0.7s linear infinite;
}

@keyframes wdi-spin {
  to { transform: rotate(360deg); }
}

.wdi-order-wrap {
  display: flex;
  align-items: center;
}

.wdi-order-select {
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 600px) {

  /* ✅ container principale */
  .wdi-tabs-head {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  /* ✅ riga superiore (tabs + ZIP già OK) */
  .wdi-tabs-head > div:first-child {
    display: flex;
    gap: 8px;
  }

  /* ✅ riga controlli */
  .wdi-tabs-head > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* ✅ ZIP resta in prima riga */
  #wdi-download-zip {
    order: 0;
    flex: 0 0 auto;
  }

  /* ✅ forza capo riga DOPO ZIP */
  .wdi-order-wrap {
    order: 1;
    flex: 0 0 40%;
  }

  .wdi-slider-wrap {
    order: 2;
    flex: 1;
  }

}

/* ✅ forza override completo */
.wdi-media-card .wdi-like-pill.is-static {
  position: absolute !important;
  bottom: 6px !important;
  left: 6px !important;

  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;

  gap: 4px !important;
  padding: 3px 6px !important;

  width: auto !important;
  height: auto !important;

  border-radius: 999px !important;
  background: rgba(255,255,255,0.9) !important;

  font-size: 11px !important;
  line-height: 1 !important;

  pointer-events: none !important;
  cursor: default !important;

  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ✅ cuore nero */
.wdi-media-card .wdi-like-pill.is-static .wdi-like-heart {
  font-size: 12px !important;
}


.wdi-media-card .wdi-like-pill.is-static svg {
  fill: #000 !important;
  stroke: #000 !important;
}

/* ✅ numero */
.wdi-media-card .wdi-like-pill.is-static .wdi-like-count {
  color: #000 !important;
  font-weight: 500;
  font-size: 11px;
}

.wdi-like-pill-backend {
  z-index: 5; /* ✅ sopra video */
}

.wdi-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wdi-slider-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0.7;
}

.wdi-media-block {
  position: relative;
}

.wdi-media-block.is-readonly * {
  pointer-events: none;
}

.wdi-media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  backdrop-filter: blur(1px);
  background: rgba(255,255,255,0.7);

  z-index: 20;
}

.wdi-media-overlay * {
  pointer-events: auto;
}

.wdi-media-overlay-box {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  max-width: 320px;

  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 60%;
}

.wdi-media-overlay-box-bw {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  max-width: 320px;

  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  font-size: 13px;
  font-weight: 400;
}

.wdi-media-overlay-box strong {
  display: block;
  margin-bottom: 6px;
}

.wdi-media-block {
  position: relative;
}

/* ✅ blocca SOLO la bacheca */
.wdi-media-block.is-readonly {
  pointer-events: none;
}

/* ✅ overlay SOLO sopra bacheca */
.wdi-media-block .wdi-media-overlay {
  position: absolute;
  inset: 0;
  
  display: flex;
  align-items: center;
  justify-content: center;

  backdrop-filter: blur(1px);
  background: rgba(255,255,255,0.6);

  z-index: 5; /* ✅ NON troppo alto */
}

/* ✅ il box resta cliccabile */
.wdi-media-overlay * {
  pointer-events: auto;
}

.wdi-btn-zip[disabled] {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ✅ Checkmark animato upload completato */
.wdi-upload-check {
  display: inline-block;
  font-size: 28px;
  color: #27ae60;
  animation: wdiCheckZoom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform-origin: center center;
}

@keyframes wdiCheckZoom {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ✅ 3 puntini animati nel bottone download */
.wdi-media-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 16px;
}
.wdi-media-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: wdiDotBounce 1s ease-in-out infinite;
}
.wdi-media-dots span:nth-child(2) { animation-delay: 0.15s; }
.wdi-media-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes wdiDotBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ✅ FIX: viewer sopra le modali WDI */
.wdi-fullscreen {
  z-index: 2147483200 !important;
}

/* ✅ FIX: pill sempre cliccabile nel frontend */
#wdi-frontend-gallery .wdi-like-pill {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* ✅ Like pill WhatsApp — SOLO frontend */
#wdi-frontend-gallery .wdi-like-pill {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 3;
}

/* cuore default: contorno nero, sfondo bianco */
#wdi-frontend-gallery .wdi-like-pill .wdi-like-heart svg path {
  fill: #fff;
  stroke: #222;
  stroke-width: 1.2;
  transition: fill 0.2s;
}

/* cuore liked: contorno nero, sfondo rosso */
#wdi-frontend-gallery .wdi-like-pill.is-liked .wdi-like-heart svg path {
  fill: #e74c3c;
  stroke: #222;
  stroke-width: 1.2;
}

/* contatore */
#wdi-frontend-gallery .wdi-like-pill .wdi-like-count {
  font-size: 12px;
  font-weight: 600;
  color: #222;
  line-height: 1;
}

/* pulse animazione */
#wdi-frontend-gallery .wdi-like-pill.pulse {
  animation: wdiPillPulse .22s ease;
}

/* ── Like pill – stile Instagram ── */
.wdi-media-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;          /* molto schiacciata verticalmente */
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: #262626;
    transition: transform 0.15s ease, background 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wdi-media-like:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.wdi-media-like .wdi-like-icon {
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s, transform 0.3s;
}

/* Cuore vuoto di default */
.wdi-media-like .wdi-like-icon::before {
    content: '♡';
    color: #262626;
}

/* Cuore pieno quando liked */
.wdi-media-like.liked .wdi-like-icon::before {
    content: '❤️';
}

.wdi-media-like .wdi-like-count {
    font-size: 12px;
    font-weight: 600;
    color: #262626;
    min-width: 8px;
}

/* Bounce animation Instagram-style */
@keyframes wdi-like-bounce {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.3); }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.wdi-like-bounce .wdi-like-icon {
    animation: wdi-like-bounce 0.6s ease;
}

/* ==================================================
   MEDIA WALL – Skeleton shimmer (loading)
================================================== */
.wdi-media-card {
  position: relative;
  overflow: hidden;
}

/* stato loading: nasconde il contenuto e mostra shimmer */
.wdi-media-card.is-loading {
  background: #e9e5e0;
  border-radius: 12px;
  min-height: 180px;        /* altezza minima placeholder */
}

/* nasconde img/video/overlay finché carica */
.wdi-media-card.is-loading img,
.wdi-media-card.is-loading video,
.wdi-media-card.is-loading .wdi-media-like,
.wdi-media-card.is-loading .wdi-media-overlay {
  opacity: 0 !important;
}

/* shimmer animato */
.wdi-media-card.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    rgba(255,255,255,0)   0%,
    rgba(255,255,255,0)   30%,
    rgba(255,255,255,.45) 50%,
    rgba(255,255,255,0)   70%,
    rgba(255,255,255,0)   100%
  );
  background-size: 250% 100%;
  animation: wdi-shimmer 1.6s ease-in-out infinite;
}

@keyframes wdi-shimmer {
  0%   { background-position: 125% 0; }
  100% { background-position: -125% 0; }
}

/* reveal dolce quando l'immagine è pronta */
.wdi-media-card:not(.is-loading) img,
.wdi-media-card:not(.is-loading) video {
  animation: wdi-reveal .35s ease both;
}

@keyframes wdi-reveal {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}


/* ══════════════════════════════════════
   ✅ LIKE PILL INSTAGRAM — SOLO FRONTEND
   ══════════════════════════════════════ */

#wdi-frontend-gallery .wdi-media-card .wdi-like-pill {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;

  position: absolute;
  left: 6px;
  bottom: 6px;

  display: inline-flex;
  align-items: center;
  gap: 3px;

  padding: 2px 7px;
  height: 20px;
  box-sizing: border-box;

  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;

  cursor: pointer;
  z-index: 3;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

#wdi-frontend-gallery .wdi-like-pill:active {
  transform: scale(0.92) !important;
}

/* cuore default: bianco vuoto */
#wdi-frontend-gallery .wdi-like-pill .wdi-like-heart {
  display: flex;
  align-items: center;
  line-height: 1;
  height: 14px;
}

#wdi-frontend-gallery .wdi-like-pill .wdi-like-heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

#wdi-frontend-gallery .wdi-like-pill .wdi-like-heart svg {
  width: 12px;
  height: 12px;
  display: block;
  margin-top: -1px;
}

#wdi-frontend-gallery .wdi-like-pill .wdi-like-heart svg path {
  fill: transparent;
  stroke: #fff;
  stroke-width: 2.5;
  transition: fill 0.2s, stroke 0.2s;
}

/* cuore liked: rosso pieno Instagram */
#wdi-frontend-gallery .wdi-like-pill.is-liked .wdi-like-heart svg path {
  fill: #ed4956;
  stroke: #ed4956;
  stroke-width: 1;
}

/* contatore bianco */
#wdi-frontend-gallery .wdi-like-pill .wdi-like-count {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

/* bounce */
#wdi-frontend-gallery .wdi-like-pill.pulse {
  animation: wdiPillPulse 0.3s ease;
}

/* ══════════════════════════════════════
   ✅ FRONTEND TABS + EMPTY STATE + ORDER
   ══════════════════════════════════════ */

/* ✅ Tab con icone */
#wdi-frontend-gallery .wdi-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
}

#wdi-frontend-gallery .wdi-tab-btn svg {
  display: block;
}

/* ✅ Empty state */
.wdi-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 8px;
  opacity: 0.5;
}

.wdi-empty-state p {
  font-size: 24px;
  margin: 0;
  line-height: 1;
}

/* ✅ Order buttons (se usi la versione bottoni) */
.wdi-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.wdi-order-btn.active {
  background: #c78665;
  color: #fff;
  border-color: #c78665;
}

.wdi-order-btn svg {
  display: block;
}

/* ==================================================
   MEDIA WALL – Card delete animation
================================================== */
.wdi-media-card.is-deleting {
  animation: wdi-card-out .35s ease forwards;
  pointer-events: none;
}

@keyframes wdi-card-out {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85); }
}


.wdi-upload-text {
    font-size: 48px;
    font-weight: 300;
    z-index: 2;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.wdi-slider-value {
    font-size: 12px;
    width: 16px;
    text-align: right;
    font-family: 'Inter', system-ui, sans-serif !important;
	color: var(--wdi-bcolor, #141414);
	font-weight: 400;
}

#wdi-frontend-gallery .wdi-like-pill .wdi-like-count {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
    font-family: 'Inter', system-ui, sans-serif !important;
}

#wdi-circle-text {
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* ✅ Bacheca: resetta color su input/select/button */
.wdi-modal[data-wdi-modal="media"] input,
.wdi-modal[data-wdi-modal="media"] textarea,
.wdi-modal[data-wdi-modal="media"] select,
.wdi-modal[data-wdi-modal="media"] button {
    color: revert;
}