/* Import Google Font - Courier Prime */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Apply basic styles to all elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier Prime', monospace;
}

/* Overall styling for the body */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #dbc2a0;
    padding: 20px;
}

/* Styles for the main container */
.container {
    width: 70%; /* Increased width */
    background: #f6eee3;
    border-radius: 15px;
    min-height: 80vh; /* Increased min-height */
    padding: 0px; /* No padding */
    display: flex;
    flex-direction: column;
    margin-bottom: 100px;
}

/* Styles for the header section */
.container header {
    display: flex;
    align-items: center;
    padding: 35px 40px 15px; /* Increased padding */
    justify-content: space-between;
}

/* Style for the month and year text in the header */
header .monthANDyear {
    font-size: 3rem; /* Increased font size */
    font-weight: 500;
}

/* Styles for the navigation icons */
header .icons span {
    height: 50px; /* Increased height */
    width: 60px; /* Increased width */
    margin: 0 1px;
    background: #e5decf;
    text-align: center;
    cursor: pointer;
    line-height: 50px; /* Updated line-height */
    border-radius: 50%;
    font-size: 1.75rem; /* Increased font size */
}

/* Styles for the calendar grid */
.calendar {
    padding: 30px; /* Increased padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Remove list style and apply flex properties to calendar lists */
.calendar ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    text-align: center;
}

/* Styles for individual days and weeks in the calendar */
.calendar ul li {
    width: calc(100% / 7);
    position: relative;
    font-size: 1.5rem; /* Increased font size */
}

/* Bold and increase font size for week day names */
.calendar .week li {
    font-weight: bold;
    font-size: 2rem; /* Increased font size */
}

/* Margin to space days in the month from days in the week */
.calendar .day {
    margin-bottom: 25px; /* Increased margin-bottom */
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: space-between;
    margin-bottom: 25px; /* Removed margin-bottom */
}

/* Hover effect for individual days */
.calendar .day li {
    cursor: pointer;
    margin-top: 60px; /* Increased margin-top */
    z-index: 1;
    font-size: 1.8rem;
}

/* Styles for the hover effect (circle) under each day */
.calendar .day li::before {
    position: absolute;
    content: "";
    height: 70px; /* Increased height */
    width: 70px; /* Increased width */
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* Change background color on hover */
.day li:hover::before {
    background: #e5decf;
}

/* Change color for days not in the current month */
.day .faded {
    color: #aaa;
}

.day .faded-past {
    color: #aaa;
}

.day .faded-future {
    color: #aaa;
}

/* Highlight current day */
.day li.highlighted::before {
    background: #654321;
}

/* Invert text color for highlighted day */
.day li.highlighted {
    color: #f6eee3;
}

/* Pop-up window styles */
.popup {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
  background-color: #f6eee3;
  border: 1px solid #888;
  padding: 20px;
  width: auto; /* Allows content to determine width */
  max-width: none; /* Remove max-width constraint */
  border-radius: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: auto; /* Added to handle horizontal overflow */
}



/* Styles for the close button in the pop-up */
.popup .close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
}

.popup .close:hover,
.popup .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Styles for the header inside the pop-up */
.popup h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

/* Styles for the list of tasks in the pop-up */
.popup ul {
    list-style: none;
    padding-left: 20px;
}

