.hidden {
    display: none !important;
}

/* Calendar */
#calendar-container {
    width: 95%;
    max-width: 600px;
    margin: 0px auto;
    padding: 10px;
    background-color: rgba(40, 40, 40, 0.7);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #eee;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

#calendar-header {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

#calendar-header button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 8px;
    border-radius: 5px;
    width: 40px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#calendar-header button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#currentMonthYear {
    font-size: 1.4em;
    font-weight: bold;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;

    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#calendar-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.calendar-day-header,
.calendar-day {
    padding: 10px 5px;
    border-radius: 4px;
    min-height: 2vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    justify-content: flex-start;
}

.calendar-day-header {
    font-weight: bold;
    color: #bbb;
    font-size: 0.9em;
}

.calendar-day {
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.today {
    background-color: rgba(80, 200, 120, 0.3);
    font-weight: bold;
    border: 1px solid rgba(80, 200, 120, 0.5);
}

.calendar-day .day-number {
    font-size: 1em;
}

/* Event Occurence Styling */
.calendar-day.has-past-event {
    background-color: rgba(180, 180, 180, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.calendar-day.is-past-day {
    background-color: rgba(195, 195, 195, 0.1);
}

.calendar-day .day-number.past-day-text {
    color: #888;
}

.calendar-day.has-tomorrow-event {
    background-color: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.6);
}

.calendar-day.has-future-event {
    background-color: rgba(255, 193, 7, 0.25);
    border: 1px solid rgba(255, 193, 7, 0.5);
}

/* Event Count Indicator on Day Cell */
.day-event-count-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #e74d3ca1;
    border: 1px solid #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 4x 4px;
    font-size: 0.75em;
    font-weight: bold;
    line-height: 1.2;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add Event Panel */
#add-event-panel {
    display: flex;           
    justify-content: center; 
    align-items: center;     
    flex: 1;                 
    width: 95%;
    max-width: 600px;
    padding: 10px;           
    background-color: rgba(40, 40, 40, 0.7);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 10px auto 0px auto;
}

#addEventIconContainer {
    display: flex;
    justify-content: center;
}

.icon-btn {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reminders */
.reminders-section {
    margin-top: 15px;
    margin-bottom: 10px;
}

.reminders-section > label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color-dark);
}

#remindersContainer .reminder-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    background-color: rgba(0,0,0,0.05);
    padding: 5px;
    border-radius: 5px;
}

#remindersContainer .reminder-item input[type="datetime-local"] {
    flex-grow: 1;
    margin-right: 8px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
    color: #333;
}

#remindersContainer .reminder-item .remove-reminder-btn {
    background: none;
    border: none;
    color: var(--danger-color, #e74c3c);
    cursor: pointer;
    font-size: 1.3em;
    padding: 5px;
    line-height: 1;
}

#remindersContainer .reminder-item .remove-reminder-btn:hover {
    color: var(--danger-hover-color, #c0392b);
}

#addReminderBtn {
    margin-top: 5px;
    padding: 8px 10px;
    background-color: #c7995c3b;
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 25px;
}

#addReminderBtn i {
    margin-right: 5px;
}

/* Day Activity Dialog (Event List) */
#dayActionDialogTitle {
    color: #eee;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-align: center;
}

.day-action-events-list {
    padding: 0;
    margin: 0 0 15px 0;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
}

.day-action-events-list a {
    display: block;
    padding: 8px 12px;
    color: #b0e0e6;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.9em;
}

.day-action-events-list a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Upcoming Events Panel */
#upcoming-events-panel {
    width: 90%;
    max-width: 600px;
    margin: 10px auto;
    padding: 15px;
    background-color: rgba(40, 40, 40, 0.6);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    color: #eee;
}

#upcoming-events-panel.hidden {
    display: none;
}

#upcoming-events-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    color: #ddd;
    font-size: 1.1em;
}

#upcoming-events-list {
    display: flex;
    overflow-x: auto;
    justify-content: left;

    -webkit-mask-image: linear-gradient(to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 1) 5%, 
        rgba(0, 0, 0, 1) 95%,  
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 1) 5%,
        rgba(0, 0, 0, 1) 95%,
        rgba(0, 0, 0, 0) 100%
    );
}

.upcoming-event-btn {
    padding: 5px 12px;
    margin: 10px 7px;
    font-size: 0.85em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    max-width: 140px;
    flex-basis: 0;
    flex-grow: 1;
    line-height: 1.3;
    border-radius: 25px;
    background-color: #c7995c3b;
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #eee; 
}

.upcoming-event-btn-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.upcoming-event-btn-datetime {
    font-size: 0.8em;
    color: #ccc;
    display: block;
}

.upcoming-event-btn.is-tomorrow {
    background-color: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.6);
}

#no-upcoming-events-placeholder {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 5px 0;
    margin: auto;
}

/* Upcoming Event Items */
.upcoming-event-item {
    padding: 8px 12px;
    margin: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    flex-shrink: 0;
}

.upcoming-event-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.upcoming-event-item .event-title {
    font-weight: bold;
    color: #eee;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upcoming-event-item .event-date {
    font-size: 0.85em;
    color: #ccc;
}

.upcoming-event-item.is-today {
    background-color: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.5);
}

.upcoming-event-item.is-today:hover {
    background-color: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.7);
}

.upcoming-event-item.is-tomorrow {
    background-color: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
}

.upcoming-event-item.is-tomorrow:hover {
    background-color: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.7);
}