.peepso-event-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  max-width: 800px;
  margin: 1.5rem auto;
  font-family: sans-serif;
}

.peepso-event-banner {
  background-size: cover;
  background-position: center;
  height: 250px;
  width: 100%;
}

.peepso-event-body {
  padding: 1.25rem 1.5rem;
}

.peepso-event-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.25rem;
}

.peepso-event-title {
  margin: 0;
  font-size: 1.4rem;
  color: #222;
}

.peepso-event-location {
  font-size: 0.95rem;
  color: #444;
  margin: 0.3rem 0 1rem;
}

.peepso-event-description {
  color: #333;
  margin-bottom: 1.5rem;
}

.peepso-event-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Radios Group --- */
.peepso-event-radios {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.radio-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #F8F7FF;
  color: #333;
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  border-right: 1px solid #ccc;
  width: 10rem;
}

.radio-btn:last-child {
  border-right: none;
}

.radio-btn.left {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.radio-btn.right {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Hover = fond violet clair */
.radio-btn:hover {
  background: #B8B8FF;
  color: #fff;
}

/* Quand le bouton contient un input checked, le label entier change */
.radio-btn:has(input:checked) {
  background: #9191FA;
  color: #fff;
}

.radio-btn input {
  display: none;
}

/* --- Calendar Button --- */
.calendar-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #F8F7FF;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-btn:before {
  font-family: "dashicons";
  content: "\f508"; /* dashicons-calendar-alt */
  font-size: 1.25rem;
  line-height: 1;
}

.calendar-btn:hover {
  background: #B8B8FF;
  color: #fff;
}

@media (max-width: 600px) {
  .peepso-event-radios {
    flex-direction: column;
    border-radius: 8px;
  }
  .radio-btn {
    border-right: none;
    border-bottom: 1px solid #ccc;
    width: 100%;
  }
  .radio-btn:last-child {
    border-bottom: none;
  }
}

.peepso-event-confirm {
  margin-bottom: 0.8rem;
  color: #333;
  font-size: 0.95rem;
  width: 100%;
}

/* --- Loader chenille --- */
.peepso-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 1em;
}

.peepso-loader span {
  font-size: 1.5rem;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: peepso-bounce 0.9s infinite ease-in-out;
}

.peepso-loader span:nth-child(1) { animation-delay: 0s; }
.peepso-loader span:nth-child(2) { animation-delay: 0.15s; }
.peepso-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes peepso-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.peepso-event-meet-info {
  font-size: 0.95rem;
  color: #555;
  text-align: center;
}

.peepso-meet-button {
  display: inline-block;
  margin-top: 0.4rem;
  background: #9191FA;
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.peepso-meet-button:hover {
  background: #7a7aed;
}

.peepso-event-ended {
  margin: 0;
  color: #888;
  font-style: italic;
}

.peepso-event-calendar-wrapper {
  position: relative;
  display: inline-block;
}

.peepso-event-subscribe-wrapper {
  position: relative;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.peepso-event-subscribe-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #F8F7FF;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.peepso-event-subscribe-toggle::after {
  font-family: "dashicons";
  content: "\f347";
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.peepso-event-subscribe-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.peepso-event-subscribe-toggle:hover,
.peepso-event-subscribe-toggle:focus {
  background: #B8B8FF;
  color: #fff;
  outline: none;
  box-shadow: 0 6px 14px rgba(145,145,250,0.3);
}

.peepso-event-subscribe-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
  padding: 0.65rem;
  width: 240px;
  z-index: 1100;
  animation: fadeIn 0.2s ease-out;
}

.peepso-event-subscribe-menu[hidden] {
  display: none !important;
}

.peepso-event-subscribe-menu .radio-btn {
  border: none;
  width: 90%;
  background: transparent;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  justify-content: space-between;
  color: #494954;
  gap: 0.85rem;
}

.peepso-event-subscribe-menu .radio-btn + .radio-btn {
  margin-top: 0.35rem;
}

.peepso-event-subscribe-menu .radio-btn span {
  flex: 1;
  text-align: left;
}

.peepso-event-subscribe-menu .radio-btn:has(input:checked) {
  background: #F8F7FF;
  color: #494954;
  box-shadow: inset 0 0 0 1px #9191FA;
}

.peepso-event-subscribe-menu .radio-btn:hover {
  background: #F0F0FF;
  color: #222;
}

.calendar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F8F7FF;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.calendar-btn:hover {
  background: #B8B8FF;
  color: #fff;
}

.peepso-calendar-popup {
  position: absolute;
  top: 110%;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  width: 220px;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.2s ease-out;
  font-family: Poppins;
  font-weight: 400;
  font-size: 16px;
}

.peepso-calendar-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
}

.peepso-calendar-header {
  padding-top: 10px;
  padding-bottom: 5px;
  padding-inline: 15px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .025em;
  text-transform: uppercase;
  color: #91919d;
}

.peepso-calendar-popup ul {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.peepso-calendar-popup li {
  margin-left: 0 !important;
}

.peepso-calendar-popup li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #494954;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.peepso-calendar-popup li span {
  color: #91919d;
}

.peepso-calendar-popup li a:hover {
  background: #F8F7FF;
  border-radius: 10px;
}

@media (max-width: 520px) {
  .peepso-event-subscribe-menu {
    width: min(280px, 90vw);
    right: 50%;
    transform: translateX(50%);
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-btn:focus,
.calendar-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.peepso-event-card.cancelled {
  margin: 2rem auto;
  text-align: center;
  padding: 2rem 1.5rem;
  font-family: 'Poppins', sans-serif;
}

.peepso-event-cancelled .emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.peepso-event-cancelled h3 {
  font-weight: 600;
  color: #7a7aed;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.peepso-event-cancelled p {
  color: #555;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.peepso-event-next-event-title {
  text-align: center;
  font-weight: bold;
  color: #666;
}