/* Task and Calendar Styles */

/* Page Section Container */
.page-section {
    background: white;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Task Filters */
.task-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-filters select,
.task-filters input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.task-filters input[type="text"] {
    flex: 1;
    min-width: 200px;
}

/* Task Groups */
.task-group {
    margin-bottom: 2rem;
}

.task-group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Task Cards */
.task-card {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s;
}

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

.task-card.task-completed {
    opacity: 0.7;
}

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

.task-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Task Checkbox */
.task-checkbox {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.task-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Task Content */
.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.task-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
}

.task-due-date,
.task-assigned {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
}

.task-due-date.task-overdue {
    color: #dc2626;
    font-weight: 600;
}

.task-related {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Task Actions */
.task-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Calendar Container */
.calendar-container {
    background: white;
    padding: 1rem;
    min-height: 600px;
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-controls h3 {
    margin: 0;
    font-size: 1.25rem;
    min-width: 200px;
}

.calendar-view-buttons {
    display: flex;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.calendar-view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.calendar-view-btn:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.calendar-view-btn:hover {
    background: #f3f4f6;
}

.calendar-view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Calendar Month View */
.calendar-month {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-bottom: none;
}

.calendar-weekday {
    background: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: #f9fafb;
}

.calendar-day.other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.calendar-day.today {
    background: #eff6ff;
}

.calendar-day.today .calendar-day-number {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.calendar-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.calendar-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.calendar-event-dot.event {
    background: var(--primary-color);
}

.calendar-event-dot.task {
    background: #10b981;
}

.event-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Calendar Week View */
.calendar-week {
    margin-top: 1rem;
}

.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-bottom: none;
}

.calendar-week-day-header {
    background: white;
    padding: 0.75rem;
    text-align: center;
}

.calendar-week-day-header.today {
    background: #eff6ff;
}

.day-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
}

.day-number {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.calendar-week-body {
    border: 1px solid #e5e7eb;
}

.calendar-hour-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-hour-row:last-child {
    border-bottom: none;
}

.calendar-hour-label {
    padding: 0.5rem;
    text-align: right;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

.calendar-hour-slots {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
}

.calendar-hour-slot {
    background: white;
    padding: 0.25rem;
    cursor: pointer;
    min-height: 40px;
    transition: background 0.2s;
}

.calendar-hour-slot:hover {
    background: #f9fafb;
}

.calendar-event-block {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.calendar-task-block {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

/* Calendar Day View */
.calendar-day-view {
    margin-top: 1rem;
}

.calendar-day-schedule {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-hour {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day-hour:last-child {
    border-bottom: none;
}

.calendar-day-hour-label {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

.calendar-day-hour-content {
    padding: 1rem;
    background: white;
    position: relative;
}

.btn-add-event {
    background: none;
    border: 1px dashed #d1d5db;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s;
}

.calendar-day-hour-content:hover .btn-add-event {
    opacity: 1;
}

.btn-add-event:hover {
    background: #f9fafb;
    border-color: var(--primary-color);
}

/* Google Sync Status */
.google-sync-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.google-sync-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.google-sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-connected {
    color: #10b981;
    font-weight: 600;
}

.status-disconnected {
    color: #6b7280;
}

/* Empty State */
.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .task-filters {
        flex-direction: column;
    }
    
    .task-filters select,
    .task-filters input {
        width: 100%;
    }
    
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-controls h3 {
        text-align: center;
    }
    
    .calendar-view-buttons {
        justify-content: center;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .calendar-weekday {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}
