/* RD Event Calendar - White theme (responsive, Elementor-friendly) */
.rd-ec-wrap{
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --soft:#f9fafb;
  --accent:#b7f34a;
  --selected: rgba(183, 243, 74, .28);

  width: 100%;
  max-width: 100%;
  background: var(--bg);
  color: var(--text) !important;
  border:none;
  border-radius:0;
  padding:0;
  box-shadow:none;
  overflow-x: hidden;
}

/* Reduce / normalize button padding; day cells get border from grid, nav buttons no border */
.rd-ec-wrap button,
.rd-ec-wrap [type=button],
.rd-ec-wrap [type=submit]{
  padding:0.2rem 0.2rem;
  background: var(--bg);
  color: var(--text) !important;
}

.rd-ec-wrap, .rd-ec-wrap *{ color: var(--text) !important; box-sizing:border-box; }
.rd-ec-wrap a{ text-decoration:none; }

.rd-ec-header{
  display:flex; flex-wrap:wrap; align-items:center;
  gap:12px; justify-content:center; margin-bottom:12px;
}
.rd-ec-title{ font-size:18px; font-weight:800; display:none; }

.rd-ec-nav{ display:flex; align-items:center; gap:10px; }
.rd-ec-current{ min-width:180px; text-align:center; font-weight:800; }

.rd-ec-navbtn{
  width:40px; height:40px; border-radius:0;
  border:none !important;
  background: var(--bg);
  cursor:pointer;
  font-size:20px;
  line-height:1;
}

.rd-ec-calendar{ margin-top:8px; margin-bottom:16px; }

.rd-ec-weekhead{
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr));
  gap:0; margin-bottom:0;
}
.rd-ec-weekday{
  font-size:12px;
  color:var(--muted) !important;
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:0 4px;
  text-align:center;
  justify-self:center;
}

.rd-ec-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:0;
  border-top:1px solid var(--border);
  border-left:1px solid var(--border);
}
.rd-ec-grid .rd-ec-day{
  border:none !important;
  border-right:1px solid var(--border) !important;
  border-bottom:1px solid var(--border) !important;
}
.rd-ec-day{
  min-width:0;
  background: var(--bg);
  border-radius:0;
  padding:0.2rem;
  min-height:96px;
  cursor:pointer;
  position:relative;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
  text-align:center;
}
.rd-ec-day:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17,24,39,.06);
}
.rd-ec-day.is-muted{
  opacity:.55;
  background: rgba(17,24,39,.02) !important;
}
.rd-ec-day.is-selected{
  background: #E5F2F7 !important;
}

.rd-ec-daynum{
  width:30px; height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:0;
  border:none;
  padding:0;
  font-weight:800;
  font-size:12px;
}

.rd-ec-colors{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
  width:100%;
}
.rd-ec-dot{
  display:block;
  width:100%;
  height:8px;
  border-radius:0;
  border:1px solid rgba(17,24,39,.15);
}

.rd-ec-list{ border:none; padding:0; padding-top:16px; }
.rd-ec-list-head{ display:flex; align-items:baseline; justify-content:flex-start; gap:0; margin-bottom:12px; }
.rd-ec-list-title{ display:none; }
.rd-ec-list-date{ color:var(--muted) !important; font-weight:800; }

.rd-ec-cards{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.rd-ec-card{
  display:block;
  border-top:0;
  border-left:0;
  border-right:0;
  border-bottom:1px solid var(--border);
  border-radius:0;
  padding:0;
  padding-bottom:10px;
  background: var(--bg);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rd-ec-card:hover{
  transform:none;
  box-shadow:none;
}
.rd-ec-card-info{ font-size:12px; color:var(--muted) !important; font-weight:800; margin-bottom:6px; }
.rd-ec-card-title{ font-size:14px; font-weight:900; line-height:1.2; }

/* Color indicators inside event cards (list) */
.rd-ec-card .rd-ec-colors,
.rd-ec-card .rd-ec-colors-card{
  width:15%;
  max-width:15%;
  margin-top:0;
  margin-bottom:8px;
  align-items:flex-start;
}
.rd-ec-card .rd-ec-dot{
  height:9px;
}

.rd-ec-empty{
  border:1px dashed var(--border);
  border-radius:0;
  padding:16px;
  color:var(--muted) !important;
  background: var(--soft);
  grid-column:1 / -1;
}

.rd-ec-pagination{ display:flex; gap:10px; margin-top:14px; }
.rd-ec-more, .rd-ec-less{
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border);
  background: var(--bg);
  border-radius:0;
  padding:10px 14px;
  cursor:pointer;
  font-weight:900;
}

/* Prevent theme focus styles (e.g., red borders) */
.rd-ec-wrap button:focus,
.rd-ec-wrap button:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}
.rd-ec-wrap button:hover,
.rd-ec-wrap button:focus,
.rd-ec-wrap [type=button]:hover,
.rd-ec-wrap [type=button]:focus,
.rd-ec-wrap [type=submit]:hover,
.rd-ec-wrap [type=submit]:focus{
  background:#E5F2F7 !important;
  color: var(--text) !important;
}
.rd-ec-wrap .rd-ec-day:focus,
.rd-ec-wrap .rd-ec-day:focus-visible{
  box-shadow: none;
}
.rd-ec-wrap .rd-ec-navbtn:focus,
.rd-ec-wrap .rd-ec-navbtn:focus-visible{
  border: none !important;
}

