/* Add your custom styles here */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;600&display=swap');

:root {
    --primary-bg-color: #f0ead2;
    --primary-text-color: #31572c;
    --highlight-color: #9bbaa0;
    --disabled-color: #31572c;
    --busy-color: #ffc0cb; /* Light pink for busy times */
    --text-font-family: var(--e-global-typography-text-font-family), sans-serif;
}

#custom-ics-calendar {
    font-family: "Jost", sans-serif;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--primary-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-text-color);
    border: 0;
    outline: none;
}

#calendar-header button:hover, #calendar-header button:focus {
    color: var(--highlight-color);
}

#current-month {
    font-family: var(--text-font-family);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-text-color);
}

#calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-cell, .time-slot {
    padding: 10px;
    background-color: #fff;
    text-align: center;
    cursor: pointer;
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-bottom: 5px; /* Added margin-bottom */
}

.calendar-cell:hover, .time-slot:hover {
    background-color: var(--highlight-color);
}

.calendar-cell.disabled-day, .time-slot.busy-slot, .time-slot.selected-busy-slot {
    background-color: var(--disabled-color); /* Light grey for disabled or busy slots */
    cursor: not-allowed;  
    color: #FFF;
}

.calendar-cell.busy {
    background-color: #fff; /* White background for busy cells */
    overflow: hidden; /* Hide overflow for diagonal pattern */
}

.calendar-cell.busy:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(49, 87, 44, 0.5), rgba(49, 87, 44, 0.5) 12.5%, transparent 12.5%, transparent 25%);
    pointer-events: none; /* Prevent interaction with the pseudo-element */
    z-index: -1; /* Behind the content */
}

.event-list {
    margin-top: 20px;
}

.event-item {
    background-color: #fff;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-summary {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-text-color);
}

.event-datetime {
    font-style: italic;
    color: var(--primary-text-color);
}
#selected-date {
    color: var(--primary-text-color);
    font-size: 20px;
    margin-top: 20px;
}

/* Responsive styles for calendar */
@media (max-width: 600px) {
    #calendar-body {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Adjust column size for small screens */
    }

    .calendar-cell, .time-slot {
        font-size: 0.8rem; /* Smaller font size for small screens */
    }
}

/* Reset button styling */
.reset-button {
    background-color: var(--primary-text-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--text-font-family);
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.reset-button:hover {
    background-color: var(--highlight-color);
}

/* SVG styles */
#calendar-header button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
