.ec-plugin {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

/* TITLE */
.ec-plugin h1 {
  font-size: 36px;
  margin-bottom: 20px;
}

/* FILTER BAR */
.ec-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.ec-controls input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
}

#ec-find-events {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}

/* NAV */
.ec-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ec-header button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* UPCOMING */
.ec-upcoming {
  background: #eef2ff;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 25px;
}

.ec-upcoming-pill {
  background: #4f46e5;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.ec-upcoming h2 {
  margin: 10px 0 5px;
}

.ec-upcoming-meta {
  font-size: 14px;
  color: #555;
}

/* GROUP */
.ec-date-group {
  border-top: 1px solid #e5e7eb;
  margin-top: 25px;
  padding-top: 15px;
}

.ec-date-group h4 {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

/* EVENT CARD*/
.ec-event {
  display: grid;
  grid-template-columns: 80px 1fr 220px;
  gap: 25px;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  padding: 14px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.25s;
}

.ec-event:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

/* timeline dot */
.ec-event::before {
  content: '';
  position: absolute;
  left: -51px;
  width: 12px;
  height: 12px;
  background: #2563eb;
  border-radius: 50%;
}

.ec-date {
  text-align: center;
}

.ec-day {
  font-size: 28px;
  font-weight: bold;
}

.ec-month {
  font-size: 12px;
  color: #999;
}

.ec-content h3 {
  margin: 0;
  font-size: 18px;
}

.ec-small-meta {
  font-size: 12px;
  color: #888;
}

.ec-meta {
  font-size: 13px;
  color: #666666;
  margin-top: 5px;
}

.ec-excerpt {
  font-size: 14px;
  color: #555;
  margin-top: 5px;
}

/* IMAGE */
.ec-image img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
}

/* BADGE */
.ec-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 500;
}

.ec-badge.upcoming {
  background: #e0f2fe;
  color: #0369a1;
}

.ec-badge.ongoing {
  background: #dcfce7;
  color: #166534;
}

.ec-badge.completed {
  background: #f3f4f6;
  color: #444;
}

/* MODAL */
#ec-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

#ec-modal.active {
  display: flex;
}

.ec-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  position: relative;
}

.ec-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

.ec-popup-meta {
  font-size: 14px;
  margin-bottom: 10px;
  color: #555;
}

/* CALENDAR */
#ec-calendar {
  display: none;
  margin-bottom: 15px;
}

/* PAGINATION */
.ec-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.ec-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {

  .ec-event {
    grid-template-columns: 60px 1fr;
  }

  .ec-image {
    display: none;
  }

  .ec-timeline {
    padding-left: 60px;
  }

  .ec-timeline::before {
    left: 30px;
  }

  .ec-event::before {
    left: -32px;
  }
}