body {
    font-family: Arial, sans-serif;
    padding: 0;
    margin: 0;
}

.container {
margin-top: -4vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    margin-right: 3vw;
    margin-top: -2vh;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');

h1 {
    text-align: center;
    color: rgb(0, 181, 24);
    font-size: 2.5rem;
    margin-top: 2vh;
    font-family:'Playfair Display', serif
}

.navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Desktop Layout */
.buttons-container {
    display: flex;
    justify-content: space-between; /* Space between elements */
    align-items: center; /* Align vertically */
    padding: 10px;
}

/* Center the view buttons */
.view-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Centering trick */
}

/* Keep Add Event button on the right */
.add-event-button {
    margin-left: auto; /* Push it to the right */
}

/*month view*/
.days-of-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-weight: bold;
    text-align: center;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4vh;
}

.empty {
    visibility: hidden; /* Keeps grid structure while hiding empty spaces */
}

button {
    padding: 8px 15px;
    margin: 5px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 7px;
    background-color: #f0f0f0;
    border: 0.5px solid rgb(153, 153, 153); /* Change thickness here */
}

button:hover {
    background-color: rgb(227, 255, 232);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.day {
    border: 1px solid #ddd;
    cursor: pointer;
    height: 18vh; /* Adjust this value as needed */
    display: flex; /* Ensures content is centered properly */
    align-items: top;
    justify-content: center;
    font-size: 0.8rem;
    transition: background-color 0.2s ease-in-out; /* Smooth transition */
}

.day:hover {
    background-color: rgba(121, 121, 121, 0.1); /* Slightly darker background on hover */
}

.hidden {
    display: none;
}

.prev-month-day {
    background-color: rgb(230, 230, 230);
}

.next-month-day {
    background-color: rgb(230, 230, 230);
}

.day-container {
    position: relative;
    width: 100%; /* Fill up the width of the day box */
    text-align: center;
    padding-top: 2px;
}

.day-number {
    position: relative;
    z-index: 2; /* Ensure the day number stays on top */
}

.short-event {
    text-align: left;
    padding: 2.3px 2px;
    font-size: 0.78rem;
}

.today {
    position: relative;
    display: inline-block;
    width: 17px;              /* Smaller circle */
    height: 18x;
    background-color: rgb(0, 122, 0);
    color: white;
    border-radius: 50%;
    font-size: 12px;          /* Adjust for readability */
    text-align: center;
    line-height: 20px;        /* Same as height to center vertically */
    vertical-align: middle;
}

/*week view stlying*/

.week-grid {
    gap: 6px;
    width: 98vw;
    padding: 0 0.4vw;
}

.day-column {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 600px; /* Adjust height to fit multiple events */
    border: 1px solid #ddd;
    padding-top: 3px;
    border-right: 1px solid #ccc;
    border-radius: 10px;
}

.day-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

.event-block {
    position: absolute;
    background-color: var(--event-color, #007bff); /* Default color if none provided */
    color: rgb(0, 0, 0);
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 95%; /* Adjust width to fit inside the day column */
    cursor: pointer;
    font-size: 14px;
}

.event-text {
    font-size: 0.9rem;
    line-height: 1.4;
}


/* day view styling */

#day-view {
    margin-top: -2vh;
}

#selected-day {
    text-align: center;
    font-size: 1.3rem;
}

.schedule-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 7vh;
    margin-left: 1vw;
    overflow-y: auto;
    max-height: 600px;
    position: relative;
}

.time-block {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    align-items: center;
    position: relative;
}

.time-label {
    width: 50px;
}

.event-slot {
    flex-grow: 1;
    height: 21px;
    border-left: 1px solid #ddd;
    position: relative;
}

/* Make the cursor a hand when hovering over any day column in the weekly view */
.day-column {
    cursor: pointer;
}

/* year view */
.months-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 0px 80px;
    margin-bottom: 4vh;
}

.month-tile {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0px 10px;
    padding-top: 10px;
    background-color: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    width: calc(25% - 15px); /* Ensures 4 per row */
    box-sizing: border-box;
    height: 32vh;
}

.month-tile:hover {
    background-color: #e6e6e6;
}

.month-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.mini-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 13px;
}

.mini-day {
    width: 30px;
    height: 30px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
}

.mini-day.empty {
    background: none;
    border: none;
}

.current-day {
    position: relative;
}

.current-day-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: green;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px; /* Adjust size of the number inside the circle */
}

/*newly added css on mar 31st for the events and full screen view in day view */ 
.event-box {
    position: absolute;
    border-radius: 15px;
    font-size: 14px;
    margin-top: vh;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    cursor: pointer; /* Make it clickable */
}

.event-box .event-name {
    font-weight: bold;
}

.event-box .event-notes {
    font-size: 14px;
    color: #444;
}

.event-box .event-location {
    font-size: 14px;
    color: #000;
}

/* Modal Styles */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #fff;
}

