/*generic styling*/
:root {
  --primary-clr: #ED832F;
}

footer {
  margin-top: 20px;
}

* {
  margin: 0;
  box-sizing: border-box;
}

#calendar-intro {
  text-align: center;
  margin: 50px 0;
}

#calendar-intro p {
  margin: 20px 0;
}

#programs-calendar {
  position: relative;
  width: 100%;
  height: 90%;
  padding: 10px;
  color: #fff;
  display: flex;
  border-radius: 10px;
  background-color: #ED832F;
}

/*calendar*/
#left {
  width: 60%;
  padding: 20px;
}

.calendar {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  color: #878895;
  border-radius: 5px;
  background-color: #fff;
}

/* set after behind the main element */
.calendar::before,
.calendar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 12px;
  height: 97%;
  border-radius: 0 5px 5px 0;
  background-color: #ead0bb;
  transform: translateY(-50%);
}

.calendar::before {
  height: 94%;
  left: calc(100% + 12px);
  background-color: #ecac77;
}

.month {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: capitalize;
}

.month .prev,
.month .next {
  cursor: pointer;
}

.month .prev:hover,
.month .next:hover {
  color: var(--primary-clr);
}

.weekdays {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: capitalize;
}

.weekdays div {
  width: 14.28%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.days {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.days .day {
  width: 14.28%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary-clr);
  border: 1px solid #f5f5f5;
}

.days .day:nth-child(7n + 1) {
  border-left: 2px solid #f5f5f5;
}

.days .day:nth-child(7n) {
  border-right: 2px solid #f5f5f5;
}

.days .day:nth-child(-n + 7) {
  border-top: 2px solid #f5f5f5;
}

.days .day:nth-child(n + 29) {
  border-bottom: 2px solid #f5f5f5;
}

.days .day:not(.prev-date, .next-date):hover {
  color: #fff;
  background-color: var(--primary-clr);
}

.days .prev-date,
.days .next-date {
  color: #b3b3b3;
}

.days .active {
  position: relative;
  font-size: 2rem;
  color: #fff;
  background-color: var(--primary-clr);
}

.days .active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 10px 2px var(--primary-clr);
}

.days .today {
  font-size: 2rem;
}

.days .event {
  position: relative;
}

/* Event dots - normal state */
.days .event::after {
  content: "●";
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  background-color: transparent;
  color: #007bff;
  font-size: 24px;
  font-weight: bold;
  width: auto;
  height: auto;
  border-radius: 0;
}
/* Multiple events */
.days .event.multiple-events::after {
  content: "●●";
  letter-spacing: 1px;
  font-size: 24px;
}

/* Hover state */
.days .day:hover.event::after {
  background-color: transparent;
  color: #007bff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Active/selected state */
.days .active.event::after {
  background-color: transparent;
  color: #007bff;
  bottom: 8%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}


.days .active.event {
  padding-bottom: 10px;
}

/* Multiple events */
.days .event.multiple-events::after {
  content: "●●";
  letter-spacing: 1px;
  font-size: 24px;
}

.recurring-event-banner {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #2196f3;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
  animation: slideInFromTop 0.3s ease-out;
}

.recurring-event-banner.active {
  display: flex !important;
}

.recurring-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recurring-banner-icon {
  font-size: 20px;
  color: #1976d2;
}

.recurring-banner-text {
  color: #1565c0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

.recurring-banner-text .event-series-title {
  font-weight: 600;
  color: #0d47a1;
}

.jump-to-parent-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.jump-to-parent-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
  color: white;
  text-decoration: none;
}

.jump-to-parent-btn i {
  font-size: 12px;
}

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

/* Day selector styling */
.days-of-week-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #0d0d0e !important;
    min-width: 70px;
    justify-content: center;
}

.day-checkbox:hover {
    border-color: var(--primary-clr);
    background: rgba(237, 131, 47, 0.1);
}

.day-checkbox input[type="checkbox"] {
    display: none;
}

.day-checkbox.selected {
    background: var(--primary-clr);
    border-color: var(--primary-clr);
    color: white !important;
}

.day-checkbox.selected:hover {
    background: #d4741f;
    border-color: #d4741f;
    color: white;
}

/* Pattern selector improvements */
.pattern-frequency-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.frequency-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#today {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 20px;
  margin-bottom: 20px;
  color: var(--primary-clr);
}

.go-to {
  display: flex;
  align-items: center;
  border-radius: 5px;
  overflow: hidden;
  gap: 10px;
}

.date-input {
  padding: 8px 12px;
  border: 2px solid #d0d3d6;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 500;
  color: #495057;
  background: #fff;
  transition: all 0.3s ease;
  min-width: 120px;
}

.date-input:focus {
  outline: none;
  border-color: var(--primary-clr);
  box-shadow: 0 0 0 1px var(--primary-clr);
}

.date-input::placeholder {
  color: #adb5bd;
  font-style: italic;
}

#today-btn {
  padding: 5px 10px;
  border: 1px solid var(--primary-clr);
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  color: var(--primary-clr);
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

