:root {
    --project-list-width: clamp(150px, 20vw, 300px);
    --ecol-main-bg-color: #83986e;
    --ecol-light-bg-color: #e3edd9;
    --ecol-darker-bg-color: #54420D;
    --ecol-beige: #F0EEE1;
    --ecol-tan: #dbd6b8;
    --ecol-brown: #A69D6B;
    --ecol-light-tan: #e3e0cc;
}

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

.hidden {
    display: none;
}

.column2 {
    column-count: 2;
    column-gap: 20px;
}

.column2> :first-child {
    margin-top: 0 ! important;
}

svg.ecoicon {
    width: 2em;
    color: var(--ecol-darker-bg-color);
    stroke: var(--ecol-darker-bg-color);
}

.branding.banner {
    width: 100%;
}

.branding.banner img {
    display: block;
    width: 80%;
    margin: 0 auto;
    max-width: 340px;
}

.mini-banner {
    background-color: var(--ecol-main-bg-color);
    color: white;
    padding: 10px;
    margin: 10px 0;
}

#jumptodate-link-wrapper {
    text-align: center;
    margin: -10px 0 0 0;
}

#jumptodate-link {
    color: var(--ecol-light-tan);
    font-size: 80%;
    text-decoration: none;
}

#jumptodate-form h3,
#jumptodate-form p {
    text-align: center;
    line-height: 2;
}

h1 {
    font-size: 20px;
    text-align: center;
    margin: 0.5em 0;
}

button,
input[type="submit"] {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--ecol-light-tan);
    color: var(--ecol-darker-bg-color);
}

button[disabled],
input[type="submit"][disabled] {
    border: none;
    cursor: text;
    background-color: #f8f8f8;
    color: var(--ecol-light-tan);
}

p {
    max-width: 50em;
}

header#headerMenu {
    background-color: var(--ecol-beige);
    padding: 1rem;
}

header#headerMenu nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

header#headerMenu nav a {
    text-decoration: none;
    color: var(--ecol-darker-bg-color);
}

p.flash {
    /* border-top: #b91e3b solid 5px; */
    /* border-bottom: #b91e3b solid 5px; */
    padding: 0.9em;
    text-align: center;
    max-width: none;
    background-color: #ffaa00;
    color: white;
}

main .standard-padding {
    padding: 20px;
}
main .mini-banner + .standard-padding {
    padding: 0 20px 20px;
}

main .standard-padding>h2:first-child {
    margin-top: 0;
}

/* set password styling */
.input-unit label,
.input-unit input {
    display: block;
}

main .standard-padding .input-unit {
    margin: 1em 0;
}

main .standard-padding .input-unit input[type="text"],
main .standard-padding .input-unit input[type="password"],
main .standard-padding .input-unit input[type="email"] {
    width: 100%;
    max-width: 400px;
    font-size: 1.3em;
}

/* Page Header Styling */
#divPageHeader span.day {
    padding: 0 0.4em;
}

#divPageHeader span.day.selected {
    /* this will actually be for the a:link, but for now, just to see it */
    color: var(--ecol-darker-bg-color);
}

/* Flex Layout for Drag and Drop Area - Default for Larger Screens */
#divDragDrop {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    /* Align items at the top */
}

/* Unscheduled List Styling with Fixed Width */
#divUnscheduled {
    width: 250px;
    /* Fixed width for unscheduled names */
    background-color: var(--ecol-beige);
    padding: 15px;
    min-height: 150px;
    /* Minimum height for usability */
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Unscheduled Heading Styling */
#divUnscheduled h2 {
    color: #54420D;
    padding: 20px 10px 5px 25px;
    border-radius: 5px 5px 0 0;
    margin: -15px -15px 15px -15px;
    font-size: 1.2em;
}

/* Person Item Styling */
.person {
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.person:hover {
    background-color: var(--ecol-light-bg-color);
}

.person.selected {
    background-color: #b3e5fc;
    /* Light blue background to indicate selection */
    border: 2px solid #0288d1;
    /* Highlighted border */
}

/* Projects Container Styling with Flex and Minimum Size */
#divProjects {
    flex: 1;
    /* Take up the remaining space */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Adjust based on space */
    gap: 20px;
}

/* Individual Project Box Styling */
#divProjects .project {
    background-color: var(--ecol-beige);
    padding: 20px;
    min-height: 150px;
    /* Minimum height for usability */
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
}

/* Project Heading Styling */
#divProjects .project h2 {
    background-color: var(--ecol-darker-bg-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    /* Rounded top corners */
    margin: -20px -20px 15px -20px;
    /* Overlap the top and align with sides */
    font-size: 1.2em;
}