/* Responsive */
@media (max-width:900px){
  .rd-ec-cards{ grid-template-columns:1fr; }
  .rd-ec-current{ min-width:150px; }
  .rd-ec-grid{ gap:0; }
  .rd-ec-weekhead{ gap:0; }
  .rd-ec-card .rd-ec-colors,
  .rd-ec-card .rd-ec-colors-card{
    width:25%;
    max-width:25%;
  }
}

@media (max-width:640px){
  /* Mobile: maximize usable space */
  .rd-ec-wrap{ padding:10px; border-radius:0; }

  .rd-ec-header{ gap:8px; }
  .rd-ec-title{ font-size:15px; }
  .rd-ec-current{ min-width:0; font-size:13px; }

  .rd-ec-navbtn{ width:34px; height:34px; border-radius:0; }

  /* no gaps between date cells */
  .rd-ec-weekhead{ gap:0; margin-bottom:0; }
  .rd-ec-weekday{ font-size:11px; padding:0; text-align:center; }

  .rd-ec-grid{ gap:0; }

  /* day cells: reduce padding for small screens */
  .rd-ec-day{
    padding:0.2rem;
    border-radius:0;
    min-height:70px;
  }

  .rd-ec-daynum{
    width:26px; height:26px;
    font-size:11px;
    border-radius:0;
    border:none;
    padding:0;
  }

  .rd-ec-colors{ gap:4px; margin-top:6px; }
  .rd-ec-dot{ width:100%; height:6px; border-radius:0; }

  /* list/cards */
  .rd-ec-cards{ grid-template-columns:1fr; gap:10px; }
  .rd-ec-card{ border-radius:0; padding:0; padding-bottom:10px; }
}

@media (min-width:641px){
  .rd-ec-header{ gap:10px; }
  .rd-ec-title{ font-size:16px; }
  .rd-ec-current{ min-width:0; font-size:14px; }
  .rd-ec-navbtn{ width:36px; height:36px; border-radius:0; }
  .rd-ec-weekhead{ gap:0; }
  .rd-ec-grid{ gap:0; }
  .rd-ec-day{ min-width:0; min-height:92px; padding:0.2rem; border-radius:0; }
  .rd-ec-daynum{ width:28px; height:28px; font-size:12px; border-radius:0; border:none; padding:0; }
  .rd-ec-dot{ width:100%; height:9px; }
}

/* Strong overrides so theme/cache cannot hide these (screenshot-1 to 6) */
.rd-ec-wrap{
  border-radius:0 !important;
  box-shadow:none !important;
  border:none !important;
  padding:0 !important;
}
.rd-ec-header{
  display:flex !important;
  justify-content:center !important;
}
.rd-ec-header .rd-ec-nav button:nth-child(1),
.rd-ec-header .rd-ec-nav button:nth-child(3),
.rd-ec-navbtn{
  border:none !important;
}
a.rd-ec-card,
.rd-ec-card{
  padding:0 !important;
  padding-bottom:10px !important;
  border-top:0 !important;
  border-left:0 !important;
  border-right:0 !important;
  border-bottom:1px solid var(--border) !important;
  border-radius:0 !important;
}
.rd-ec-day{
  border:none !important;
  border-radius:0 !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  align-items:center !important;
}
.rd-ec-grid{
  display:grid !important;
  grid-template-columns:repeat(7,1fr) !important;
  gap:0 !important;
  border-top:1px solid var(--border) !important;
  border-left:1px solid var(--border) !important;
}
.rd-ec-grid .rd-ec-day{
  border-right:1px solid var(--border) !important;
  border-bottom:1px solid var(--border) !important;
}
.rd-ec-daynum{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:0 !important;
  border:none !important;
  padding:0 !important;
  font-weight:800 !important;
}
