/* ===== Variables ===== */
:root {
    --primary-color: #4CAF50;
    --primary-color-light: #81C784;
    --secondary-color: #2196F3;
    --secondary-color-dark: #1976D2;
    --background-color: #f9f9f9;
    --text-color: #333;
    --font-family: 'Roboto', Arial, sans-serif;
    --task-height: 30px;
    --task-spacing: 5px;
}

/* ===== Base Styles ===== */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* ===== Header and Navigation ===== */
header {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
}

header h1 {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    margin: 0;
}

/* Zoom Controls Styling */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    border: 1px solid #ccc;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: scale(0.95);
}

.zoom-group {
    display: flex;
    align-items: center;
}

.zoom-group label {
    margin-right: 10px;
    font-weight: bold;
}

.zoom-group input[type="range"] {
    width: 150px;
}

.zoom-group span {
    margin-left: 10px;
    font-weight: bold;
}

/* Style for the project name display */
#projectNameDisplay {
    font-weight: bold;
    color: white;
}

/* Style for the project name input field */
#projectNameInput {
    font-size: 1em;
    padding: 5px;
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style for the edit button */
#editProjectNameButton {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    margin-left: 10px;
    font-size: 0.8em;
}

#editProjectNameButton i {
    color: white;
}

#editProjectNameButton:hover i {
    color: #ddd;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 10px;
}

nav button {
    background-color: white;
    color: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

nav button:hover {
    background-color: var(--secondary-color-dark);
    color: white;
}

/* ===== Main Content ===== */
main {
    padding: 20px;
}

/* ===== Project Header ===== */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-header h2 {
    margin: 0;
}

/* ===== Add Task Button ===== */
/* Styles for buttons in the project header */
.header-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-button:hover {
    background-color: var(--secondary-color-dark);
}

.header-button i {
    font-size: 1em;
}

/* ===== Gantt Chart Styles ===== */
main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 90px); /* Adjust based on header and status bar height */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Allow dropdowns to overflow */
}

#ganttChart {
    flex: 1; /* Allow the chart to fill the remaining space */
    position: relative;
    margin-top: 20px;
    border: 1px solid #ccc;
    overflow-x: auto;
    overflow-y: auto;
    white-space: nowrap;
    cursor: grab;
    position: relative; /* Ensure proper stacking context */
}

#categoryFilter {
    margin-bottom: 10px; /* Add spacing below the dropdown */
}

#ganttChart.grabbing {
    cursor: grabbing;
}

.choices {
    margin-bottom: 0px;
}

.task-bar {
    background-color: var(--primary-color);
    position: absolute;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1; /* Ensure tasks are below the time scale */
    min-width: 100px; /* Adjust this value as needed */
    overflow: hidden; /* Hide overflowing content */
    padding-right: 5px; /* Space between content and buttons */
}

.task-content {
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    transition: transform 0.1s linear;
}

.task-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(to right, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

.task-resize-handle {
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
    cursor: ew-resize;
    z-index: 2;
    display: none; /* Hidden by default */
    background-color: transparent; /* Optional: make handles transparent */
}

.task-resize-handle.left {
    left: 0;
}

.task-resize-handle.right {
    right: 0;
}

/* Show resize handles when Shift key is held down */
body.shift-key-down .task-resize-handle {
    display: block;
}

/* Change cursor when hovering over resize handles */
body.shift-key-down .task-resize-handle:hover {
    cursor: ew-resize;
}

/* Change cursor to 'default' when Shift is held down */
body.shift-key-down #ganttChart {
    cursor: default;
}

#ganttChart.resizing {
    cursor: ew-resize !important;
}

/* Hide edit and delete buttons when Shift key is held down */
body.shift-key-down .task-bar .task-buttons {
    display: none;
}

/* Completely hide tooltips when Shift key is held down */
body.shift-key-down .task-bar[data-tooltip]:hover::after {
    content: none;
}

