@font-face {
    font-family: 'WorkSans';
    src: url('/static/fonts/WorkSans-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


html, body {
    height: 100%;
}

/* Light Mode and Dark Mode using Rose Pine color theme */
:root {
    --base: 250, 244, 237;
    --surface: 255, 250, 243;
    --text: 87, 82, 121;
    --overlay: 242, 233, 222;
    --muted: 152, 147, 165;
    --subtle: 121, 117, 147;
    --pine: 40, 105, 131;
    --foam: 66, 148, 159;
    --love: 180, 99, 122;
    --gold: 246, 193, 119;
    --rose: 215, 130, 126;
    --iris: 144, 122, 169;

    --background-color: #faf4ed; /* Rose Pine Dawn */
    --text-color: #575279; /* Subtle text color */
    --subtle-background: #f2e9de;
    --board-background: #f2e9de; /* Softer background */
    --task-background: #faf4ed; /* Slightly darker tone for better contrast */

    /* Additional variables */
    --warning-color: #eb6f92; /* Rose Pine red */
    --caution-color: #f6c177; /* Rose Pine yellow */
    --primary-color: #9ccfd8; /* Rose Pine blue */
    --primary-text-color: #191724; /* Base */
    --primary-hover-color: #7bbac5;

    --secondary-color: #c4a7e7; /* Current secondary color */
    --secondary-text-color: #191724; /* Dark purple-black for contrast */
}

@media (prefers-color-scheme: dark) {
    :root {
        --base: 25, 23, 36;
        --surface: 31, 29, 46;
        --text: 224, 222, 244;
        --overlay: 38, 35, 58;
        --muted: 110, 106, 134;
        --subtle: 144, 140, 170;
        --pine: 49, 116, 143;
        --foam: 156, 207, 216;
        --love: 235, 111, 146;
        --gold: 246, 193, 119;
        --rose: 235, 111, 146;
        --iris: 196, 167, 231;

        --background-color: #191724; /* Rose Pine Moon */
        --text-color: #e0def4; /* Light text color */
        --board-background: #2a283e; /* Stronger contrast with background */
        --subtle-background: #2a283e; /* Stronger contrast with background */
        --task-background: #3e3b59; /* Stronger contrast with board-background */

        /* Additional variables */
        --warning-color: #eb6f92; /* Rose Pine red */
        --caution-color: #f6c177; /* Rose Pine yellow */
        --primary-color: #9ccfd8; /* Rose Pine blue */
        --secondary-color: #6e6a86; /* Dark lavender */
        --secondary-text-color: #e0def4; /* Light text for contrast */
    }
}

html, body {
    background-color: rgb(var(--base));
    color: var(--text-color);
}

/* Global Styles */
body {
    font-family: 'WorkSans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center main horizontally */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

/* Ensure no extra margin/padding causes scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Restore natural margins for headings while preventing unnecessary scrolling */
h1, h2, h3, p {
    margin-top: 1em; /* Restore natural top margin */
    margin-bottom: 1em; /* Restore natural bottom margin */
}

a {
    font-weight: bold;
    color: rgb(var(--pine));
    text-decoration: none;
}

a:hover, a:focus {
    color: rgba(var(--pine), 0.8);
    text-decoration: underline;
}

button {
    font-family: 'WorkSans', sans-serif;
    border-radius: 5px;
    border: none;
}

button.primary {
    background-color: rgba(var(--foam), 0.3);
    color: rgb(var(--foam));
    border: 1px solid rgb(var(--foam));
}

button.primary:hover, button.primary:focus {
    background-color: rgba(var(--foam), 0.1);
}

button.secondary {
    background-color: rgba(var(--muted), 0.3);
    color: rgb(var(--text));
    border: 1px solid rgb(var(--muted));
}

button.secondary:hover, button.secondary:focus {
    background-color: rgba(var(--muted), 0.1);
}

button.warning {
    background-color: rgba(var(--love), 0.3);
    color: rgb(var(--love));
    border: 1px solid rgb(var(--love));
}

button.warning:hover, button.warning:focus {
    background-color: rgba(var(--love), 0.1);
}

.hidden {
    display: none;
}

#menu-bar {
    display: flex;
    flex-direction: column; /* Stack title and auth-section vertically */
    align-items: center; /* Center everything horizontally */
    gap: 1rem; /* Add spacing between title and auth-section */
    width: 100%; /* Ensure it spans the full width */
}

#menu-bar h1 {
    text-align: center; /* Center the title */
    margin: 0; /* Remove default margin */
}

.auth-section {
    display: flex;
    flex-direction: row; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    gap: 0.5rem; /* Add spacing between items */
    text-align: center; /* Center text inside children */
}

.button-link {
    background-color: rgba(var(--subtle), 0.1);
    color: var(--text);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.button-link:hover, .button-link:focus {
    background-color: rgba(var(--subtle), 0.2);
    text-decoration: none;
}

.github-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9em;
}

.github-login-btn i {
    font-size: 1.2em;
}


/* Layout */
main {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
    width: 100%;
    max-width: 1200px; /* Limit max width for better readability */
    justify-content: center;

    padding: 1em;
    gap: 1em;
}

/* Board View */
#board-view {
    display: flex;
    gap: 16px;
    min-height: 70vh;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

.board-container {
    background-color: var(--board-background);
    flex: 1 0 0;
    min-width: 250px;
    padding: 16px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-list-header {
    display: flex; /* Use Flexbox for alignment */
    align-items: center; /* Vertically align children */
    justify-content: space-between; /* Space out the title and button */
    gap: 10px; /* Add spacing between children */
}

.board-container:has(#blocked-tasks),
.board-container:has(#registered-users) {
    border-top: 4px solid rgba(var(--love), 0.8);
}

.board-container:has(#ready-tasks) {
    border-top: 4px solid rgba(var(--gold), 0.8);
}

.board-container:has(#in_progress-tasks) {
    border-top: 4px solid rgba(var(--foam), 0.8);
}

.board-container:has(#done-tasks),
.board-container:has(#admin-users) {
    border-top: 4px solid rgba(var(--iris), 0.8);
}

.board-list-header h2 {
    font-size: 0.9em;
    margin: 0;
}

.board-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    min-height: 5em;
    min-width: 0; /* Allow content to shrink */
    list-style-type: none;
}

.board-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Allow content to shrink */
    padding: 12px;
    background-color: var(--task-background);
    border-radius: 5px;
    cursor: grab;
    font-size: 0.8em;
}

.task-content {
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.board-item:hover {
    background-color: rgba(var(--subtle), 0.1);
}

.placeholder {
    opacity: 0.5;
    height: 2em;
    transition: margin 0.2s ease, padding 0.2s ease;
    border-radius: 5px;
    border-width: 4px;
    border-style: dashed;
}

#blocked-tasks .placeholder,
#registered-users .placeholder {
    border-color: rgb(var(--love))
}

#ready-tasks .placeholder {
    border-color: rgb(var(--gold));
}

#in_progress-tasks .placeholder {
    border-color: rgb(var(--foam));
}

