/* Two-container wrapper */
.swg__meeting-wrapper {
  display: flex;
  border-radius: 15px;
  overflow: hidden;
}

/* Date tile — left container */
.swg__date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  line-height: 1.2;
  background: #f0f6da;
  color: #005336;
  padding: 20px 14px;
  flex-shrink: 0;
}

.swg__date-day,
.swg__date-month,
.swg__date-year {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.swg__date-month {
  text-transform: uppercase;
  margin-top: 2px;
}

/* Meeting content — right container */
.swg__meeting-item {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  row-gap: 0;
  flex: 1;
  min-width: 0;
  padding: 20px 24px !important;
  border-radius: 0 !important;
}

/* Override theme grid-column spans */
.swg__meeting-item .swg__meeting-name {
  grid-column: auto;
}

.swg__meeting-item .swg__meeting-time {
  grid-column: auto;
  white-space: nowrap;
  opacity: 1 !important;
  margin-right: 60px;
  font-size: 17px;
}

.swg__meeting-item .swg__meeting-link {
  grid-column: auto;
  white-space: nowrap;
  height: 48px;
  padding: 0 24px !important;
  font-size: 14px !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
}

.swg__agenda-drawer {
  grid-column: 1 / -1;
  overflow: hidden;
}

.swg__meeting-item--expanded {
  grid-template-rows: auto auto;
}

.swg__agenda-content {
  padding: 16px 0 4px;
  font-size: 14px;
  line-height: 1.7;
  color: inherit;
  opacity: 0.9;
  border-top: 1px solid rgba(0, 83, 54, 0.2);
  margin-top: 16px;
}

.swg__agenda-toggle {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}

.swg__agenda-toggle:hover {
  opacity: 1;
}

/* Actions row: RSVP + Add to calendar + Join */
.swg__meeting-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}

.swg__meeting-rsvp + .swg__atc-wrap,
.swg__meeting-rsvp + .swg__meeting-link {
  margin-left: 8px;
}

.swg__meeting-actions .swg__atc-wrap {
  position: relative;
}

.swg__meeting-rsvp {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.swg__rsvp-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  opacity: 1;
  white-space: nowrap;
}

.swg__rsvp-buttons {
  display: flex;
  gap: 6px;
}

/* Add to calendar */
.swg__atc-wrap {
  position: relative;
}

.swg__atc-toggle {
  cursor: pointer;
}

.swg__atc-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 100;
  overflow: hidden;
}

.swg__atc-option {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #111 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #f0f0f0;
}

.swg__atc-option:last-child {
  border-bottom: none;
}

.swg__atc-option:hover {
  background: #f6f6f6;
}

.swg__meeting-link--awaiting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 24px;
  border-radius: 100px;
  border: 2px solid currentColor;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.35;
  box-sizing: border-box;
}

/* Calendar feed shortcode */
.hpa-cal-feed {
  margin: 16px 0;
}

.hpa-cal-feed__intro {
  margin: 0 0 12px;
  font-size: 15px;
}

.hpa-cal-feed__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hpa-cal-feed__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid currentColor;
  color: inherit;
  transition: opacity 0.15s;
}

.hpa-cal-feed__btn:hover {
  opacity: 0.75;
  text-decoration: none;
}

.hpa-cal-feed__note {
  font-size: 13px;
  opacity: 0.7;
  margin: 0;
}

.hpa-cal-feed__url {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  word-break: break-all;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Calendar grid shortcode */
.hpa-fe-cal {
  width: 100%;
  font-size: 14px;
}

.hpa-fe-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hpa-fe-cal__prev,
.hpa-fe-cal__next {
  background: #005336;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
  transition: opacity 0.15s;
  box-sizing: border-box;
}

.hpa-fe-cal__prev:hover,
.hpa-fe-cal__next:hover {
  opacity: 0.8;
}

.hpa-fe-cal__prev svg {
  transform: scaleX(-1);
}

.hpa-fe-cal__title {
  font-size: 20px;
  font-weight: 700;
}

.hpa-fe-cal__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.hpa-fe-cal__table thead th {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 0 10px;
  opacity: 0.6;
}

.hpa-fe-cal__body tr {
  vertical-align: top;
}

.hpa-fe-cal__body td {
  border: 1px solid rgba(0, 83, 54, 0.2);
  vertical-align: top;
  padding: 8px 6px;
  height: 100px;
  overflow: hidden;
  min-width: 0;
}

.hpa-fe-cal__day-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1;
}

.hpa-fe-cal__other {
  opacity: 0.35;
}

.hpa-fe-cal__today .hpa-fe-cal__day-num {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hpa-fe-cal__event,
.hpa-fe-cal__event-btn {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 5px 12px;
  border-radius: 3px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
  word-break: break-word;
  border: none;
  cursor: pointer;
}

.hpa-fe-cal__event:hover,
.hpa-fe-cal__event-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hpa-fe-cal__event-time {
  display: block;
  font-weight: 500;
  opacity: 0.75;
  font-size: 10px;
  margin-bottom: 12px;
}

/* Event popup */
.hpa-fe-cal__popup {
  position: absolute;
  background: #005336;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  padding: 28px 28px 24px;
  width: 380px;
  max-width: calc(100% - 20px);
  z-index: 9999;
  font-size: 14px;
  line-height: 1.6;
}

.hpa-fe-cal__popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  aspect-ratio: 1;
  font-size: 16px;
  line-height: 32px;
  cursor: pointer;
  color: #005336;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.hpa-fe-cal__popup-close:hover {
  background: #f0f0f0;
}