#today-btn:hover {
  color: #fff;
  background-color: var(--primary-clr);
}

#go-btn {
  padding: 5px 10px;
  border: 1px solid var(--primary-clr);
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  color: var(--primary-clr);
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

#go-btn:hover {
  color: #fff;
  background-color: var(--primary-clr);
}

/*calendar event display*/
.right {
  position: relative;
  width: 40%;
  min-height: 100%;
  padding: 20px 0;
}

.today-date {
  width: 100%;
  height: 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  margin-top: 50px;
  margin-bottom: 5px;
  text-transform: capitalize;
}

.event-day {
  font-size: 2.5rem;
  font-weight: 700;
  color: black;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.event-date {
  font-size: 1.5rem;
  font-weight: 600;
  color: black;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.events {
  width: 100%;
  height: 100%;
  max-height: 600px;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-left: 4px;
}

.events .event {
  position: relative;
  width: 95%;
  min-height: 70px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  margin: 5px;
  color: black;
}

.event a {
  color: black;
}

/* even event */
.events .event:nth-child(even) {
  background: rgba(255, 255, 255, 0.12);
}

.events .event:hover {
  background: #e6ae80;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.events .event .title {
  display: flex;
  align-items: center;
}

.events .event .title .event-title {
  font-size: 1rem;
  font-weight: 500;
}

.events .event i {
  color: var(--primary-clr);
  font-size: 0.5rem;
}

.events .event:hover i {
  color: #fff;
}

.events .event .event-time .event-category {
  font-size: 0.8rem;
  font-weight: 400;
  color: #878895;
  margin-left: 15px;
  pointer-events: none;
}

.event-time {
  color: black;
}

.events .event:hover::after {
  display: flex;
}

.events .no-event {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 500;
  color: black;
}

/*login to enroll link*/
.event-details-calendar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.event-details-calendar button {
  background-color: #888888;
}

.event-details-calendar button:hover {
  background-color: #767676;
}

/*alert messages*/
.alert.alert-success {
  text-align: center;
  padding: 20px;
  color: green;
}

.alert.alert-danger {
  text-align: center;
  padding: 20px;
  color: red;
}

/*admin functions - add event*/
.add-event-wrapper {
  position: absolute;
  bottom: 100px;
  left: 50%;
  width: 90%;
  max-height: 0;
  overflow: hidden;
  border-radius: 5px;
  background-color: #fff;
  transform: translateX(-50%);
  transition: max-height 0.5s ease;
  display: flex;
  flex-direction: column;
}

.add-event-wrapper.active {
  max-height: 90vh;
  overflow-y: auto;
  border: var(--primary-clr) 1px solid;
}

.add-event-header {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  color: #373c4f;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.add-event-header .close {
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 25%;
  transition: all 0.3s ease;
  /* color: #6c757d; */
  color: red;
}

.add-event-header .close:hover {
  color: var(--primary-clr);
  background: rgba(237, 131, 47, 0.1);
}

.add-event-header .title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-clr);
}