#divProjects .project:hover {
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
}

/* Lead section styling within each project */
#divProjects .project .team-lead {
    background-color: var(--ecol-tan);
    padding: 10px;
    border-bottom: 2px solid var(--ecol-main-bg-color);
    font-weight: bold;
    color: var(--ecol-darker-bg-color);
    text-align: center;
}

/* Visual indicator for drop target */
#divProjects .project .team-lead.drag-over {
    background-color: var(--ecol-light-bg-color);
    border: 2px dashed var(--ecol-main-bg-color);
}

.not-on-phones {
    display: initial;
}

.only-on-phones {
    display: none;
}

/* Responsive Styling for Smaller Screens */
@media (max-width: 767px) {
    .not-on-phones {
        display: none;
    }

    .only-on-phones {
        display: initial;
    }

    #divQuickCalendar {
        display: none;
    }

    #divDragDrop {
        flex-direction: column;
        /* Stack unscheduled and projects vertically */
    }

    #divUnscheduled,
    #divProjects {
        width: 100%;
        /* Full width for readability */
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    #divProjects {
        display: block;
        /* Make projects list stack vertically */
    }

    #divProjects .project {
        margin-bottom: 15px;
    }
}

.dragging {
    opacity: 0.5;
}

.drag-over {
    border: 2px dashed var(--ecol-main-bg-color);
    /* Highlight the drop target */
    background-color: var(--ecol-light-bg-color);
}

#divCopyFrom {
    padding: 0.5rem;
    background-color: var(--ecol-tan);
    margin: 0 0 1rem;
}

#divCopyFrom label {
    display: block;
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin: 0 0 0.3rem;
}

/* popup */
/* Popup Overlay */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup.hidden {
    display: none;
}


/* Popup Content Styling */
.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    font-family: Arial, sans-serif;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.5em;
}

.popup-content .close-button+h2 {
    color: var(--ecol-main-bg-color);
    text-align: center;
    margin: 0em 0 0.8em;
}

a#addPersonLink {
    position: absolute;
    right: 13px;
    top: 13px;
}

#addPersonLink img {
    width: 30px;
}

/* Add Person Form Styling */
#addPersonForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#addPersonForm label {
    font-weight: bold;
}

#addPersonForm input {
    padding: 5px;
    font-size: 1em;
}

#addPersonForm button {
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#addPersonForm button:hover {
    background-color: var(--ecol-main-bg-color);
}



.requirement.approved {
    color: green;
}

.requirement {
    color: red;
}

.small-but-helpful {
    font-size: 80%;
    color: #999;
}

/* Modal dialog styling */
/* Hidden by default */
.modal.hidden {
    display: none;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

button.modal__close {
    background: transparent;
    display: block;
    height: auto;
    padding: 2px 0 0 3px;
    color: #555;
    text-align: center;
    font-size: 25px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border-radius: 4px;
    border: 1px solid #bbb;
    cursor: pointer;
    box-sizing: border-box;
    position: absolute;
    right: 10px;
    top: 10px;
}

.modal__close:before {
    content: "\2715";
}

/* Modal content */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 90%;
    max-width: 500px;
}

#jumptodate-modal .modal-content {
    max-width: 230px;
    background-color: var(--ecol-beige);
}

/* Modal actions */
.modal-actions,
body.admin .admin-only.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button.becareful {
    background-color: #ff5050;
    color: white;
    display: none;
}

.modal-actions button.cancel {
    background-color: #f5f5f5;
    color: #333;
}

#project-modal label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-top: 0.6em;
}

#project-modal .project-details {
    max-height: 25vh;
    overflow-y: scroll;
    margin-bottom: 2em;
}

#project-modal table {
    border-collapse: collapse;
    margin: 1rem 0;
}

#project-modal table th,
#project-modal table td {
    border: rgba(0, 0, 0, 0.2) solid 1px;
    padding: 4px 8px;
    text-align: left;
}

#project-modal div.scroller {
    max-height: 10em;
    width: 90%;
    overflow-y: auto;
    white-space: pre-wrap;
    padding: 0.2em;
    line-height: 1.4;
}

/* schedule wheel on the main staff page */
.schedule-wrapper {
    position: relative;
    height: 410px;
    padding-top: 65px;
}

.schedule-container {
    width: 100%;
    height: 300px;
    /* Adjust height for mobile */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    /* flex-direction: column; */
    /* align-items: center; */
    overflow: hidden;
    position: relative;
    padding: 30px 0;
}