.modal-content {
    word-wrap: break-word;  /* Ensures long words break and wrap */
    overflow-wrap: break-word; /* Additional wrapping support */
    white-space: normal; /* Allows text to wrap naturally */
    max-width: 40%; /* Ensures content does not exceed modal width */
}

.modal-content h2, 
.modal-content p {
    overflow: hidden; /* Prevents overflow issues */
    text-overflow: ellipsis; /* Adds "..." if needed */
    white-space: normal; /* Ensures text wraps properly */
    max-width: 100%; /* Ensures the text does not go outside modal */
}

.modal-content button {
    position: absolute;
    top: 50px;
    right: 40px;
    background-color: #ff0000;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}

.delete-button {
    position: absolute;
    top: 10px;
    left: 40px;
    color: white;
    border: none;
    padding: 0px 12px;
    cursor: pointer;
    border-radius: 5px;
    width: 8vw;
    height: 5vh;
    font-size: 1rem;
}

.delete-button:hover {
    background-color: darkred;
}

/* event form container */
#event-form-container {
    position: absolute;
    top: 200px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    padding: 10px;
    width: 40vw;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Ensures it's above other elements */
}

#event-name {
    margin: 0.5vh 0;
    padding: 0.5vw;
    width: 89%;
    font-size: 1.5rem;
}

#event-location {
    width: 93%;
    padding: 0.5vw;
    font-size: 1rem;
    margin: 0.5vh 0;
}

textarea {
    width: 93.4%;
    padding: 0.5vw;
    font-size: 1rem;
    margin: 0.5vh 0;

}

#color-picker {
    display: flex;
    gap: 40px;
    margin-top: 3vh;
    justify-content: center;
}

.color-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 3px solid rgb(0, 0, 0); /* Highlight selected color */
}

.date-time-container {
    display: flex;
    align-items: center; /* Align elements in a row */
    gap: 5px;
}

.date-group, .time-group {
    display: flex;
    flex-direction: row; /* Keeps label above input/select */
    gap: 5px; /* Small spacing between label and input */
}

#event-date {
    width: 73%;
    font-size: 1rem;
}

label {
    margin: 0 0vw;
}

#start-time {
    width: 52%;
    font-size: 1rem;
}

#end-time {
    width: 53%;
    font-size: 1rem;
}

.save-btn-container {
    display: flex;
    justify-content: flex-end; /* Moves button to the right */
    margin-top: 10px; /* Adds spacing */
}

#save-event-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    width: 15%;
    height: 6vh;
}

#save-event-btn:hover {
    background-color: #0056b3;
}

/* close button on event container */
.close-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    font-size: 14px;
    cursor: pointer;
    background-color: #ffffff;
    border: none;
}

.close-btn:hover {
    background: rgb(227, 255, 206);
}


#custom-alert {
    position: fixed;
    top: 20%;
    right: -5%;
    width: 20%;
    transform: translateX(-50%);
    background-color: rgba(212, 254, 227, 0.8);
    color: rgb(0, 0, 0);
    padding: 15px;
    border-radius: 5px;
    font-size: 16px; /* You can adjust the font size here */
    z-index: 9999;
}

