/* Checklist App Styles - Mobile First */

:root {
    --task-height: 56px;
    --border-color: #e9ecef;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Header */
header h1 {
    font-weight: 600;
}

/* Type Tabs */
#typeTabs .nav-link {
    border-radius: 0;
    padding: 12px 16px;
    font-weight: 500;
    color: #495057;
}

#typeTabs .nav-link.active {
    color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
}

/* Period Navigator */
.period-nav {
    background: #fff;
}

#periodDisplay {
    font-size: 1rem;
}

/* Progress Summary */
.progress-summary {
    background: #fff;
}

/* Task List */
.task-list {
    background: #fff;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    min-height: var(--task-height);
    transition: background-color 0.15s;
}

.task-item:active {
    background-color: #f8f9fa;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #6c757d;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #0d6efd;
}

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

.task-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.task-schedule {
    font-size: 0.75rem;
    color: #6c757d;
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    border-radius: 12px;
}

.task-comment-toggle {
    font-size: 0.8rem;
    color: #0d6efd;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

.task-comment-toggle:hover {
    text-decoration: underline;
}

.task-comment-input {
    margin-top: 8px;
}

.task-comment-input textarea {
    font-size: 0.9rem;
    resize: none;
}

.task-comment-display {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #495057;
    font-style: italic;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Master Task List in Modal */
.master-task-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.master-task-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.master-task-schedule {
    font-size: 0.8rem;
    color: #6c757d;
}

.master-task-actions {
    display: flex;
    gap: 8px;
}

.master-task-actions .btn {
    padding: 4px 8px;
}

/* Empty State */
#emptyState,
#emptyMasterState {
    color: #6c757d;
}

/* Loading State */
#loadingState {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive - Larger screens */
@media (min-width: 576px) {
    .container-fluid {
        max-width: 540px;
        margin: 0 auto;
    }

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

    #periodDisplay {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .container-fluid {
        max-width: 640px;
    }

    body {
        padding-top: 20px;
    }

    .container-fluid {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

/* Form inputs in modal */
#addTaskForm .form-control,
#addTaskForm .form-select,
#addTaskForm .btn {
    height: 44px;
}

/* Schedule selector width adjustments */
#newTaskTime,
#editTaskTime {
    max-width: 130px;
}

#newTaskDay,
#editTaskDay {
    max-width: 90px;
}

#newTaskMonth,
#editTaskMonth {
    max-width: 130px;
}