.schedule-container .loading-icon-container {
    display: none;
    width: 100%;
    text-align: center;
    height: 5em;
    z-index: 100;
    position: relative;
}

.schedule-container.loading .schedule-wheel {
    visibility: hidden;
}

.schedule-container.loading .loading-icon-container {
    display: block;
}

/* Wheel container to hold the list of days */
.schedule-wheel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.5s ease;
    /* Smooth animation */
    margin: 0;
    padding: 0;
}

/* Individual day items */
.schedule-wheel li {
    list-style: none;
    height: 60px;
    /* Day box height */
    /* display: flex; */
    justify-content: center;
    align-items: center;
    font-size: 12px;
    opacity: 0.5;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.schedule-wheel li div {
    text-align: center;
    max-width: 65vw;
}

#schedule-wheel li .date {
    font-size: 1.2em;
}

#schedule-wheel li .details {
    font-size: 0;
}

.schedule-wheel li.focused {
    font-weight: bold;
    transform: scale(1.3);
    opacity: 1;
    height: 120px;
    padding: 0.1em 0;
    box-sizing: border-box;
}

#schedule-wheel .focused.weekend .date {
    font-size: 1.5em;
}

#schedule-wheel .weekend .project {
    display: none;
}

#schedule-wheel .project a {
    text-decoration: none;
    color: black;
}

#schedule-wheel .focused .project a {
    color: var(--ecol-darker-bg-color);
    text-decoration: underline;
}

#schedule-wheel li.focused .date {
    font-size: 2em;
    color: var(--ecol-darker-bg-color);
}

#schedule-wheel li.focused .details {
    font-size: 1em;
}

#schedule-wheel li.focused .details p {
    max-width: 260px;
    margin: 3px auto;
}

#schedule-wheel li.focused .details .notes-container {
    font-size: 9px;
}

#schedule-wheel li.focused.weekend .details .notes-container {
    font-size: 12px;
}

#schedule-wheel li.focused .details .notes-container > div {
    display: inline-block;
    margin: 0 3px;
}

#schedule-wheel li.focused .details .notes-container > div::before {
    content: '⚫';
    display: inline-block;
    margin-right: 2px;
    font-size: 3px;
    position: relative;
    bottom: 2px;
}
/* Masking fade effect */
.schedule-container:before,
.schedule-container:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: 1;
}

.schedule-container:before {
    top: 0;
}

.schedule-container:after {
    bottom: 0;
    transform: rotate(180deg);
}

/* Up and Down arrow indicators */
.swipe-indicator {
    position: absolute;
    font-size: 24px;
    color: #AE1E39;
    width: 100%;
    text-align: center;
    z-index: 99;
}

@keyframes pulseup {
    0% {
        opacity: 0.6;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }

    100% {
        opacity: 0.6;
        transform: translateY(0);
    }
}

#up-indicator {
    top: 10px;
    /* Near the top of the container */
}

#up-indicator.pulsing {
    animation: pulseup 0.35s infinite;
}

@keyframes pulsedown {
    0% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(5px);
    }

    100% {
        opacity: 0.3;
        transform: translateY(0);
    }
}

#down-indicator {
    bottom: 10px;
    /* Near the bottom of the container */
}

#down-indicator.pulsing {
    animation: pulsedown 0.35s infinite;
}

.modal-content>div {
    margin: 1em 0;
}

/* search page */

form#formSearch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

body.search .side-by-side {
    display: flex;
    gap: 2em;
}

body.search .side-by-side > div {
    flex: 1;
}

body.search .search-results-wrapper h2 {
    text-align: center;
}

div.search-results {
    border: var(--ecol-main-bg-color) solid 1px;
    max-width: 1100px;
    margin: 0 auto;
    max-height: 540px;
    overflow: auto;
    max-height: calc( 100vh - 330px );
}

.no-results {
    text-align: center;
    margin: 2em;
}

.search-result {
    padding: 0.6rem 1rem;
    border-bottom: var(--ecol-main-bg-color) solid 1px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    gap: clamp( 1rem, 4vw, 4rem );
}

.search-result.past {
    opacity: 0.5;
}

.search-result > a.date {
    width: 6.5em;
    min-width: 6.5em;
}

.search-result:hover {
    background-color: var(--ecol-beige);
}

.search-result a {
    text-decoration: none;
    color: var(--ecol-darker-bg-color);
}

.search-result a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .search-result > a:first-child {
        width: 3.5em;
        min-width: 3.5em;
    }
}
