/* Custom styles to complement Bootstrap */

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #2c3e50;
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: #2c3e50;
}

.hidden {
    display: none;
}

/* Custom badge styles */
.badge {
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* Button group picker (radio-style toggle buttons) */
.btn-group-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.btn-group-pick .btn {
    border-radius: 0.375rem !important;
    flex: 0 0 auto;
    font-size: 0.875rem;
    padding: 0.3rem 0.75rem;
    transition: all 0.15s ease-in-out;
}

.btn-group-pick .btn.active {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-btn-focus-shadow-rgb, 0, 0, 0), 0.25);
    font-weight: 600;
    pointer-events: none;
}

/* Date adjustment buttons */
.date-adjust-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.date-adjust-buttons .btn {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    line-height: 1.4;
}

/* Task group headings */
.task-group-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Collapse toggle chevron rotation */
[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

[data-bs-toggle="collapse"] .bi-chevron-down {
    transition: transform 0.2s ease-in-out;
}

/* 3-column card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card-grid > .card {
    margin-bottom: 0 !important;
}

@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Expand button in list rows */
.task-expand-btn {
    text-decoration: none;
    line-height: 1;
    vertical-align: middle;
}

/* Dark mode overrides */
[data-bs-theme="dark"] body {
    background-color: #1a1a2e;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .modal-title,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2b2b3d;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1a1a2e;
    color: #e0e0e0;
    border-color: #444;
}

[data-bs-theme="dark"] .form-check-label {
    color: #d0d0d0;
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: #3a3a4e !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] #darkModeToggle.active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}