.category-heading {
    position: absolute;
    font-weight: 500;
    font-size: 1em;
    background-color: #f9f9f9;
    padding: 5px 10px;
    border-left: 4px solid var(--primary-color);
    width: 100%;
    box-sizing: border-box;
    color: var(--text-color);
    z-index: 1; /* Same as task bars */
}

/* ===== Tabs Styles ===== */
/* Tabs container */
.modal .tabs {
    display: flex;
    margin-bottom: 20px;
}

/* Individual tab buttons */
.modal .tab-button {
    flex: 1;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s;
    border-bottom: 2px solid transparent;
}

.modal .tab-button.active {
    background-color: #fff;
    border-bottom-color: var(--primary-color);
}

.modal .tab-button:hover {
    background-color: #e0e0e0;
}

/* Tab contents */
.modal .tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal .tab-content.active {
    display: block;
    opacity: 1;
}

/* ===== Category Items Styles ===== */
/* Categories list container */
/* Remove default list styling */
#categoriesList {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

/* Update category-item to work with li elements */
.category-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: move; /* Add cursor to indicate draggable */
}

.category-item.dragging {
    opacity: 0.5;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item .color-indicator {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    border-radius: 50%;
    border: 1px solid #ccc;
    flex-shrink: 0;
}

.category-item span {
    flex-grow: 1;
    font-size: 1em;
}

.category-item button {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.2s;
}

.category-item button:hover {
    background-color: #f0f0f0;
}

.category-item button i {
    pointer-events: none;
}

.category-item button .fa-edit {
    color: var(--secondary-color);
}

.category-item button .fa-trash-alt {
    color: var(--primary-color);
}

/* ===== Button Styles ===== */
button {
    font-family: var(--font-family);
    border-radius: 4px;
}

button i {
    margin-right: 5px;
    font-size: 1em;
}

.category-item button i {
    margin-right: 0;
}

/* Adjusting task bar buttons */
.task-bar button {
    background-color: rgba(255,255,255,0.2);
}

.task-bar button:hover {
    background-color: rgba(255,255,255,0.3);
}

.task-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.task-name {
    flex-grow: 1;
    flex-shrink: 1;
    margin-right: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-buttons {
    display: flex;
    gap: 5px;
}

.task-bar .task-buttons {
    display: flex;
    margin-left: auto;
    z-index: 1; /* Ensure buttons are above task-content */
}

.task-bar button {
    font-size: 0.8em;
    padding: 2px 5px;
    margin-left: 5px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.task-bar button:hover {
    background: rgba(255,255,255,0.3);
}

.time-scale {
    position: sticky;
    top: 0;
    z-index: 5; /* Lowered z-index */
    height: 60px;
    background-color: var(--background-color);
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
}

.date-label {
    position: absolute;
    font-size: 0.8em;
    top: 40px;
    transform: rotate(-45deg);
    transform-origin: left top;
    width: 100px; /* Increase width to prevent clipping */
    white-space: nowrap;
}

/* Styles for month labels */
.date-label.month-label {
    position: absolute;
    top: 20px;       /* Adjust vertical position if needed */
    transform: none; /* Ensure no rotation is applied */
    text-align: center; /* Center the text horizontally */
    width: auto;     /* Allow the width to be set dynamically */
    font-size: 0.9em; /* Optional: Adjust font size */
}

.day-separator.month-separator {
    /* Optional: Adjust the appearance of month separators if needed */
    height: 100%;
    border-left: 2px solid #ccc;
}

.day-separator {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: #e0e0e0;
}

.assignee-name {
    font-size: 0.85em;
    font-weight: normal;
    margin-left: 5px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
}

/* ===== Form Styles ===== */
#addTaskForm {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
        "task-name task-name"
        "description description"
        "task-details task-details"
        "assignment status";
    gap: 5px;
    max-width: 700px;
    margin-bottom: 20px;
}

/* Assign grid areas to fieldsets */
.task-name-section {
    grid-area: task-name;
}

.task-details-section {
    grid-area: task-details;
}

.assignment-section {
    grid-area: assignment;
}

.status-section {
    grid-area: status;
}

.description-section {
    grid-area: description;
}

/* Grid layout for form groups within fieldsets */
.task-details-section,
.assignment-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Ensure full-width inputs in single-column sections */
.task-name-section .form-group input {
    width: 100%;
}

/* Inputs inside form groups */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
}

#addTaskForm button[type="submit"] {
    grid-column: span 2;
    padding: 10px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#addTaskForm button[type="submit"]:hover {
    background-color: var(--secondary-color-dark);
}

