/* =========================================================================
   Al Duffa — Events + Newsletter (widgets/aidh/class-aidh-events-widget.php)
   -------------------------------------------------------------------------
   Matches the Manus design source (alduffa-permanent-site: .events /
   .ev-list / .ev / .date / .news-box) — same 1.5fr/1fr split, circular
   navy date badges, gold-ringed "done" state, and the navy newsletter
   card with the soft teal corner glow. Colours/fonts come from the
   theme's alduffa-tokens.css.
========================================================================= */

.ald-events {
  --ald-navy: var(--c-ink, #092434);
  --ald-gold: var(--c-teal, #D4A73A);
  --ald-teal: var(--c-accent-2, #1F8A8A);
  --ald-bg-2: var(--c-white, #FFFFFF);
  --ald-ink:  var(--c-ink, #092434);
  --ald-muted: var(--c-body, #5C6B80);
  --ald-line: #dce5e5;
  --ald-ok:   #2E7D5B;
  font-family: var(--f-body, "DM Sans", sans-serif);
}
.ald-events *,
.ald-events *::before { box-sizing: border-box; }

.ald-events__wrap {
  width: 100%;
  max-width: var(--wrap-max, 1280px);
  margin-inline: auto;
  padding-inline: var(--wrap-pad, 20px);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .ald-events__wrap { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Head */
.ald-events__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ald-events .ald-events__title {
  margin: 8px 0 0;
  font-family: var(--f-heading, "DM Serif Display", serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--ald-ink);
}
.ald-events__link { font-weight: 600; color: var(--c-ink-soft, #1D597C); text-decoration: none; white-space: nowrap; }
.ald-events__link::after { content: " \2192"; }
.ald-events__link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- Ev list */
.ald-ev-list { display: flex; flex-direction: column; }
.ald-ev {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--ald-line);
}
.ald-ev:last-child { border-bottom: 1px solid var(--ald-line); }
.ald-ev__date {
  background: var(--ald-navy);
  color: #fff;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ald-ev__date b { display: block; font-family: var(--f-heading, "DM Serif Display", serif); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.ald-ev__date small { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ald-gold); }
.ald-ev h3 { font-size: 1.12rem; font-family: var(--f-body, "DM Sans", sans-serif); font-weight: 600; margin: 0; color: var(--ald-ink); }
.ald-ev p { font-size: .9rem; color: var(--ald-muted); margin: 4px 0 0; }
.ald-ev__btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 2px;
  border: 1.5px solid var(--ald-navy);
  color: var(--ald-navy);
  background: transparent;
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
}
.ald-ev__btn:hover { background: rgba(9, 36, 52, .06); }
.ald-ev__btn.is-done { background: var(--ald-ok); color: #fff; border-color: var(--ald-ok); }
@media (max-width: 600px) {
  .ald-ev { grid-template-columns: 64px 1fr; }
  .ald-ev__btn { grid-column: 2; justify-self: start; }
}

/* ------------------------------------------------------------- Newsletter */
.ald-news {
  background: var(--ald-navy);
  color: #fff;
  border-radius: 10px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.ald-news::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--ald-teal);
  opacity: .35;
  top: -70px;
  inset-inline-end: -60px;
}
.ald-news > * { position: relative; }
.ald-news h3 { font-size: 1.5rem; color: #fff; margin: 0; font-family: var(--f-heading, "DM Serif Display", serif); font-weight: 400; }
.ald-news p { color: #C5CFDF; margin: 10px 0 18px; font-size: .98rem; }
.ald-news form { display: flex; flex-direction: column; gap: 10px; }
.ald-news input {
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: inherit;
}
.ald-news input::placeholder { color: #9FB0C8; }
.ald-news label.ald-news__chk { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: #C5CFDF; }
.ald-news label.ald-news__chk input { width: auto; padding: 0; margin: 3px 0 0; }
.ald-news .ald-btn-gold {
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--ald-gold);
  color: #1B1B1B;
  font-weight: 700;
  font: inherit;
  cursor: pointer;
}
.ald-news .ald-btn-gold:hover { background: #E0B547; }
.ald-news__ok {
  display: none;
  background: rgba(212, 167, 58, .2);
  border: 1px solid var(--ald-gold);
  padding: 12px;
  border-radius: 4px;
  color: #fff;
  margin-top: 10px;
  font-size: .9rem;
}
.ald-news__ok.is-visible { display: block; }

/* ----------------------------------------- Contact Form 7 (optional)
   When a real CF7 form is picked in the widget, its own markup
   (form.wpcf7-form, input.wpcf7-form-control, input[type=submit],
   the acceptance checkbox wrapper, the ajax response box) renders in
   place of the plain fields above. Most of the look above already
   applies for free — ".ald-news input"/"label" match CF7's plain
   <input>/<label> tags too — this just covers the handful of classes
   CF7 adds that the plain markup didn't have. */
.ald-news .wpcf7-form-control-wrap { display: block; }
.ald-news .wpcf7-list-item { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
.ald-news .wpcf7-list-item-label { font-size: .85rem; color: #C5CFDF; }
.ald-news input[type="checkbox"] { width: auto; padding: 0; margin: 3px 0 0; }
.ald-news input[type="submit"],
.ald-news .ald-btn-gold {
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--ald-gold);
  color: #1B1B1B;
  font-weight: 700;
  font: inherit;
  cursor: pointer;
}
.ald-news input[type="submit"]:hover { background: #E0B547; }
.ald-news .wpcf7-spinner { margin-inline-start: 10px; }
.ald-news .wpcf7-response-output {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 4px;
  font-size: .9rem;
  color: #fff;
}
.ald-news form.sent .wpcf7-response-output { background: rgba(212, 167, 58, .2); border: 1px solid var(--ald-gold); }
.ald-news form.invalid .wpcf7-response-output,
.ald-news form.failed .wpcf7-response-output,
.ald-news form.aborted .wpcf7-response-output,
.ald-news form.spam .wpcf7-response-output { background: rgba(220, 90, 90, .2); border: 1px solid #dc5a5a; }
.ald-news .wpcf7-not-valid-tip { color: #F5B5B5; font-size: .8rem; margin-top: 4px; display: block; }
