/* =====================================================
   BASE WRAPPER + TOOLBAR
===================================================== */

.ics-calendar-wrapper {
  max-width: 1200px;
  margin: auto;
  font-family: Inter, sans-serif;
}

.ics-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ics-toolbar input {
    flex: 1;
}

.ics-toolbar input,
.ics-toolbar select {
  padding: 12px;
  border: 1px solid #ccc;
}

select#ics-view {
  width: 120px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  background-position: right 12px center; /* 👈 yaha control */
  padding-right: 38px;
}

.ics-btn {
  background: #d6adff;
  color: #fff;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
}

/* =====================================================
   HEADER + ARROWS
===================================================== */

.ics-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.prev-month,
.next-month {
  background: #d6adff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
}

.prev-month:disabled,
.next-month:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* =====================================================
   CALENDAR GRID (MONTH)
===================================================== */

#ics-calendar {
  width: 100%;
}

.ics-view-month #ics-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.ics-weekday {
  font-weight: 600;
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.ics-day {
  min-height: 170px;
  border: 1px solid #eee;
  padding: 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.ics-day.empty {
  background: #fafafa;
}

.ics-day:hover {
  background: rgba(0,0,0,0.02);
  box-shadow: inset 0 -3px 0 #111;
}

.ics-date {
  font-weight: 700;
  margin-bottom: 5px;
}

.ics-day.ics-today .ics-date {
  color: #b97cff;
}

/* =====================================================
   EVENTS (COMMON)
===================================================== */

.ics-event {
  font-size: 12px;
  background: #f3f3f3;
  padding: 6px;
  margin-top: 6px;
  border-left: 3px solid #d6adff;
  cursor: pointer;
  box-sizing: border-box;
}

.ics-event-time {
  font-size: 11px;
  color: #666;
}

.ics-event-title {
  font-weight: 600;
  font-size: 12px;
}
.ics-week-day .ics-event-title, .ics-sunday-simple .ics-sunday-title {
  font-size: 14px;
}
.ics-week-day .ics-event{
  padding: 18px 20px;
}
.ics-week-day  .ics-event-time, .ics-sunday-time {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

/* =====================================================
   TOOLTIP
===================================================== */

.ics-tooltip {
  position: fixed;
  z-index: 999999;
  width: 320px;
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border-radius: 6px;
  padding: 12px;
  display: none;
}

.ics-tooltip-date {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.ics-tooltip-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ics-tooltip-desc {
  font-size: 12px;
  color: #444;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   MODAL
===================================================== */

.ics-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  padding: 16px;
  display: none;
}

/* .ics-modal-content {
  background: #fff;
  max-width: 520px;
  width: 100%;
  padding: 20px;
  border-radius: 10px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
} */
/* Centered modal box */
.ics-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ real centering */

  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  padding: 20px;

  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.ics-close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    background-color: #d6adff;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    color: #fff;
}

#ics-modal-title {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
}

#ics-modal-desc {
  font-size: 14px;
}

/* =====================================================
   MODAL VENUE
===================================================== */

.ics-modal-venue {
  margin-top: 14px;
}

.ics-modal-venue-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.ics-modal-venue-text {
  font-size: 14px;
  line-height: 1.5;
}

.ics-modal-venue-map {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #7c3aed;
  font-weight: 500;
  text-decoration: none;
}

.ics-modal-venue-map:hover {
  text-decoration: underline;
}

/* =====================================================
   SUNDAYS VIEW
===================================================== */

.ics-view-sundays #ics-calendar {
  display: flex;
  flex-direction: column;
}


.ics-sunday-item {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    margin-bottom: 20px
}
.ics-sunday-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ics-sunday-location {
  font-weight: 600;
  margin-bottom: 6px;
}

.ics-sunday-desc {
  line-height: 1.5;
}

.ics-week-day {
    margin-bottom: 30px;
}
.ics-week-day-title {
    font-size: 16px;
    font-weight: 600;
}



/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

#ics-search {
    width: 100%;
    flex: 0 1 100%;
}
  select#ics-view {
    flex: 1;
}

  /* Compact calendar */
  .ics-view-month #ics-calendar {
    grid-template-columns: repeat(7, 1fr);
  }

  .ics-day {
    min-height: 50px;
    height: 50px;
    padding: 6px;
    overflow: hidden;
  }

 .ics-view-month #ics-calendar .ics-day .ics-event {
    display: none !important;
  }

  .ics-date {
    font-size: 14px;
  }

  /* Dot for days with events */
  .ics-day.has-event::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #b48cff;
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Mobile events list */
  #ics-mobile-events {
    margin-top: 20px;
  }

  .ics-mobile-date-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .ics-mobile-event-item {
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
  }

  .ics-mobile-event-time {
    font-size: 13px;
    color: #777;
  }

  .ics-mobile-event-title {
    font-size: 14px;
    font-weight: 700;
  }
  .ics-weekday {
    font-size: 12px;
}
.ics-modal-content {
    max-width: 90%;
    width: 350px;
}

}