#statusMessage {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--primary-color);
}

/* Form layout adjustments */
#addCategoryForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#addCategoryForm .form-group {
    display: flex;
    flex-direction: column;
}

#addCategoryForm button[type="submit"] {
    align-self: flex-start;
}

/* Style the Spectrum color picker */
input[type="color"] {
    padding: 0;
    border: none;
    width: 50px;
    height: 50px;
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    font-size: 1em;
    color: var(--text-color);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px 30px;
    border: none;
    width: 80%;
    max-width: 700px;
    min-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Modal headings */
.modal-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

/* Form styles within modal */
.modal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.modal .form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.modal .form-group input:hover,
.modal .form-group select:hover,
.modal .form-group textarea:hover {
    border-color: var(--primary-color-light);
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* General styles for textareas in the modal */
.modal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    resize: vertical; /* Allows users to resize vertically */
}

/* Set default height for the Status Explanation textarea */
#statusExplanation {
    height: 170px;
}

/* Set default height for the Task Description textarea */
#taskDescription {
    height: 250px;
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.modal .form-group input:hover,
.modal .form-group select:hover,
.modal .form-group textarea:hover {
    border-color: var(--primary-color-light);
}

.modal button[type="submit"] {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s, transform 0.1s;
}

.modal button[type="submit"]:hover {
    background-color: var(--primary-color-light);
    transform: translateY(-2px);
}

/* Specific styles for Task modal submit buttons */
#taskModal button[type="submit"] {
    background-color: var(--primary-color);
}

#taskModal button[type="submit"]:hover {
    background-color: var(--primary-color-light);
}

.modal button[type="submit"]:active {
    transform: translateY(0);
}

/* Modal close button */
.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

/* Form Section Styles */
fieldset {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

legend {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--secondary-color);
    padding: 0 10px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .modal .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .modal .form-group label,
    .modal .form-group input,
    .modal .form-group select,
    .modal .form-group textarea {
        width: 100%;
    }
}

/* ===== Tooltip Styles ===== */
.task-bar[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.75);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.8em;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-bar[data-tooltip]:hover::after {
    opacity: 1;
}

/* Task Details Modal Styles */
.task-details-content {
    padding: 20px;
}

.task-details-content h3 {
    margin-top: 0;
    font-size: 1.8em;
    color: var(--secondary-color);
}

