/* General Calendar Styling */
.calendar {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    font-family: "Arial", sans-serif;
    text-align: center;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 10px;
    border-radius: 10px 10px 0 0;
}
.calendar-header input[type="date"] {
    border-radius: 20px;
    border: none;
    padding: 6px 15px;
}

.calendar-header span {
    font-size: 18px;
    font-weight: bold;
}

.change-month {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.change-month:hover {
    text-decoration: underline;
}

/* Calendar Table */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th, .calendar-table td {
    width: 14%;
    height: 50px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-table td.calendar-day.no-events {
    pointer-events: none;
}

.calendar-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.calendar-day {
    background: #f1f1f1;
    border-radius: 50%;
    transition: 0.3s;
}

.calendar-day:hover {
    background: var(--primary-color);
    color: white;
}

/* Highlighted Event Days */
.event-day {
    background: #ffcc00 !important;
    color: black !important;
    font-weight: bold;
}

/* Selected Day */
.calendar-day.selected {
    background: #28a745 !important;
    color: white !important;
    font-weight: bold;
}

/* Event List */
.event-articles {
    margin-top: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.event-articles h3 {
    color: var(--primary-color);
}

.event-articles ul {
    list-style: none;
    padding: 0;
}

.event-articles li {
    padding: 5px 0;
}

.event-articles li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

.event-articles li a:hover {
    text-decoration: underline;
}


/* Highlight Today's Date */
.calendar-day.today {
    background-color: #ffeb3b !important; /* Yellow */
    font-weight: bold;
    border-radius: 50%;
    /* border: 2px solid #ff9800; */
}

/* Highlight Days with Events */
.calendar-day.event-day {
    background-color: #4CAF50; /* Green */
    color: white;
    font-weight: bold;
    border-radius: 50%;
    position: relative;
}

/* Add a small bullet below event days */
.calendar-day.event-day::after {
    content: "•";
    color: white;
    font-size: 1.5em;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.newline {
  display: block;
}


/* Wrapper with scroll */
.daily-calendar-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

/* Table settings */
.daily-calendar-table {
  width: 100%;
  border-collapse: separate; /* Prevents border overlap/flicker */
  border-spacing: 0;
  table-layout: auto; /* Helps prevent shrink */
}

/* All cells */
.daily-calendar-table th,
.daily-calendar-table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  min-width: 180px;
  background: #fff;
  white-space: nowrap;
}

/* Header row */
.daily-calendar-table th {
  background: #f5f5f5;
  position: sticky;
  top: 0;
  z-index: 3; /* Keeps header on top */
}

/* First column fix */
.daily-calendar-table th:first-child,
.daily-calendar-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f3f3f3;
  width: 150px;
  min-width: 150px;
  transform: translateZ(0); /* Prevent flicker */
}

/* Header first cell should be above everything */
.daily-calendar-table th:first-child {
  z-index: 4;
}
.calendar-container .event-articles{
    padding: 0;
}
.calendar-container .event-articles .event-articles-detail {
    margin-top: 15px;
    padding: 15px;
    background: #F5F5F5;
    box-shadow: none;
    border-radius: 10px;
}
.calendar-container .event-articles .event-articles-detail h3 {
    color: var(--primary-color);
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
}
.calendar-container .event-articles .event-articles-detail ul {
    margin: 0;
}
.calendar-container .event-articles .event-articles-detail ul li a {
    color: var(--primary-color);
    font-weight: 500;
}
.calendar-container .event-articles .event-articles-detail p {
    margin-bottom: 0;
}
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 10px; /* space on right side */
    margin-bottom: 5px; /* spacing between rows */
}

.event-title a {
    text-decoration: none;
}

.event-date {
    margin-left: 10px; /* little gap before pushing right */
}