#done-tasks .placeholder,
#admin-users .placeholder {
    border-color: rgb(var(--foam));
}

/* Add cursor change when hovering over draggable elements */
[draggable="true"] {
    cursor: grab;
}

[draggable="true"]:active {
    cursor: grabbing;
    transform: rotate(3deg);
}

/* Add rotation effect to draggable elements while dragging */
.dragging {
    cursor: grabbing;
}

/* Add animation for siblings being pushed away by placeholder */
.board-container *:not(.placeholder) {
    transition: transform 0.3s ease, margin 0.3s ease; /* Slightly slower animation */
}

.board-container .placeholder + * {
    transition: transform 0.5s ease, margin 0.5s ease; /* Slower and more noticeable animation */
}

.add-task {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    background-color: var(--board-background);
    cursor: pointer;
    font-size: 0.9em;
}

.add-task i {
    font-size: 1.2em; /* Adjust icon size */
}

:focus {
    outline: 3px solid var(--secondary-color); /* Replace --rose with your preferred Rosé Pine color */
    outline-offset: 4px; /* Add some space between the element and the outline */
    border-radius: 5px;;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.modal-title {
    margin: 0;  /* Remove default margin from h3 */
}

.modal-actions {
    display: flex;
    gap: 0.5rem;  /* Space between buttons */
}

.modal-actions button {
    border: none;
}

.modal-header h3 {
    margin: 0;
}

.modal.hidden {
    display: none;
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Allow it to grow to fill available space */
    flex-shrink: 1; /* Allow it to shrink if needed */
    width: 90%; /* Default width */
    max-width: 500px; /* Limit the maximum width */
    min-width: 300px; /* Ensure a minimum width */
    height: auto; /* Adjust height dynamically */
    max-height: 90%; /* Limit the maximum height */
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: var(--subtle-background);
    border-radius: 5px;
    gap: 1em;
    overflow-y: auto; /* Add scroll if content overflows */
}

.modal-content > * {
    flex-grow: 1; /* Allow children to grow and fill the space */
    flex-shrink: 1; /* Allow children to shrink if needed */
    width: 100%; /* Ensure they take the full width of the modal-content */
    height: 100%; /* Ensure they take the full height of the modal-content */
    box-sizing: border-box; /* Include padding and borders in the size */
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.modal-content *:focus {
    outline-offset: 0;
}

.modal-content input, .modal-content textarea, .modal-content select {
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    font-family: 'WorkSans', sans-serif;
    padding: 8px;
    background-color: var(--task-background);
    color: rgb(var(--text));
}

.modal-content button {
    padding: 8px;
}

/* Style for the Publish checkbox container */
.form-group {
    display: flex;
    align-items: center; /* Vertically align the label with the checkbox */
    gap: 12px; /* Increase the gap between the checkbox and the label */
}

/* Generic style for checkboxes */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: rgb(var(--pine)); /* Use primary color for the checkbox */
    border-radius: 3px; /* Slightly rounded corners for a modern look */
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Style for the Publish label */
form label {
    display: flex;
    align-items: center; /* Vertically align the checkbox and text */
    gap: 0.5em; /* Add spacing between the checkbox and the text */
    font-size: 0.9em;
    color: var(--text-color);
}

.badge {
    background-color: rgb(var(--pine));
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 8px;
}

/** Readmap styling **/
.roadmap {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
}

.roadmap-section {
    display: flex;
    flex-direction: column;
    gap: 1em;
    background-color: rgb(var(--overlay));
    padding: 1.5em 2em;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
}

#done-roadmap {
    border-left: 4px solid rgba(var(--iris), 0.8); 
}

#in_progress-roadmap {
    border-left: 4px solid rgba(var(--foam), 0.8);
}

#ready-roadmap {
    border-left: 4px solid rgba(var(--gold), 0.8);
}

#blocked-roadmap {
    border-left: 4px solid rgba(var(--love), 0.8);
}

.roadmap-section h2 {
    margin: 0;
}

.roadmap-section > ul {
    list-style-type: disc;
    padding-left: 1.5em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;