.popup ul li {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Styles for the buttons inside the pop-up */
.styled-btn {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 1.2rem;
    color: #fff;
    background-color: #654321;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.styled-btn:hover {
    background-color: #dbc2a0;
    transform: translateY(-2px);
    color: #654321;
}

.styled-btn:active {
    background-color: #dbc2a0;
    transform: translateY(0);
    color: #654321;
}

.task-item {
  display: flex;
  align-items: center;
  background-color: #e5decf;
  border: 1px solid #888;
  padding: 15px 30px; /* Increased padding */
  margin: 10px 0; /* Increased margin */
  width: auto;
  flex-grow: 1; /* Allow the item to grow */
  max-width: none; /* Remove max-width constraint */
  border-radius: 15px;
  word-wrap: break-word;
  white-space: nowrap; /* Prevent line breaks */
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.task-item > * {
  margin-right: 20px; /* Increase spacing between elements */
}

.task-name {
  flex-grow: 1;
  font-size: 1.5rem;
}

.task-tag, .task-difficulty, .task-date {
  display: inline-block;
  padding: 5px 10px;
  font-size: 1.2rem;
  color: #fff;
  border-radius: 5px;
}



/* Styles for task status */
.task-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #888;
  margin-right: 10px;
}

.task-status.filled {
  background-color: #888;
}

.task-status.unfilled {
  background-color: transparent;
}

/* Styles for task name */
.task-name {
  flex-grow: 1;
  font-size: 1.5rem;
  margin-right: 50px;
}

/* Apply styles for completed tasks */
.task-item.completed .task-name {
  text-decoration: line-through;
  color: #888;
}

.task-item.completed {
  background-color: #ccc;
  color: #888;
}

.task-item.completed .task-tag,
.task-item.completed .task-difficulty,
.task-item.completed .task-date {
  color: #888;
}

/* Styles for task tag */
.task-tag {
  display: inline-block;
  padding: 5px 10px;
  font-size: 1.2rem;
  color: #fff;
  border-radius: 5px;
  margin-left: 10px;
  margin-right: 10px;
}

/* Styles for task difficulty */
.task-difficulty {
  display: inline-block;
  padding: 5px 10px;
  font-size: 1.2rem;
  color: #fff;
  border-radius: 5px;
  margin-left: 10px;
  margin-right: 10px;
}

/* Styles for task date */
.task-date {
  color: black;
  font-size: 1.2rem;
}

:root{
    --arrow-font-size: 1.5em;
    --top-bar-size: 2em;
    --palette-off-white: #F6EEE3;
    --palette-light-tan: #EEE7D7;
    --palette-light-grey: #E5DECF;
    --palette-pink: #E5CBBA;
    --palette-brown: #D9BDA5;
    --palette-background: #dbc2a0;
    --palette-dark-brown: #c9a36f;
    --header-margin-spacing: 40px;
    /* Some math shit to get here i.e. -5/90 to get back to 100 but need to multiply by 100 to get -500%/90) */
    --undo-margin: calc(-500%/90)
}
/* header style update for added logo */
header {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align items to the start */
  padding: 35px 40px 15px; /* Adjust padding as needed */
}

header img {
  margin-right: 10px; /* Space between the logo and the month/year text */
}

header .monthANDyear {
  font-size: 3rem; /* Font size */
  font-weight: 500;
  margin-left: 10px; /* Space between the logo and the text */
}

header .icons {
  display: flex;
  align-items: center;
  margin-left: auto; /* Push icons to the far right */
}

header .icons span {
  height: 50px; /* Height of the icons */
  width: 60px; /* Width of the icons */
  margin: 0 1px; /* Space between the icons */
  background: #e5decf; /* Background color */
  text-align: center; /* Center text inside the icons */
  cursor: pointer; /* Cursor style */
  line-height: 50px; /* Vertical alignment of text */
  border-radius: 50%; /* Rounded corners */
  font-size: 1.75rem; /* Font size */
}

/* Mobile styles */
@media (max-width: 768px) { /* Start of mobile styles */
    .container {
        width: 95%; /* Adjusted width for mobile responsiveness */
    }

    header .monthANDyear {
        font-size: 2rem; /* Adjusted font size for mobile responsiveness */
    }

    header .icons span {
        height: 40px; /* Adjusted height for mobile responsiveness */
        width: 40px; /* Adjusted width for mobile responsiveness */
        font-size: 1.5rem; /* Adjusted font size for mobile responsiveness */
    }

    .calendar {
        padding: 20px; /* Adjusted padding for mobile responsiveness */
    }

    .calendar ul li {
        font-size: 1.2rem; /* Adjusted font size for mobile responsiveness */
    }

    .calendar .week li {
        font-size: 1.5rem; /* Adjusted font size for mobile responsiveness */
    }

    .calendar .day li {
        font-size: 1.5rem; /* Adjusted font size for mobile responsiveness */
        margin-top: 40px; /* Adjusted margin for mobile responsiveness */
    }

    .popup-content {
        padding: 15px; /* Adjusted padding for mobile responsiveness */
    }

    .popup h2 {
        font-size: 1.5rem; /* Adjusted font size for mobile responsiveness */
    }

    .popup ul li {
        font-size: 1.2rem; /* Adjusted font size for mobile responsiveness */
    }

    .styled-btn {
        padding: 8px 16px; /* Adjusted padding for mobile responsiveness */
        font-size: 1rem; /* Adjusted font size for mobile responsiveness */
    }

    .task-item {
        padding: 10px 20px; /* Adjusted padding for mobile responsiveness */
    }

    .task-name {
        font-size: 1.2rem; /* Adjusted font size for mobile responsiveness */
    }

    .task-tag, .task-difficulty, .task-date {
        font-size: 1rem; /* Adjusted font size for mobile responsiveness */
    }
}

@media (max-width: 480px) { /* Start of smaller mobile styles */
    .calendar ul li {
        font-size: 1rem; /* Adjusted font size for smaller screens */
    }

    .calendar .week li {
        font-size: 1.2rem; /* Adjusted font size for smaller screens */
    }

    .calendar .day li {
        font-size: 1.2rem; /* Adjusted font size for smaller screens */
        margin-top: 30px; /* Adjusted margin for smaller screens */
    }

    .popup-content {
        padding: 10px; /* Adjusted padding for smaller screens */
    }

    .popup h2 {
        font-size: 1.2rem; /* Adjusted font size for smaller screens */
    }

    .popup ul li {
        font-size: 1rem; /* Adjusted font size for smaller screens */
    }

    .styled-btn {
        padding: 6px 12px; /* Adjusted padding for smaller screens */
        font-size: 0.9rem; /* Adjusted font size for smaller screens */
    }

    .task-item {
        padding: 8px 15px; /* Adjusted padding for smaller screens */
    }

    .task-name {
        font-size: 1rem; /* Adjusted font size for smaller screens */
    }

    .task-tag, .task-difficulty, .task-date {
        font-size: 0.9rem; /* Adjusted font size for smaller screens */
    }
}

.calendar .day li:focus {
    outline: 2px solid #654321;
    outline-offset: 4px;
}