.persona-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.persona-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.persona-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.persona-btn:hover {
    border-color: var(--accent);
    background: #f8f9fa;
}

.persona-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.persona-btn.active p {
    color: rgba(255, 255, 255, 0.8);
}

.persona-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.persona-btn h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.persona-btn p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.persona-schedule {
    background: white;
    border-radius: 8px;
    border: 1px solid #dadce0;
    overflow: hidden;
    max-width: 450px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.schedule-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.schedule-header h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.schedule-header p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

.schedule-content {
    display: none;
    background: #fafafa;
}

.schedule-content.active {
    display: block;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-auto-rows: 20px;
    position: relative;
    min-height: 450px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
}

.time-slot {
    grid-column: 1;
    grid-row: span 4;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
    position: relative;
}

/* Hour line that spans full width */
.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: -1000px;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

.time-slot:first-child::before {
    display: none;
}

/* Non-work hours background */
.time-slot.non-work::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: -1000px;
    bottom: 0;
    background: #f8f9fa;
    z-index: -2;
    pointer-events: none;
}

/* Grid row helpers for consistent positioning */
/* Each hour is 4 rows, starting at row 1 for 00:00 */
/* 00:00 = rows 1-4, 01:00 = rows 5-8, etc. */
/* 07:00 = rows 29-32, 08:00 = rows 33-36, etc. */

.time-label {
    font-size: 10px;
    color: #70757a;
    padding-right: 8px;
    text-align: right;
    width: 100%;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.calendar-item {
    grid-column: 2;
    margin: 1px 12px 1px 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-height: auto;
    display: flex;
    padding-left: 16px;
    z-index: 1;
}


.calendar-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Color bar on the left - positioned inside like Google Calendar */
.calendar-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 1.5px;
}

/* Travel time blocks */
.calendar-item.travel {
    background: #f3f4f6;
}

/* Ensure consistent font size for all calendar items */
.calendar-item .item-title {
    font-size: 12px !important;
}

/* Compact padding for 15-minute blocks */
.calendar-item[style*="span 1"] .item-content {
    padding: 2px 8px 2px 2px;
}

/* Travel time blocks inherit color from their event type */
.calendar-item.travel.meeting::before {
    background: #4285f4;  /* Blue for meeting-related travel */
}

.calendar-item.travel.personal::before {
    background: #fbbc04;  /* Yellow for personal-related travel */
}

.calendar-item.travel.break::before {
    background: #ea4335;  /* Red for break-related travel */
}

/* Default gray for unspecified travel */
.calendar-item.travel::before {
    background: #9ca3af;
}

.calendar-item.meeting {
    background: #e8f0fe;
}

.calendar-item.meeting::before {
    background: #4285f4;
}

.calendar-item.work {
    background: #e6f4ea;
}

.calendar-item.work::before {
    background: #34a853;
}

.calendar-item.personal {
    background: #fef7e0;
}

.calendar-item.personal::before {
    background: #fbbc04;
}

.calendar-item.break {
    background: #fee;
}

.calendar-item.break::before {
    background: #ea4335;
}

.calendar-item.task {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 10px;
    min-height: auto;
}

.calendar-item.task::before {
    background: #70757a;
}

/* Travel time blocks */
.calendar-item.travel {
    background: #f3f4f6;
    opacity: 0.9;
}

.calendar-item.travel::before {
    background: #9ca3af;
}

/* Auto-scheduled indicator */
.calendar-item.auto-scheduled {
    position: relative;
}

.calendar-item.auto-scheduled::after {
    content: '✨';
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 10px;
    opacity: 0.6;
}

.item-checkbox {
    width: 14px;
    height: 14px;
    border: 1.5px solid #70757a;
    border-radius: 50%;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
    min-width: 0;
    padding: 6px 10px 6px 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-title {
    font-size: 12px;
    color: #3c4043;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-time {
    font-size: 10px;
    color: #70757a;
    font-weight: 400;
    line-height: 1.1;
}

.item-subtitle {
    font-size: 11px;
    color: #70757a;
    font-weight: 400;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .persona-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .persona-sidebar {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }
    
    .persona-btn {
        min-width: 180px;
    }
    
    .persona-schedule {
        max-width: 100%;
    }
}