/* 
 * TaskMaster Stylesheet
 * Complete styles for the TaskMaster to-do list application
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 30px 15px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: #2c3e50;
}

/* App Container */
.app-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 25px;
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: #3a56e4;
    margin-bottom: 5px;
}

.app-subtitle {
    color: #7286d3;
    font-size: 16px;
}

/* Main Card */
.main-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

/* Form Section */
.task-form-container {
    padding: 25px;
    background: linear-gradient(to right, #7286d3, #8ea7e9);
}

#task-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 5px;
    font-weight: 500;
}

#task-input, #task-priority, #task-date {
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#task-input:focus, #task-priority:focus, #task-date:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

button[type="submit"] {
    background-color: #3a56e4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.error {
    color: #fff;
    background-color: rgba(220, 53, 69, 0.8);
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 5px;
    font-size: 14px;
    display: block;
}

/* Tasks Section */
.tasks-container {
    padding: 20px 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #3a56e4;
}

/* Task Filter Navigation */
nav {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: none;
    border: none;
    color: #7a7a7a;
    font-size: 15px;
    cursor: pointer;
    padding: 5px 3px;
}

.filter-btn.active {
    color: #3a56e4;
    font-weight: 500;
}

/* Task List */
#task-list {
    list-style-type: none;
}

/* Task Item Styling - Added in Responsive Implementation Lab */
.task-item {
    display: flex;
    align-items: center;
    padding: 16px 5px;
    border-bottom: 1px solid #eee;
}

/* Priority Indicators */
.task-item-high {
    border-left: 4px solid #e63946;
}

.task-item-medium {
    border-left: 4px solid #ffb703;
}

.task-item-low {
    border-left: 4px solid #2a9d8f;
}

/* Custom Checkbox */
.task-checkbox {
    margin-right: 15px;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* Task Content */
.task-content {
    flex: 1;
    margin-right: 15px;
}

.task-text {
    font-size: 16px;
    margin-bottom: 5px;
}

.task-details {
    font-size: 12px;
    color: #888;
}

.task-completed .task-text {
    text-decoration: line-through;
    color: #a0a0a0;
}

/* Delete Button */
.delete-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    color: #e63946;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #a0a0a0;
}

/* Task Summary */
.tasks-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5px 5px 5px;
    font-size: 14px;
    color: #888;
}

/* Clear completed button */
#clear-completed-btn {
    background: none;
    border: none;
    color: #e63946;
    cursor: pointer;
    font-size: 14px;
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 25px;
    color: #7a7a7a;
    font-size: 14px;
}

/* Media Query for Responsive Design - Added in Responsive Implementation Lab */
@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-actions {
        justify-content: stretch;
    }
    
    button[type="submit"] {
        width: 100%;
    }
    
    .tasks-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #clear-completed-btn {
        align-self: flex-end;
    }
    
    /* Optimize for touch */
    .task-checkbox {
        width: 24px;
        height: 24px;
    }
    
    .delete-btn {
        padding: 8px;
    }
    
    .filter-btn {
        padding: 8px 5px;
    }
}