/* Main Layout Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Matrix Styles */
.matrix-container {
    margin-top: 0.5rem;
}

.matrix-header {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-light);
    padding: 0.125rem;
}

.matrix-side-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-light);
    text-align: center;
}

/* Quadrant Styles */
.quadrant {
    height: 100%;
    min-height: 200px;
    max-height: 400px;
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.quadrant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quadrant-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.125rem;
    max-height: 350px;
}

/* Quadrant Colors */
.important-urgent {
    background-color: var(--bs-danger-bg-subtle);
    border: 2px solid var(--bs-danger);
}

.important-urgent .quadrant-header h3 {
    color: var(--bs-danger);
}

.important-not-urgent {
    background-color: var(--bs-warning-bg-subtle);
    border: 2px solid var(--bs-warning);
}

.important-not-urgent .quadrant-header h3 {
    color: var(--bs-warning);
}

.not-important-urgent {
    background-color: var(--bs-info-bg-subtle);
    border: 2px solid var(--bs-info);
}

.not-important-urgent .quadrant-header h3 {
    color: var(--bs-info);
}

.not-important-not-urgent {
    background-color: var(--bs-success-bg-subtle);
    border: 2px solid var(--bs-success);
}

.not-important-not-urgent .quadrant-header h3 {
    color: var(--bs-success);
}

/* Task Styles */
.task {
    background-color: rgba(var(--bs-tertiary-bg-rgb), 0.8);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.task.completed {
    opacity: 0.6;
    background-color: var(--bs-success-bg-subtle);
}

.task.completed .task-title {
    text-decoration: line-through;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.task-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.2;
}

.task-description {
    margin: 0;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.task-actions {
    display: flex;
    gap: 0.125rem;
}

.task-actions .btn {
    padding: 0.125rem 0.25rem;
    font-size: 0.65rem;
}

/* Tag Styles */
.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    margin-top: 0.25rem;
}

.task-tag {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    color: white;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.tag-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.tag-color {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.tag-name {
    display: flex;
    align-items: center;
}

.tag-actions {
    display: flex;
    gap: 0.25rem;
}

/* SortableJS Styles */
.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    opacity: 0.8;
}

/* Completed Tasks Section */
.completed-section {
    border-top: 2px solid var(--bs-border-color);
    padding-top: 1rem;
}

.completed-tasks-container {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
}

.completed-header {
    cursor: pointer;
    user-select: none;
}

.completed-header:hover {
    background: var(--bs-gray-800);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin: -0.5rem;
}

.completed-tasks-list {
    max-height: 300px;
    overflow-y: auto;
}

.completed-task {
    background: var(--bs-gray-800);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.completed-task:hover {
    opacity: 1;
}

.completed-task .task-title {
    text-decoration: line-through;
    color: var(--bs-gray-400);
}

.completed-task .task-description {
    color: var(--bs-gray-500);
    font-size: 0.875rem;
}

.completed-task .task-meta {
    font-size: 0.75rem;
    color: var(--bs-gray-600);
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .matrix-side-label {
        writing-mode: horizontal-tb;
        transform: none;
        margin-bottom: 0.5rem;
    }
}
