/* Basic styling for the Family Chore Board */
:root {
    --row-height: 60px;
    --header-height: 40px;
    --gap: 2px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    color: #333;
    user-select: none;
    -webkit-touch-callout: none;
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    flex: 1;
}

.version {
    font-size: 14px;
    background-color: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: normal;
}

.week-view {
    flex: 1;
    overflow: auto;
    padding: 10px;
    background-color: white;
}

.week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-button {
    background-color: #e0e0e0;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.nav-button:hover {
    background-color: #d0d0d0;
}

#week-display {
    font-weight: bold;
    font-size: 18px;
    min-width: 150px;
    text-align: center;
}

.last-updated {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* empty header + 7 days */
    gap: var(--gap);
}

.day-header.empty-header {
    width: 100%;
    min-width: 80px;
}

.day-header {
    background-color: #e8f5e8;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weekday {
    font-weight: bold;
    text-transform: capitalize;
}

.date {
    font-size: 14px;
    font-weight: bold;
}

.day-note {
    background-color: #fff9c4;
    border: 1px solid #ffe082;
    border-radius: 2px;
    padding: 4px;
    font-size: 11px;
    margin-top: 4px;
    min-height: 20px;
}

.category-header {
    grid-column: 1 / -1; /* Span all columns */
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
}

.task-row {
    display: contents; /* Allow grid children to participate in grid layout */
}

.task-name {
    grid-column: 1; /* First column */
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    align-items: center;
    font-size: 13px;
    min-height: var(--row-height);
}

.task-cell {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px;
    min-height: var(--row-height);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-cell:hover {
    background-color: #f8f8f8;
    border-color: #ddd;
}

.task-cell.checked {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.assignee-person {
    background-color: #e3f2fd;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: center;
    margin-bottom: 4px;
}

.assignee-both {
    background-color: #ffecb3;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 4px;
}

.task-detail {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.2;
}

.completion-indicator {
    display: flex;
    gap: 2px;
}

.completion-mark {
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: inline-block;
}

/* Kiosk-specific improvements */
@media (pointer: coarse) {
    .nav-button,
    .task-cell {
        min-height: 48px;
    }

    .task-name {
        min-height: 48px;
    }

    .task-cell {
        padding: 12px;
    }
}

/* Ensure content is readable */
.task-cell:active {
    background-color: #e8f5e8;
}

/* Hide browser focus outlines that might interfere with kiosk mode */
*:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}