/* CDS Sync — "Dettagli Evento" sidebar box for the single event page.
   Self-contained + defensive so it looks consistent in any theme / Elementor column.
   Pulls its data live from the event meta (see CDS_Eventi_Render::details_html). */

.cds-evd {
  --cds-blue: #02A3E0;
  --cds-blue-dark: #0285ba;
  --cds-ink: #1f2733;
  --cds-muted: #6b7480;
  --cds-card: #ffffff;
  --cds-line: #e6e9ef;
  --cds-soft: #f4f7fb;
  --cds-radius: 16px;
  font-family: inherit;
  color: var(--cds-ink);
  background: var(--cds-card);
  border: 1px solid var(--cds-line);
  border-radius: var(--cds-radius);
  /* No overflow:hidden — it would clip the add-to-calendar dropdown. The hero
     rounds its own top corners instead (below). */
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .07);
  line-height: 1.5;
}
.cds-evd *,
.cds-evd *::before,
.cds-evd *::after { box-sizing: border-box; }
.cds-evd button {
  margin: 0; font-family: inherit; font-size: inherit; line-height: normal;
  background: none; border: none; box-shadow: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; color: inherit;
}

.cds-evd--empty { padding: 20px; color: var(--cds-muted); text-align: center; }

/* ---- Hero date ---- */
.cds-evd__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 22px 16px 18px;
  background: linear-gradient(160deg, var(--cds-blue), var(--cds-blue-dark));
  color: #fff;
  text-align: center;
  border-radius: var(--cds-radius) var(--cds-radius) 0 0; /* match the card's top corners */
}
.cds-evd__hero-dow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; opacity: .9;
}
.cds-evd__hero-day { font-size: 52px; font-weight: 800; line-height: 1; margin: 2px 0; }
.cds-evd__hero-mon {
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
}
.cds-evd__hero-mon::first-letter { text-transform: uppercase; }
.cds-evd__hero-free {
  margin-top: 12px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---- Body ---- */
.cds-evd__body { padding: 18px; }
.cds-evd__title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--cds-ink);
}

.cds-evd__list { list-style: none; margin: 0; padding: 0; }
.cds-evd__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cds-line);
}
.cds-evd__row:first-child { padding-top: 0; }
.cds-evd__list .cds-evd__row:last-child { border-bottom: 0; }
.cds-evd__ico {
  flex: none;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(2, 163, 224, .1);
  color: var(--cds-blue);
}
.cds-evd__rc { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cds-evd__label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--cds-muted);
}
.cds-evd__value {
  font-size: 15px; font-weight: 600; color: var(--cds-ink);
  word-break: break-word;
}
.cds-evd__value > span { display: block; }
.cds-evd__maplink,
.cds-evd .cds-evd__weblink {
  display: inline-block;
  margin-top: 3px;
  font-size: 13.5px; font-weight: 700;
  color: var(--cds-blue);
  text-decoration: none;
}
.cds-evd__maplink:hover,
.cds-evd .cds-evd__weblink:hover { text-decoration: underline; }
.cds-evd .cds-evd__weblink { font-weight: 600; word-break: break-all; }
.cds-evd__free {
  display: inline-flex;
  align-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  color: #0a7d3c; background: #e6f6ec;
  border-radius: 999px; padding: 3px 12px;
}

/* ---- Add to calendar ---- */
.cds-evd__cal { position: relative; margin-top: 16px; }
.cds-evd .cds-evd__cal-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--cds-blue);
  color: #fff;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(2, 163, 224, .35);
  transition: background .15s ease, box-shadow .15s ease;
}
.cds-evd .cds-evd__cal-btn:hover,
.cds-evd .cds-evd__cal-btn:focus,
.cds-evd .cds-evd__cal-btn[aria-expanded="true"] {
  background: var(--cds-blue-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 163, 224, .45);
}
.cds-evd__chev { font-size: 12px; transition: transform .2s ease; }
.cds-evd .cds-evd__cal-btn[aria-expanded="true"] .cds-evd__chev { transform: rotate(180deg); }
.cds-evd__cal-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  z-index: 20;
  padding: 6px;
  background: var(--cds-card);
  border: 1px solid var(--cds-line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(16, 24, 40, .18);
}
.cds-evd__cal-menu[hidden] { display: none; }
.cds-evd .cds-evd__cal-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--cds-ink);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.cds-evd .cds-evd__cal-item:hover { background: var(--cds-soft); color: var(--cds-blue); }

/* ---- Share ---- */
.cds-evd__share {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--cds-line);
}
.cds-evd__share-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--cds-muted);
}
.cds-evd__share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cds-evd .cds-evd__share-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--cds-line);
  border-radius: 10px;
  color: var(--cds-muted);
  background: var(--cds-card);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.cds-evd .cds-evd__share-btn:hover,
.cds-evd .cds-evd__share-btn:focus-visible {
  border-color: var(--cds-blue);
  color: var(--cds-blue);
  background: rgba(2, 163, 224, .06);
}
.cds-evd__copy.is-done { border-color: #0a7d3c; color: #0a7d3c; background: #e6f6ec; }

@media (max-width: 480px) {
  .cds-evd__hero-day { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .cds-evd__chev, .cds-evd .cds-evd__cal-btn, .cds-evd .cds-evd__share-btn { transition: none; }
}