/* Mobile Styles */
@media only screen and (max-width: 1048px) {
    .header {
flex-direction: column;
margin-top: 5vh;
    }
    
    /* Adjust the font size for the h1 header */
    h1 {
        font-size: 2.5rem;
        margin-top: 3vh;
    }

    /* Stack navigation buttons vertically */
    .navigation {
        align-items: center;
        gap: 15px;
        margin-top: -2vh;
    }

    .buttons-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0px;
        position: static;
        margin-top: -3vh;
        margin-left: 2vw;
    }

    .view-buttons {
        position: static;
        transform: none;
        justify-content: center;
    }

    .add-event-button {
        margin-left: 15px; /* Keep spacing */
    }

    /* Adjust button size and padding for mobile */
    button {
        padding: 5px 14px;
        font-size: 1rem;
    }

    .short-event {
font-size: 0.30rem;
    }

    .add-event-button {
        margin-top: 2vh;
        margin-bottom: 2vh;
    }

    /* Adjust the calendar grid */
    .days-of-week, .days {
        font-size: 1rem;
    }

    .day {
        height: 15vh;
        font-size: 0.7rem;
    }

    /* Adjust the month view grid to 3 per row */
    .months-container {
        padding: 0px 10px;
        gap: 10px;
    }

    .month-tile {
        width: calc(33.3% - 10px); /* 3 months per row */
        height: 25vh;
    }

    /* Adjust event form container width */
    #event-form-container {
        width: 90vw;
        top: 150px;
        right: 10px;
        padding-top: 5vh;
    }

    /* Adjust input fields for mobile */
    #event-name, #event-location, textarea {
        font-size: 1rem;
        padding: 2vw;
        width: 95%;
    }

    .date-time-container {
        display: flex;
        gap: 13px; /* Add spacing between groups */
        align-items: center; /* Align elements in a row */
        flex-wrap: wrap; /* Ensures responsiveness */
    }
    
    .date-group, .time-group {
        display: flex;
        flex-direction: column; /* Keeps label above input/select */
        gap: 5px; /* Small spacing between label and input */
    }

    #event-date {
        width: 90%;
        font-size: 1rem;
    }
    
    label {
        margin: 0vh 0vw;
    }
    
    #start-time {
        width: 100%;
        font-size: 1rem;
    }
    
    #end-time {
        width: 100%;
        font-size: 1rem;
    }
    
    .save-btn-container {
        display: flex;
        justify-content: flex-end; /* Moves button to the right */
        margin-top: 10px; /* Adds spacing */
    }
    
    #save-event-btn {
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        transition: 0.3s;
        width: 25%;
        height: 5vh;
        margin-top: 1.5vh;
        font-size: 1.2rem;
        padding: 0.5vh 0; /* Adjusts top and bottom spacing */
        text-align: center;
    }
    
    #save-event-btn:hover {
        background-color: #0056b3;
    }

    /* Adjust color picker for smaller screens */
    #color-picker {
        flex-wrap: wrap;
        gap: 18px;
    }

    .color-option {
        width: 22px;
        height: 22px;
    }

    .close-btn {
        position: absolute;
        top: 1px;
        right: 1px;
        font-size: 19px;
        cursor: pointer;
        background-color: #ffffff;
        border: none;
    }

    #week-view-btn {
        display: none;
    }

    #current-view-title {
        font-size: 1.9rem;
    }

    .month-tile {
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 0px 10px;
        padding-top: 10px;
        background-color: #ffffff;
        text-align: center;
        cursor: pointer;
        transition: 0.3s;
        width: calc(50% - 15px); /* Ensures 4 per row */
        box-sizing: border-box;
        height: 32vh;
    }

    .mini-day {
        width: 3vw;
        height: 4vh;
        line-height: 20px;
        text-align: center;
        border-radius: 4px;
    }

    .time-label {
        font-size: 12px; /* Adjust size as needed */
    margin-left: -1.5vw;
    width: 40px;
    }

    .current-day {
        position: relative;
    }
    
    .current-day-circle {
        position: absolute;
        top: 0;
        left: 0;
        width: 16px;
        height: 20px;
        border-radius: 50%;
        background-color: green;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px; /* Adjust size of the number inside the circle */
    }

    .today {
        position: relative;
        display: inline-block;
        width: 15px;              /* Smaller circle */
        height: 15px;
        background-color: rgb(0, 122, 0);
        color: white;
        border-radius: 50%;
        font-size: 10px;          /* Adjust for readability */
        text-align: center;
        line-height: 15px;        /* Same as height to center vertically */
        vertical-align: middle;
    }

/* day viewnewly added css on mar 31st for the events and full screen view in day view */ 
.event-box {
    position: absolute;
    border-radius: 10px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    cursor: pointer; /* Make it clickable */
}

.event-box .event-name {
    font-size: 13px;
    font-weight: bold;
}

.event-box .event-time {
    font-size: 12px;
    color: #000000;
}

.event-box .event-notes {
    font-size: 14px;
    color: #444;
    display: none;
}

.event-box .event-location {
    font-size: 14px;
    color: #000;
    display: none;
}

/* Modal Styles */
.event-modal {
    position: fixed;
    top: -20px;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #fff;
}

.modal-content {
    word-wrap: break-word;  /* Ensures long words break and wrap */
    overflow-wrap: break-word; /* Additional wrapping support */
    white-space: normal; /* Allows text to wrap naturally */
    max-width: 90%; /* Ensures content does not exceed modal width */
}

.modal-content h2, 
.modal-content p {
    overflow: hidden; /* Prevents overflow issues */
    text-overflow: ellipsis; /* Adds "..." if needed */
    white-space: normal; /* Ensures text wraps properly */
    max-width: 100%; /* Ensures the text does not go outside modal */
}

.modal-content button {
    position: absolute;
    top: 15vh;
    right: 10px;
    background-color: #ff1313;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9rem;
    height: 35px;  /* Ensure height is defined */
    line-height: 15px; /* Same as height to center text */
    text-align: center; /* Ensures horizontal centering */
}

.delete-button {
    position: absolute;
    top: 40px;
    left: 10px;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 35vw;
    height: 4.5vh;
    font-size: 0.9rem;
}

.delete-button:hover {
    background-color: darkred;
}

#custom-alert {
    position: fixed;
    top: 20%;
    width: 45%;
    transform: translateX(-50%);
    background-color: rgba(212, 254, 227, 0.8);
    color: rgb(0, 0, 0);
    padding: 15px;
    border-radius: 5px;
    font-size: 16px; /* You can adjust the font size here */
    z-index: 9999;
}
}