.hpa-fe-cal__popup-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 40px 10px 0;
  color: #fff;
  line-height: 1.3;
}

.hpa-fe-cal__popup-meta {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
  font-size: 13px;
}

.hpa-fe-cal__popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hpa-fe-cal__popup-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hpa-fe-cal__popup-link:hover {
  opacity: 0.8;
}

.hpa-fe-cal__popup-agenda-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.hpa-fe-cal__popup-agenda-btn:hover {
  opacity: 0.8;
}

/* Agenda popup */
.hpa-fe-cal__agenda-popup {
  position: absolute;
  background: #fff;
  color: #1d2327;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  padding: 28px 28px 24px;
  width: 420px;
  max-width: calc(100% - 20px);
  z-index: 10000;
  font-size: 14px;
  line-height: 1.7;
}

.hpa-fe-cal__agenda-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #005336;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  aspect-ratio: 1;
  font-size: 16px;
  line-height: 32px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.hpa-fe-cal__agenda-popup-close:hover {
  background: #003d28;
}

.hpa-fe-cal__agenda-popup-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 40px 14px 0;
  color: #005336;
}

.hpa-fe-cal__agenda-popup-body {
  font-size: 14px;
  line-height: 1.7;
  color: #1d2327;
}

.hpa-fe-cal__agenda-popup-body p,
.hpa-fe-cal__agenda-popup-body a,
.hpa-fe-cal__agenda-popup-body ul,
.hpa-fe-cal__agenda-popup-body li {
  font-size: 14px;
  line-height: 18px;
}

.hpa-fe-cal__agenda-popup-body p {
  margin: 0 0 10px;
}

.hpa-fe-cal__agenda-popup-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.hpa-fe-cal__agenda-popup-body li {
  margin-bottom: 4px;
}

.hpa-fe-cal__agenda-popup-body a {
  color: #005336;
}

.hpa-fe-cal__agenda-popup-body strong {
  font-weight: 700;
}

.hpa-fe-cal__agenda-popup-body em {
  font-style: italic;
}

@media (max-width: 600px) {
  .hpa-fe-cal__table thead th {
    font-size: 9px;
    letter-spacing: 0;
  }

  .hpa-fe-cal__body td {
    padding: 4px 3px;
  }

  .hpa-fe-cal__event {
    font-size: 9px;
  }

  .hpa-fe-cal__title {
    font-size: 16px;
  }
}

/* RSVP buttons — same pill style as Join / Add to calendar */
.swg__rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  font-family: inherit;
  text-decoration: none;
  transition:
    opacity 0.15s,
    background 0.15s;
}

.swg__rsvp-btn:hover {
  opacity: 1;
}

.swg__rsvp-btn.is-active {
  opacity: 1;
}

.swg__rsvp-btn--attending.is-active {
  border-color: white;
  color: #005336;
  background: #47d260;
}

.swg__rsvp-btn--not-attending.is-active {
  border-color: #ef5350;
  color: #ef5350;
  background: rgba(239, 83, 80, 0.15);
}

.swg__rsvp-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Mobile: tablet ──────────────────────────── */
@media (max-width: 768px) {
  .swg__meeting-item {
    display: flex !important;
    gap: 6px !important;
    padding: 16px 20px !important;
    flex-wrap: nowrap !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .swg__meeting-item .swg__meeting-name {
    width: 100%;
    order: 1;
  }

  .swg__meeting-item .swg__meeting-time {
    order: 2;
    margin-right: 0;
    margin-bottom: 30px;
  }

  .swg__meeting-item .swg__meeting-actions {
    order: 3;
    flex-direction: row !important;
    align-items: center;
  }

  .swg__meeting-item .swg__meeting-link {
    order: 4;
    margin-left: 0px !important;
  }
  .swg__meeting-actions .swg__atc-wrap {
    position: relative;
    margin-left: 0px !important;
  }
  .swg__atc-wrap,
  .swg__meeting-link {
    text-align: center !important;
    width: 100% !important;
  }
}

/* ── Mobile: phone ───────────────────────────── */
@media (max-width: 480px) {
  .swg__meeting-wrapper {
    flex-direction: column;
  }

  .swg__date-tile {
    flex-direction: row;
    gap: 8px;
    padding: 10px 16px;
    min-width: auto;
  }

  .swg__date-day {
    font-size: 22px;
  }

  .swg__date-month,
  .swg__date-year {
    margin-top: 0;
  }

  .swg__meeting-item {
    padding: 14px 16px !important;
  }

  .swg__meeting-item .swg__meeting-actions {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column !important;
  }

  .swg__meeting-item .swg__meeting-link {
    height: 48px !important;
    padding: 11px !important;
    font-size: 13px !important;
    text-align: center !important;
    display: inline-block !important;
  }

  .swg__rsvp-btn {
    width: 48px;
    height: 48px;
  }

  .swg__rsvp-label {
    top: -16px;
    font-size: 11px;
  }
}
