/* Task Management System Styles */

/* Task Item Styles */
.task-item {
    border-left: 4px solid;
    margin-bottom: 10px;
}

.task-low { 
    border-left-color: #28a745; 
}

.task-normal { 
    border-left-color: #007bff; 
}

.task-urgent { 
    border-left-color: #ffc107; 
}

.task-critical { 
    border-left-color: #dc3545; 
}

.task-done { 
    opacity: 0.6; 
    text-decoration: line-through; 
}

.task-level-1 { 
    margin-left: 30px; 
}

.task-level-2 { 
    margin-left: 60px; 
}

.subtask-container { 
    margin-top: 10px; 
}

/* Column Layout Styles */
.task-column {
    border-right: 1px solid #dee2e6;
}

.task-column:last-child {
    border-right: none;
}

.list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.list-group-item:first-child {
    border-top: none;
}

.card-body {
    padding: 0;
}

.column-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Task Content Wrapper Styles */
.task-content-wrapper {
    padding: 8px 12px;
    margin: 2px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.task-done .task-title {
    text-decoration: line-through;
    opacity: 0.6;
}

.badge-sm {
    font-size: 0.7em;
}

/* Task Checkbox Styles - Prevent compression when title wraps */
.task-checkbox {
    min-width: 16px !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    margin-top: 2px; /* Slight top margin to align better with text */
}

/* Task title wrapper to handle multi-line titles properly */
.task-title {
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
}

/* List Group Item Overrides */
.list-group-item {
    cursor: pointer;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.list-group-item:hover .task-content-wrapper {
    background-color: #f8f9fa !important;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 600;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Alert and Message Styles */
.alert {
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Modal Enhancements */
.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Form Enhancements */
.form-label {
    font-weight: 500;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-group-sm > .btn, .btn-sm {
    border-radius: 0.25rem;
}

/* Card Enhancements */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Task list card body responsive heights */
.task-list-card-body {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .task-level-1 { 
        margin-left: 15px; 
    }
    
    .task-level-2 { 
        margin-left: 30px; 
    }
    
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Task List Container Height Adjustments */
.task-list-container {
    min-height: calc(100vh - 200px);
}

/* Responsive height adjustments for task containers */
@media (max-height: 800px) {
    .card-body[style*="max-height"] {
        max-height: calc(100vh - 200px) !important;
    }
}

@media (max-height: 600px) {
    .card-body[style*="max-height"] {
        max-height: calc(100vh - 180px) !important;
    }
}

@media (max-height: 500px) {
    .card-body[style*="max-height"] {
        max-height: calc(100vh - 160px) !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    .btn,
    .alert {
        display: none !important;
    }
    
    .task-item {
        page-break-inside: avoid;
        margin-bottom: 0.5rem;
    }
}

/* Accessibility Enhancements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .task-content-wrapper {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .list-group-item:hover .task-content-wrapper {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.border-start-success {
    border-left: 4px solid #28a745 !important;
}

.border-start-primary {
    border-left: 4px solid #007bff !important;
}

.border-start-warning {
    border-left: 4px solid #ffc107 !important;
}

.border-start-danger {
    border-left: 4px solid #dc3545 !important;
}

/* Local Printing Support Styles */
.local-printing-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.local-printing-warning-content h5 {
    color: #856404;
    margin-bottom: 10px;
    font-weight: 600;
}

.local-printing-warning-content h5 i {
    margin-right: 8px;
    color: #f39c12;
}

.local-printing-warning-content p {
    margin-bottom: 8px;
    color: #856404;
}

.local-printing-warning-content .supported-browsers {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.local-printing-warning-content .supported-browsers p {
    margin-bottom: 5px;
    font-weight: 500;
}

.local-printing-warning-content .supported-browsers ul {
    margin-bottom: 8px;
    padding-left: 20px;
}

.local-printing-warning-content .supported-browsers li {
    margin-bottom: 3px;
    color: #495057;
}

.local-printing-warning-content .supported-browsers em {
    color: #6c757d;
    font-style: italic;
}

.local-printing-warning .btn {
    margin-top: 10px;
}

/* Local printing status indicators */
.local-printing-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.local-printing-status.supported {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.local-printing-status.not-supported {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.local-printing-status.partial-support {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Navigation Improvements */
.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0.5rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.dropdown-item i {
    width: 1.2rem;
}

/* Better checkbox alignment */
.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-top: 0;
}

/* Breadcrumb improvements */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}