/* ── Grid layout ─────────────────────────────────────────────── */

.wbc-webinar-grid {
  display: grid;
  grid-template-columns: repeat( var( --wbc-columns, 3 ), minmax( 0, 1fr ) );
  gap: 25px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Webinar card ────────────────────────────────────────────── */

.wbc-webinar-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 18px;
  overflow: hidden;
  contain: paint;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wbc-webinar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.20);
}

/* ── Video wrapper (thumbnail + play button) ─────────────────── */

.wbc-webinar-card__video,
.wbc-webinar-card__image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
  flex-shrink: 0;
}

.wbc-webinar-card__thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.wbc-webinar-card__video:hover .wbc-webinar-card__thumbnail {
  opacity: 0.85;
}

/* ── Play button ─────────────────────────────────────────────── */

.wbc-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
  pointer-events: none; /* the whole wrapper is the click target */
}

.wbc-webinar-card__video:hover .wbc-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
}

.wbc-play-btn__bg {
  fill: #ff0000;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.wbc-webinar-card__video:hover .wbc-play-btn__bg {
  opacity: 1;
}

.wbc-play-btn__arrow {
  fill: #fff;
}

/* ── Embedded iframe ─────────────────────────────────────────── */

.wbc-webinar-card__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Card content ────────────────────────────────────────────── */

.wbc-webinar-grid .wbc-webinar-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 14px 16px;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

.wbc-webinar-grid .wbc-webinar-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.wbc-webinar-grid .wbc-webinar-card__date {
  color: #5d6570;
  font-size: 13px;
  line-height: 1.4;
}

.wbc-webinar-grid .wbc-webinar-card__speaker-badge {
  background: #d6f0d8;
  color: #2a6b30;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wbc-webinar-grid .wbc-webinar-card__title {
  margin: 0 0 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1d2327;
  line-height: 1.4;
  text-transform: none;
}

.wbc-webinar-grid .wbc-webinar-card__desc {
  margin: 0;
  color: #5d6570;
  font-size: 13px;
  line-height: 1.6;
}

/* ── Empty state ─────────────────────────────────────────────── */

.wbc-no-webinars {
  margin: 0;
  grid-column: 1 / -1;
  color: #5d6570;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .wbc-webinar-grid {
    grid-template-columns: repeat( var( --wbc-tablet-columns, 2 ), minmax( 0, 1fr ) );
  }
}

@media (max-width: 767px) {
  .wbc-webinar-grid {
    grid-template-columns: repeat( var( --wbc-mobile-columns, 1 ), minmax( 0, 1fr ) );
  }

  .wbc-webinar-grid .wbc-webinar-card__title {
    font-size: 14px;
  }
}

/* ── Email gate modal ────────────────────────────────────────── */

.wbc-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.wbc-gate-modal[hidden] {
  display: none;
}

.wbc-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba( 0, 0, 0, 0.55 );
  cursor: pointer;
}

.wbc-gate-box {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.28 );
  text-align: center;
  box-sizing: border-box;
}

/* ── Close button ────────────────────────────────────────────── */

.wbc-gate-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #8c8f94;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.wbc-gate-close:hover {
  color: #1d2327;
}

/* ── Icon ────────────────────────────────────────────────────── */

.wbc-gate-icon {
  color: #2271b1;
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

/* ── Heading & subtitle ──────────────────────────────────────── */

.wbc-gate-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1d2327;
  font-family: 'Roboto', sans-serif;
}

.wbc-gate-subtitle {
  margin: 0 0 20px;
  color: #646970;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
}

/* ── Form ────────────────────────────────────────────────────── */

.wbc-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wbc-gate-email-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #c3c4c7;
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wbc-gate-email-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.2 );
}

.wbc-gate-submit {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  background: #2271b1;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wbc-gate-submit:hover {
  background: #135e96;
}

.wbc-gate-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Message ─────────────────────────────────────────────────── */

.wbc-gate-message {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  text-align: left;
  line-height: 1.5;
}

.wbc-gate-message[hidden] {
  display: none;
}

.wbc-gate-message--error {
  background: #fcf0f1;
  color: #8a1f11;
  border: 1px solid #f5c6c8;
}

.wbc-gate-message--success {
  background: #eefaee;
  color: #1d4a1d;
  border: 1px solid #b3e5b3;
}

/* ── Footer links ────────────────────────────────────────────── */

.wbc-gate-footer {
  margin-top: 18px;
  font-size: 13px;
  color: #646970;
  font-family: 'Roboto', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wbc-gate-footer a {
  color: #2271b1;
  text-decoration: none;
}

.wbc-gate-footer a:hover {
  text-decoration: underline;
}

@media ( max-width: 480px ) {
  .wbc-gate-box {
    padding: 28px 20px 22px;
  }

  .wbc-gate-title {
    font-size: 18px;
  }
}