.task-details-content p {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.task-details-content dl {
    margin: 0;
    display: grid;
    grid-template-columns: max-content auto;
    row-gap: 10px;
    column-gap: 20px;
}

.task-details-content dt {
    font-weight: bold;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.task-details-content dt i {
    margin-right: 8px;
    color: var(--primary-color);
}

.task-details-content dd {
    margin: 0;
    color: var(--text-color);
}

.task-details-content dd#detailStatusExplanation {
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.modal .close-button {
    color: #aaa;
    font-size: 1.5em;
    font-weight: bold;
}

.modal .close-button:hover,
.modal .close-button:focus {
    color: black;
    cursor: pointer;
}

/* Styles for rendered markdown content */
.task-details-content h1,
.task-details-content h2,
.task-details-content h3,
.task-details-content h4,
.task-details-content h5,
.task-details-content h6 {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 10px;
}

.task-details-content ul,
.task-details-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.task-details-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.task-details-content code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.task-details-content pre code {
    display: block;
    padding: 10px;
    overflow-x: auto;
}

/* Adjust modal dimensions and responsiveness */
.modal-content {
    width: 80%;
    max-width: 700px;
    padding: 30px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .task-details-content dl {
        grid-template-columns: 1fr;
    }

    .task-details-content dt {
        margin-top: 10px;
    }
}

/* Darker overlay for modal background */
.modal {
    background-color: rgba(0, 0, 0, 0.8);
}
/* Status indicator styles */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.status-on-track {
    background-color: green;
}

.status-some-risk {
    background-color: yellow;
}

.status-high-risk {
    background-color: red;
}

.status-scrapped {
    background-color: red;
    position: relative;
}

.status-scrapped::before,
.status-scrapped::after {
    content: '';
    position: absolute;
    background-color: white;
    transform: rotate(45deg);
}

.status-scrapped::before {
    width: 2px;
    height: 12px;
    left: 5px;
    top: 0;
}

.status-scrapped::after {
    width: 12px;
    height: 2px;
    left: 0;
    top: 5px;
}

.status-finished {
    background: none;    /* Remove any background color */
    width: auto;         /* Allow width to adjust to content */
    height: auto;        /* Allow height to adjust */
    font-size: 16px;     /* Adjust font size as needed */
    line-height: 1;      /* Align the emoji properly */
    display: flex;
    align-items: center;
}

/* Current Day Indicator Styles */
.current-day-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed lightgreen;
    z-index: 2; /* Ensure it appears above other elements */
}

.current-date-symbol {
    position: absolute;
    top: 10px; /* Adjust to position the symbol vertically within the time scale */
    transform: translateX(-50%);
    font-size: 16px; /* Adjust size as needed */
    z-index: 10; /* Ensure it appears above other elements */
    pointer-events: none; /* Allows clicks to pass through to underlying elements if needed */
}
/* Person Items Styles */
.person-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.person-item:last-child {
    border-bottom: none;
}

.person-item span {
    flex-grow: 1;
    font-size: 1em;
}

.person-item button {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.2s;
}

.person-item button:hover {
    background-color: #f0f0f0;
}

.person-item button i {
    pointer-events: none;
}
.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 5px;
}

.modal-content {
    width: 80%;
    max-width: 700px;
    padding: 30px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group label {
        margin-bottom: 5px;
        flex: unset;
    }
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
}
* {
    box-sizing: border-box;
}

.modal {
    overflow-y: auto;
}

/* ===== Fullscreen Mode Styles ===== */
body.fullscreen-mode header,
body.fullscreen-mode .project-header,
body.fullscreen-mode #statusBar,
body.fullscreen-mode #categoryFilter {
    display: none;
}

body.fullscreen-mode main {
    padding: 0;
    height: 100vh;
    padding-top: 10px; /* Add minimal padding in fullscreen mode */
}

body.fullscreen-mode .main-content {
    height: 100vh;
    position: relative;
}

body.fullscreen-mode #ganttChart {
    margin-top: 0;
    height: 100vh;
}

/* Styles for Exit Fullscreen Button */
.exit-fullscreen-button {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
}

/* Show the exit fullscreen button only in fullscreen mode */
body.fullscreen-mode .exit-fullscreen-button {
    display: block;
}

/* Hide the original fullscreen toggle button in fullscreen mode */
body.fullscreen-mode #toggleFullscreen {
    display: none;
}

/* Adjust zoom controls positioning in fullscreen mode */
body.fullscreen-mode .zoom-controls {
    bottom: 10px; /* Add small padding in fullscreen */
}

/* Position and style the zoom toggle button */
.zoom-toggle-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--secondary-color);
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.zoom-toggle-button i {
    font-size: 1.5em;
}

