@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap');

/* General Reset */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', sans-serif;
    background-color: #ffffff;
    box-sizing: border-box;
    font-weight: normal;
    color: #333; 
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: transparent;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
}

.name {
    font-family: 'Asap', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    font-weight: normal;
}

.profession {
    font-family: 'SUSE', sans-serif;
    font-size: 16px;
    color: #666;
    font-weight: normal;
    margin-left: 50px;
}

/* Menu Styles */
.menu-container {
    position: relative;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
}

.menu-icon div {
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 10px;
    position: absolute;
    top: 50px;
    right: -10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: none;
    z-index: 10;
    width: 200px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.menu li {
    padding: 8px 0;
    cursor: pointer;
}

.menu li a {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: none;
}

.menu li a:hover {
    color: #474747;
}

/* Container for Main and Calendar */
.main-container {
    display: flex; /* Flexbox layout */
    justify-content: space-between; /* Spread out main content and calendar */
    gap: 20px;  /* Space between main content and calendar */
}

main {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
    font-family: 'Asap', sans-serif;
    font-weight: normal;
}

main .greeting,
main .next-shift-title h2,
main .shift-details-box span,
main .upcoming-title h2,
main .upcoming-plan-box span {
    font-weight: normal;
}

.upcoming-title h2 {
    font-size: 25px; 
}


/* Adding right padding to section to move it a bit to the right */
.welcome-section {
    width: 65%;
    padding-left: 30px;  /* Add padding to move content to the right */
}

.greeting {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.next-shift-title h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

/* Updated for Date, Time, Address, and Plan Boxes */
.details-box {
    display: flex;
    flex-direction: column;
    border: 1px solid #090909;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    margin-bottom: 10px;
}

.detail-item .icon {
    font-size: 16px;
    color: #333;
}

.detail-text {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.shift-details-box {
    background-color: #fff;
    border: 1px solid #000; 
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

.date-today {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.icon {
    font-size: 16px;
    color: #333;
}

/* Upcoming Section */
.upcoming-topic {
    font-weight: bold;
}


.header-right {
    display: flex;
    align-items: center;
}

.shift-details-box .detail-item .detail-text {
    font-weight: bold;
}

.upcoming-plans .detail-text {
    font-weight: bold; 
    color: #333; 
}

.info {
    margin-right: 20px;
}

.photo {
    margin-right: 20px;
}

.photo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.day {
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Calendar styling */
.calendar-container {
    width: 100%; /* Adjust width to control the size of the calendar (horizontal) */
    height: 520px; /* Set height to make it a horizontal rectangle */
    background-color: #D9D9D9;
    border-radius: 30px 30px 0 0; /* Rounded top corners, straight bottom corners */
    padding: 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin-left: -200px; /* Slightly move the calendar to the left */
    margin-top: 80px;
    scroll-snap-align: start;
    position: relative;
}

.calendar-scroll-container {
    height: 100vh; 
    overflow-y: scroll; 
    scroll-snap-type: y mandatory; 
}

/* Calendar Header */
.calendar-header {
    text-align: center;
    display: flex;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Asap', sans-serif;
    padding-top: 15px; /* Add space above the header */
    border-radius: 8px;
    padding: 10px 30px;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);  /* 7 columns for the days of the week */
    gap: 2px;
    overflow-y: auto;  /* Allows vertical scrolling if needed */
    height: 100%;
}

/* Button Styles */
.prev-month-btn,
.next-month-btn {
    background-color: #8c8c8c;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

/* Hover and Focus Effects */
.prev-month-btn:hover,
.next-month-btn:hover {
    background-color: #707070;
    transform: scale(1.1);
}

.prev-month-btn:focus,
.next-month-btn:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(84, 84, 84, 0.8);
}

/* Month and Year Display */
.month-year {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
    margin: 0 10px;
    color: #333;
}

.month-year {
    flex: 1;
    text-align: center;
    font-size: 25px;
    font-weight: bold;
    margin-top: 30px;
}

.days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr); 
    text-align: center;
    font-weight: bold;
    color: #555;
    margin-top: 10px;
    padding: 0 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

/* Day of the Week */
.day-of-week {
    font-weight: bold;
    color: #141414;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right: 20px;
    font-family: 'Asap', sans-serif; 
}

/* Date Box Styling */
.date-box {
    position: relative;
    background-color: #F4F4F4;
    padding: 10px;
    min-height: 100px;
    text-align: left;
    font-size: 14px;
}

/* Date Number */
.date-number {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 18px;
    font-weight: normal;
}

/* Add style for today's date with a highlighted background and square shape */
.date-box.today {
    background-color: #a2a2a2bc;  /* Green background */
    color: rgb(255, 255, 255);  /* White text color */
    font-weight: bold;  /* Make it stand out */
    border: 2px solid #dbdada84;  /* Add a border for better distinction */
}

.date-box.today .date-number {
    font-size: 1.2em;  /* Make the date number slightly larger */
}

.modal-title {
    font-size: 28px; 
}


.modal-content label,
.modal-content input,
.modal-content select,
.modal-content textarea {
    display: block; 
    width: 100%; 
    max-width: 400px; 
    margin-left: 4px; 
    margin-right: 0; 
}

#event-form input[type="date"],
#event-form input[type="time"],
#event-form input[type="text"] {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px;
}

input[type="date"],
input[type="time"],
textarea,
select {
    margin-bottom: 5px;
}

/* Event Details inside the Date Box */
.event {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    color: #333;
}

.event-time {
    font-weight: bold;
}

.event-location {
    color: #666;
}

#event-plan { 
    min-height: 120px;
    resize: vertical;  
    padding: 10px;
    margin-top: -10px; 
}

.address-container label {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.custom-select select {
    width: 95%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.custom-select optgroup {
    font-weight: bold;
    color: #000000;
}

.custom-select option {
    padding: 8px;
}


/* Modal Overlay (Background Blur) */

.modal-overlay {
    display: none;  
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 5;  
}

/* Modal Styling */ 
.modal {
    display: none; 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 500px; 
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Modal Content Styling */
.modal-content {
    padding: 25px; 
    margin-left: 20px;
}

/* Form Fields */
input, textarea {
    width: calc(100% - 24px); 
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

input:focus, textarea:focus {
    background-color: #fff;
    border-color: #7b7b7b;
    outline: none;
}

/* Modal Action Buttons */
.modal-actions {
    display: flex;
    justify-content: flex-start;
    gap: 250px;
    margin-top: 20px; 
}

.action-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 150px; 
}

.save-btn {
    background-color: #000000;
    color: white;
    border: none;
    position: relative;
    right: -5px; 
}

.delete-btn {
    background-color: #000000;
    color: white;
    position: relative;
    left: -20px; 
}

.save-btn:hover, .delete-btn:hover {
    transform: scale(1.05);
}

.save-btn:active, .delete-btn:active {
    transform: scale(0.95);
}

/* Modal Visible State */
.modal.show {
    display: flex;
    opacity: 1;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.day {
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
}

#event-form {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px; 
}

#event-form textarea {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    resize: none; 
    margin-top: 5px;
}

#event-form label {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px; 
    margin-bottom: 5px; 
    display: block; 
}

/* Hide availability by default */
#availability {
    display: none;
    position: fixed;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;   
    height: 80%;  
    background-color: white;
    border-radius: 10px;
    text-align: center; 
    z-index: 1000;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: rgb(154, 154, 154);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn::before {
    content: '\00d7'; 
    font-size: 2rem;
    color: inherit; 
}

.close-btn:hover {
    color: rgb(147, 147, 147);
}

.close-btn:hover::before {
    color: rgb(147, 147, 147);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
}


.modal-overlay.active {
    display: block;
}

#availability, .modal-overlay {
    display: none;
}

#availability.active, .modal-overlay.active {
    display: block;
}

/* Availability header styles */
.availability-header {
    background-color: rgb(4, 4, 4);
    color: white;
    padding: 2rem;
    padding-top: 60px; /* Adds space at the top of the container */
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 更柔和的阴影 */

}

/* Profile photo styles */
.availability-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Name style */
.availability-name {
    font-size: 1.6rem;
    margin-top: 5px;
}

/* Availability details grid layout */
.availability-details {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: repeat(2, auto); 
    gap: 10px; 
    padding: 20px;
    background-color: #ffffff; 
    color: rgb(0, 0, 0);
    height: 60%; /* Adjust height to fit in the container */
    position: relative;
    border-radius: 10px;
}

/* Horizontal and Vertical Lines as Cross */
.availability-details::before,
.availability-details::after {
    content: '';
    position: absolute;
    background-color: #ccc; /* Light grey color for the lines */
}
.availability-details::before {
    width: 100%;
    height: 1px; /* Horizontal line */
    top: 50%;
    left: 0;
}

.availability-details::after {
    width: 1px; /* Vertical line */
    height: 100%;
    left: 50%;
    top: 0;
}

.profile-container {
    position: relative;
    display: inline-block;
}

.availability-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.upload-button {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: white;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

.upload-button:hover {
    background-color: #ddd;
}


/* Detail box style */
.detail-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.detail-title{
    text-align: center; /* Center text horizontally */
    margin: 5px 0; /* Add spacing between title and value */
}

.detail-value {
    text-align: center; /* Center text horizontally */
    margin: 5px 0; /* Add spacing between title and value */
    color: #7b7b7b;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%; 
    transition: background-color 0.3s ease; 
}

.status-indicator.resting {
    background-color: green;
}

.status-indicator.busy {
    background-color: red;
}

.status-text {
    font-size: 1rem; 
    font-weight: normal;
}


@media (max-width: 768px) {
    .calendar-container {
        width: 180%;
        height:500px;
        margin-right: 30px;
        margin-top: 700px; 
        position: relative; 
        bottom: 0; 
    }
}

@media (max-width: 768px) {
    .calendar {
        grid-template-columns: repeat(7, 1fr);  
        gap: 5px;
        
    }
    .day {
        padding: 8px; 
        font-size: 14px; 
    }
    .month-year {
        font-size: 20px; 
    }
    .calendar-header {
        font-size: 18px;  
    }
    .prev-month-btn,
    .next-month-btn {
        padding: 8px 15px;  
        font-size: 16px;  
    }
    .date-box {
        font-size: 12px; 
        padding: 8px;
    }
    .event {
        font-size: 11px;  
    }
}

@media (max-width: 768px) {
    .modal {
        width: 50%; 
        max-width: 400px; 
        padding: 15px; 
    }
    .close-btn {
        font-size: 24px; 
    }
}

@media (max-width: 768px) {
    .menu li a {
        font-size: 16px;  
    }
    .prev-month-btn,
    .next-month-btn {
        font-size: 19px; 
    }
}

@media (max-width: 768px) {
    .custom-select select {
        width: 96%; 
        padding: 8px; 
        font-size: 14px; 
    }
}

@media (max-width: 768px) {
    #availability {
        width: 400px; 
        height: 450px;
    }

    .availability-header {
        display: flex;
        flex-direction: column; 
        align-items: center;
    }

    .availability-photo {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        margin-bottom: 10px; 
    }

    .availability-name {
        font-size: 1.5rem; 
    }

    .availability-details {
        margin-top: 20px;
    }

    .detail-box {
        display: flex;
        flex-direction: column; 
        align-items: center;
        margin-bottom: 15px;
    }

    .detail-box i {
        font-size: 1.5rem; 
        margin-bottom: 5px; 
        margin-top: 5px;
    }

    .detail-title {
        font-size: 1rem; 
        margin-bottom: 2px; 
        margin-top: 5px;
    }

    .detail-value {
        font-size: 1rem; 
        text-align: center;
    }

    .close-btn {
        font-size: 1.5rem; 
        position: absolute;
        top: 10px;
        right: 10px;
    }
}