.add-event-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.add-event-body .add-event-input {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.add-event-body .add-event-input input {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  border-bottom: 1px solid #f5f5f5;
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 400;
  color: #373c4f;
}

.add-event-body .add-event-input input::placeholder {
  color: #a5a5a5;
}

.add-event-body .add-event-input input:focus {
  border-bottom: 1px solid var(--primary-clr);
}

.add-event-body .add-event-input input:focus::placeholder {
  color: var(--primary-clr);
}

.add-event-body .add-event-input-date {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-event-body .add-event-input-date label,
.add-event-body .add-event-input label{
  font-size: 1rem;
  color: #a5a5a5;
}

.add-event-body .add-event-input-date input {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  border-bottom: 1px solid #f5f5f5;
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 400;
  color: #373c4f;
  height: 40px;
}

.add-event-body .add-event-input-select {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.add-event-body .add-event-input-select label {
  font-size: 1rem;
  color: #a5a5a5;
}

.add-event-body .add-event-input-select select {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  border-bottom: 1px solid #f5f5f5;
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 400;
  color: #373c4f;
}

.add-event-body .add-event-input-select select:focus {
  border-bottom: 1px solid var(--primary-clr);
}

.add-event-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.add-event-footer .add-event-btn {
  height: 45px;
  font-size: 1.1rem;
  font-weight: 600;
  outline: none;
  border: none;
  color: #fff;
  background-color: var(--primary-clr);
  border-radius: 8px;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid var(--primary-clr);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(237, 131, 47, 0.3);
}

.add-event-footer .add-event-btn:hover {
  background-color: transparent;
  color: var(--primary-clr);
}

.btn{
  color: black;
}

.add-event {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-clr);
  border: 2px solid var(--primary-clr);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}

.add-event:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border: #773f11;
  background: #773f11;
  color: #fff;
}

.add-event i {
  font-size: 1.5rem;
}

/* recurring options */
.recurring-options {
  border: 1px solid var(--primary-clr);
  padding: 10px 15px;
  margin-top: 15px;
  border-radius: 5px;
  background-color: transparent;
  animation: slideDown 0.3s ease-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* container styling for all recurring inputs */
/* .add-event-input-recurring,
.recurring-options .add-event-input,
.recurring-options .add-event-input-select,
.recurring-options .add-event-input-date,
.add-event-input-recurring-end {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: left;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
} */

/* label styling */
/* .add-event-input-recurring label,
.add-event-input-recurring-end label,
.recurring-options .add-event-input label,
.recurring-options .add-event-input-select label,
.recurring-options .add-event-input-date label {
  font-size: 1rem;
  font-weight: 500;
  color: #a5a5a5;
  min-width: 120px;
  margin-bottom: 0;
  flex-shrink: 0;
} */

/* Inputs for recurring options */
/* .recurring-enabled,
.recurring-pattern,
.recurring-end-type,
.recurring-end-date-input {
  height: 45px;
  padding: 12px 15px;
  border: 1px solid #999;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  flex: 1;
  transition: border-color 0.2s ease;
} */

/* Styling for the recurring event menu */
/* Recurring form elements */
.add-event-input-recurring,
.add-event-input-recurring-end {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.add-event-input-recurring label,
.add-event-input-recurring-end label {
    font-size: 1rem;
    color: #a5a5a5;
    font-weight: 500;
}

.recurring-enabled,
.recurring-end-type {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    font-size: 1rem;
    background: transparent;
    color: #373c4f;
}

.recurring-enabled:focus,
.recurring-end-type:focus {
    outline: none;
    border-bottom: 1px solid var(--primary-clr);
}


/* Pattern frequency styling */
.pattern-frequency-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.frequency-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.recurring-interval-input {
    width: 80px;
    height: 40px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    text-align: center;
    font-size: 1rem;
    background: transparent;
    color: #373c4f;
}

.recurring-interval-input:focus {
    outline: none;
    border-bottom: 1px solid var(--primary-clr);
}

.pattern-select {
    height: 40px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    font-size: 1rem;
    background: transparent;
    color: #373c4f;
    flex: 1;
}

.pattern-select:focus {
    outline: none;
    border-bottom: 1px solid var(--primary-clr);
}

/* Days selector */
.days-selector-container {
    width: 100%;
    margin-bottom: 15px;
}

.days-selector-container label {
    font-size: 1rem;
    color: #a5a5a5;
    margin-bottom: 10px;
    display: block;
}

/* End date inputs */
#recurring-end-date,
#recurring-end-after {
    width: 100%;
    margin-top: 15px;
}

#recurring-end-date label,
#recurring-end-after label {
    font-size: 1rem;
    color: #a5a5a5;
    margin-bottom: 8px;
    display: block;
}

.recurring-end-date-input,
.recurring-end-after-input {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    font-size: 1rem;
    background: transparent;
    color: #373c4f;
}

.recurring-end-date-input:focus,
.recurring-end-after-input:focus {
    outline: none;
    border-bottom: 1px solid var(--primary-clr);
}

/* Recurring indicator in events */
.recurring-indicator {
    font-size: 24px;
    margin-left: 5px;
    opacity: 0.9;
    color: #007bff;
}

/* Smaller inputs for numbers */
.recurring-interval,
.recurring-end-after-input {
  height: 45px;
  width: 80px;
  padding: 12px 15px;
  border: 1px solid #999;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  text-align: center;
  margin-right: 10px;
  transition: border-color 0.2s ease;
}

/* Focus states for all inputs */
.recurring-enabled:focus,
.recurring-pattern:focus,
.recurring-end-type:focus,
.recurring-end-date-input:focus,
.recurring-interval:focus,
.recurring-end-after-input:focus {
  outline: none;
  border-color: var(--primary-clr);
  box-shadow: 0 0 0 2px rgba(237, 131, 47, 0.2);
}

/* Text labels for units */
#interval-label,
.recurring-options .add-event-input span:not(#interval-label) {
  font-size: 1rem;
  font-weight: normal;
  color: #666;
  white-space: nowrap;
}

/* Recurring indicator in events */
.recurring-indicator {
  font-size: 24px;
  margin-left: 5px;
  opacity: 0.9;
  color: #007bff;
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }

  to {
    opacity: 1;
    max-height: 400px;
    overflow: visible;
  }
}

/* Event title styling */
.event-title {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ======================= Responsive Design ======================= */
@media (max-width: 768px) {
  #programs-calendar {
    width: 90%;
    flex-direction: column;
    height: auto;
  }

  #left, .right {
    width: 100%;
    padding: 10px;
  }

  .month {
    padding: 0 30px;
  }

  .today-date {
    padding: 0 30px;
    margin-top: 20px;
  }

  .days .day {
    height: 50px !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .days .active {
    font-size: 1.2rem !important;
    line-height: 1 !important;
  }

  .add-event-wrapper {
    width: 95%;
  }

  .add-event-body .add-event-input-date input {
    max-width: 280px;
  }
}

.hidden {
  display: none;
}

/* Hide days selector for non-weekly patterns */
.recurring-options.hide-days .days-selector-container {
    display: none;
}
