/*
Theme Name: Note Tako
Theme URI: https://notetako.com
Author: Note Tako
Description: Custom theme for Note Tako dashboard using Bootswatch Flatly styling
Version: 1.1
Requires at least: 5.0
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom, responsive
Text Domain: note-tako
*/

body {
    /* No offset since navbar uses sticky positioning */
    padding-top: 0;
    font-family: var(--bs-body-font-family, var(--bs-font-sans-serif));
}

.tasks-dashboard,
.takos-dashboard {
    background: var(--bs-body-bg);
    min-height: 80vh;
}

.tasks-layout,
.takos-layout {
    --dashboard-sidebar-width: 320px;
}

.dashboard-sidebar {
    background: var(--bs-light, rgba(248, 249, 250, 0.95));
    min-height: 100%;
    overflow-y: auto;
}

.dashboard-sidebar__header {
    background: rgba(0, 0, 0, 0.02);
}

.dashboard-sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--bs-body-color);
}

.dashboard-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.dashboard-sidebar .list-group-item:hover,
.dashboard-sidebar .list-group-item:focus {
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.dashboard-sidebar .list-group-item.active {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    font-weight: 600;
}

.dashboard-sidebar .list-group-item:focus-visible {
    outline: 2px solid rgba(var(--bs-primary-rgb), 0.6);
    outline-offset: -2px;
}

@media (min-width: 992px) {
    .tasks-layout .dashboard-sidebar,
    .takos-layout .dashboard-sidebar {
        flex: 0 0 var(--dashboard-sidebar-width);
        max-width: var(--dashboard-sidebar-width);
    }
}

.tasks-board {
    background: var(--bs-body-bg);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.tasks-board__body {
    flex: 1;
    overflow-y: auto;
}

.task-section + .task-section {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2rem;
}

.task-list-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.task-empty {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.task-create-trigger {
    width: 3.25rem;
    height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    padding: 0;
}

.task-create-trigger span {
    line-height: 1;
}

.task-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.task-card:last-child {
    border-bottom: none;
}

.task-card__status {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.task-card__status:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.6);
    color: rgba(var(--bs-primary-rgb), 0.9);
}

.task-card.is-done .task-card__status {
    background: rgba(var(--bs-success-rgb), 0.15);
    border-color: rgba(var(--bs-success-rgb), 0.8);
    color: var(--bs-success);
}

.task-card.is-important:not(.is-done) .task-card__status {
    border-color: rgba(var(--bs-warning-rgb), 0.8);
    color: var(--bs-warning);
}

.task-card__body {
    flex: 1;
    min-width: 0;
}

.task-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.task-card.is-done .task-card__title {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-card__due {
    font-size: 0.9rem;
    color: var(--bs-body-color);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.task-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.task-card__badges .badge {
    border-radius: 999px;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

.task-card__link {
    margin-bottom: 0.5rem;
}

.task-card__link a {
    font-size: 0.85rem;
    word-break: break-all;
}

.task-card__subtasks {
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
}

.task-card__subtasks li {
    font-size: 0.85rem;
    color: var(--bs-body-color);
    opacity: 0.8;
}

.task-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.task-card__action {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-primary);
    text-decoration: none;
}

.task-card__action:hover,
.task-card__action:focus {
    text-decoration: underline;
    color: var(--bs-primary);
}

.task-card__action--delete {
    color: var(--bs-danger);
}

.task-card__action--delete:hover,
.task-card__action--delete:focus {
    color: var(--bs-danger);
}

.task-offcanvas {
    width: min(100vw, 420px);
}

.task-offcanvas .offcanvas-body {
    padding-bottom: 2rem;
}

.subtask-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subtask-row {
    background: var(--bs-light, rgba(248, 249, 250, 0.9));
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.subtask-row .form-check-label {
    cursor: pointer;
}

.subtask-row .subtask-remove {
    white-space: nowrap;
}

.takos-column {
    background: var(--bs-body-bg);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.takos-column__body {
    flex: 1;
    overflow-y: auto;
}

.tako-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tako-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(33, 37, 41, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tako-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(33, 37, 41, 0.08);
}

.tako-card.is-done {
    border-color: rgba(var(--bs-success-rgb), 0.4);
}

.tako-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.tako-card.is-done .tako-card__title {
    text-decoration: line-through;
    opacity: 0.7;
}

.tako-card__meta {
    font-size: 0.85rem;
    color: var(--bs-body-color);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.tako-card__excerpt {
    font-size: 0.9rem;
    color: var(--bs-body-color);
    margin-bottom: 0.75rem;
    white-space: pre-line;
}

.tako-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tako-card__action {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-primary);
    text-decoration: none;
}

.tako-card__action:hover,
.tako-card__action:focus {
    text-decoration: underline;
    color: var(--bs-primary);
}

.tako-card__action--delete {
    color: var(--bs-danger);
}

.tako-card__action--delete:hover,
.tako-card__action--delete:focus {
    color: var(--bs-danger);
}

.takos-column .task-empty {
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .dashboard-sidebar {
        max-height: 280px;
    }

    .tasks-board__body,
    .takos-column__body {
        padding-bottom: 3rem;
    }
}