.ec-plugin,
.ec-plugin * {
  box-sizing: border-box;
}

.ec-plugin {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  --ec-primary: #052656;
  --ec-accent: #FFC229;
  font-family: inherit;
}

/*FILTER BAR*/

.ec-controls {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 24px;
  background: #fff;
}

.ec-controls input {
  border: none !important;
  border-radius: 8px;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
}

#ec-find-events {
  background: var(--ec-primary);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

#ec-find-events:hover {
  background: #031a3d;
}

/*HEADER*/

.ec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.ec-header button,
.ec-calendar-ui button,
.ec-pagination button {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.ec-header button:hover,
.ec-calendar-ui button:hover,
.ec-pagination button:hover {
  border-color: var(--ec-primary);
  color: var(--ec-primary);
}

/*TABS*/

.ec-tabs{
  display:flex;
  gap:12px;
  margin:24px 0;
  flex-wrap:wrap;
}

.ec-tabs button{
  background:#fff;
  color:#1f2937;
  border:1px solid #d1d5db;
  border-radius:8px;
  padding:10px 18px;
  cursor:pointer;
  transition:
      background .25s ease,
      color .25s ease,
      border-color .25s ease,
      box-shadow .25s ease,
      transform .2s ease;
}

.ec-tabs button:hover{
  background:var(--ec-primary);
  color:#fff;
  border-color:var(--ec-primary);
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(11,92,255,.18);
}

.ec-tabs button.active{
  background:var(--ec-primary);
  color:#fff;
  border-color:var(--ec-primary);
  box-shadow:0 8px 20px rgba(11,92,255,.22);
}

/*UPCOMING*/

.ec-upcoming-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: rgba(5, 38, 86, 0.06);
  border: 1px solid rgba(5, 38, 86, 0.08);
  padding: 24px;
  border-radius: 18px;
  margin-bottom: 30px;
}

.ec-upcoming-left {
  flex: 1;
}

.ec-upcoming-pill {
  background: var(--ec-primary);
  color: #fff;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 10px;
}

.ec-upcoming-left h2 {
  margin: 0 0 10px;
}

.ec-upcoming-meta {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/*COUNTDOWN*/

#ec-countdown {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.ec-count-box {
  background: var(--ec-primary);
  color: #fff;
  min-width: 72px;
  padding: 12px 10px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s ease;
}

.ec-count-box:hover {
  transform: translateY(-2px);
}

.ec-count-value {
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
}

.ec-count-label {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 6px;
}

.ec-live-now {
  background: var(--ec-accent);
  color: #111827;

  padding: 12px 16px;

  border-radius: 10px;

  font-weight: 600;
}

/*GROUP*/

.ec-date-group {
  margin-top: 35px;
}

.ec-date-group h4 {
  margin-bottom: 16px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

/*EVENT CARD*/

.ec-event {
  display: grid;
  grid-template-columns: 80px 1fr 220px;
  gap: 24px;
  align-items: center;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  transition: 0.25s ease;
}

.ec-event:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.ec-event::before {
  content: '';
  position: absolute;
  left: -24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ec-primary);
  top: 50%;
  transform: translateY(-50%);
}

.ec-date {
  text-align: center;
}

.ec-day {
  font-size: 34px;
  font-weight: bold;
  line-height: 1;
}

.ec-month {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.ec-content h3 {
  margin: 8px 0;
  font-size: 20px;
}

.ec-small-meta {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

.ec-meta {
  margin-top: 6px;
  color: #4b5563;
  font-size: 14px;
}

.ec-excerpt {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
}

/*IMAGE*/

.ec-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
}

/*BADGES*/

.ec-badge {
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.ec-badge.upcoming {
  background: rgba(255, 194, 41, 0.2);
  color: #92400e;
}

.ec-badge.ongoing {
  background: rgba(5, 38, 86, 0.12);
  color: var(--ec-primary);
}

.ec-badge.completed {
  background: #e5e7eb;
  color: #374151;
}

/*CALENDAR*/

.ec-calendar-ui {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.ec-cal-header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 16px;
}

.ec-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: start;
}

.ec-cal-weekday {
  text-align: center;
  font-weight: 600;
  color: #666;
  padding: 10px 0;
}

.ec-cal-day,
.ec-cal-weekday,
.ec-cal-spacer {
  min-height: 60px;
}

.ec-cal-day {
  min-height: 60px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.ec-cal-day:hover {
  background: rgba(5, 38, 86, 0.08);
}

.ec-cal-day.has-event {
  font-weight: 700;
}

.ec-cal-date-number {
  line-height: 1;
}

.ec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ec-primary);
  margin-top: 6px;
}

/* SVG ICONS */
.ec-small-meta{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
}

.ec-meta-item{
  display:flex;
  align-items:center;
  gap:6px;
}

.ec-svg-icon{
  width:14px;
  height:14px;
  flex-shrink:0;
  color:var(--ec-primary);
}


/*PAGINATION*/

.ec-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/*EMPTY*/

.ec-empty {
  text-align: center;
  padding: 50px 20px;
  color: #9ca3af;
}

/*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;
  width: 100%;
  max-width: 720px;
  border-radius: 18px;
  padding: 24px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.ec-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 28px;
  cursor: pointer;
}

.ec-popup-image img {
  width: 100%;
  border-radius: 14px;
  margin: 20px 0;
}

.ec-popup-meta {
  color: #6b7280;
  margin-top: 10px;
  line-height: 1.7;
}

.ec-popup-content {
  margin-top: 20px;
  line-height: 1.8;
}

#ec-loading{
    display:none;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:30px;
    color:#666;
    font-size:15px;
}

.ec-spinner{
    width:22px;
    height:22px;
    border:3px solid #e5e7eb;
    border-top:3px solid var(--ec-primary);
    border-radius:50%;
    animation:ec-spin .8s linear infinite;
}

@keyframes ec-spin{
    to{
        transform:rotate(360deg);
    }
}

/*MOBILE*/

@media (max-width: 768px) {

  .ec-upcoming-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #ec-countdown {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ec-event {
    grid-template-columns: 60px 1fr;
  }

  .ec-image {
    display: none;
  }

  .ec-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .ec-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ec-tabs {
    flex-wrap: wrap;
  }
}