/* Show zoom controls with fade-in effect */
.zoom-controls-visible .zoom-controls {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

/* Hide zoom controls with fade-out effect */
.zoom-controls-hidden .zoom-controls {
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: none;
}

/* Hide the zoom toggle button when zoom controls are visible */
.zoom-controls-visible .zoom-toggle-button {
    display: none;
}

/* Style the hide zoom controls button */
.hide-zoom-controls-button {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px;
    font-size: 1.2em;
}

/* Adjust input ranges within zoom controls */
.zoom-controls .zoom-group input[type="range"] {
    width: 160px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zoom-controls {
        bottom: 10px;
        left: 10px;
        padding: 10px;
    }
    .zoom-toggle-button {
        bottom: 10px;
        left: 10px;
        padding: 10px;
    }
}

/* Milestone styles */
.milestone {
    position: absolute;
    transform: translateX(-50%);
    font-size: 24px;
    cursor: pointer;
    z-index: 15; /* Ensure it's above other elements if necessary */
    top: 30px; /* Set this to position within the time scale */
    line-height: 1;
}

/* Style the emoji display in the milestone details */
#detailMilestoneEmoji {
    font-size: 24px;
}

.milestone[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px); /* Position tooltip below the icon */
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.8em;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
}

.milestone[data-tooltip]:hover::after {
    opacity: 1;
}

/* Task Details Modal Buttons */
.task-details-content button {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.task-details-content button:hover {
    background-color: var(--secondary-color-dark);
}

.task-details-buttons {
    margin-top: 20px;
}

.task-details-buttons button {
    margin-right: 10px;
}

/* Milestone Modal Specific Styles */
#milestoneModal .modal-content {
    /* Add any specific styles if needed */
}

/* Emoji grid container */
.emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Emoji buttons */
.emoji-button {
    font-size: 24px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.emoji-button:hover {
    background-color: #f0f0f0;
}

.emoji-button.selected {
    border-color: var(--primary-color);
    background-color: #e0ffe0;
}

/* Milestone Details Modal Styles */
.milestone-details-content {
    padding: 20px;
}

.milestone-details-content h3 {
    margin-top: 0;
    font-size: 1.8em;
    color: var(--secondary-color);
}

.milestone-details-content p {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.milestone-details-content dl {
    margin: 0;
    display: grid;
    grid-template-columns: max-content auto;
    row-gap: 10px;
    column-gap: 20px;
}

.milestone-details-content dt {
    font-weight: bold;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.milestone-details-content dt i {
    margin-right: 8px;
    color: var(--primary-color);
}

.milestone-details-content dd {
    margin: 0;
    color: var(--text-color);
}

.milestone-details-buttons {
    margin-top: 20px;
}

.milestone-details-buttons button {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.milestone-details-buttons button:hover {
    background-color: var(--secondary-color-dark);
}

.milestone-details-buttons button i {
    margin-right: 5px;
}

/* Responsive Styles for Milestone Details Modal */
@media (max-width: 768px) {
    .milestone-details-content dl {
        grid-template-columns: 1fr;
    }

    .milestone-details-content dt {
        margin-top: 10px;
    }

    .milestone-details-buttons {
        display: flex;
        flex-direction: column;
        margin-top: 15px;
    }

    .milestone-details-buttons button {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.8em;
    color: var(--secondary-color);
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: var(--secondary-color-dark);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* ===== Status Bar Styles ===== */
#statusBar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f1f1f1; /* Light gray background */
  padding: 5px 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: var(--text-color);
  border-top: 1px solid #ccc;
  z-index: 1000; /* Ensure it stays above other elements */
}

#statusBar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#filePathDisplay {
  max-width: 70%;
}

#filePathDisplay:hover {
  overflow: visible;
  white-space: normal;
  position: absolute;
  background-color: #fff;
  padding: 5px;
  border: 1px solid #ccc;
  z-index: 1001;
}

/* Category Filter Styles */
#categoryFilter {
  width: 100%;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Increase z-index of the Choices.js dropdown */
.choices__list[aria-expanded] {
    z-index: 1000; /* Ensures it appears above other elements */
}
