/* === 1. General GUI & Header === */
.cal_wrapper { 
    padding: 15px; 
    background: #fff; 
    font-family: sans-serif; 
}

.cal_header_bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-bottom: 15px; 
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 15px;
}

.cal_label { 
    font-weight: bold; 
    font-size: 1.1rem; 
    min-width: 180px; 
    text-align: center; 
    display: inline-block; 
}

.cal_btn { 
    background: #eee; 
    border: 1px solid #ccc; 
    padding: 5px 15px; 
    cursor: pointer; 
    border-radius: 4px; 
}
.cal_btn:hover { background: #ddd; }

.cal_view_toggle { 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    overflow: hidden; 
}

.cal_vbtn { 
    border: none; 
    padding: 8px 15px; 
    background: #fff; 
    cursor: pointer; 
}
.cal_vbtn.active { 
    background: #3498db; 
    color: #fff; 
}

/* === 2. Month Grid View === */
.cal_month_grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #bdc3c7;
    gap: 1px;
    border-radius: 8px;
    overflow: hidden;
}

.cal_month_header {
    background: #34495e;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.cal_month_cell {
    background: white;
    min-height: 120px;
    padding: 8px;
    cursor: pointer;
}

.cal_month_cell:hover { background: #f8f9fa; }
.calendar_grayed_out { background: #f8f9fa; color: #bdc3c7; }
.cal_month_day_num { font-weight: bold; margin-bottom: 5px; }

/* === 3. Day View (Personal) === */
.cal_day_view { padding: 10px; }
.cal_day_info_header h2 { color: #2c3e50; margin-bottom: 20px; }

.cal_day_item {
    display: flex;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 15px;
    cursor: pointer;
    align-items: center;
}

.cal_day_time {
    width: 80px;
    font-weight: bold;
    color: #3498db;
    font-size: 1.1rem;
}

.cal_day_content { flex: 1; }
.cal_day_title { display: flex; align-items: center; gap: 10px; }
.cal_day_desc { color: #7f8c8d; font-size: 0.9rem; margin-top: 5px; }

.cal_pill_type {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    color: white;
}

.cal_empty_day {
    text-align: center;
    padding: 50px;
    color: #95a5a6;
    background: #fdfdfd;
    border-radius: 10px;
}

/* === 4. Week View Specifics === */
.cal_week_table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal_slot { height: 35px; border: 1px solid #eee; cursor: pointer; vertical-align: top; padding: 2px; }
.cal_slot.cal_weekend { background-color: #fff9db !important; }

/* === 5. Event Type Colors === */
.cal_event_pill { 
    margin: 2px 0; 
    padding: 2px 4px; 
    border-radius: 3px; 
    font-size: 0.75rem; 
    color: white; 
}
.cal_type_familj { background: #27ae60; }
.cal_type_jobb { background: #2980b9; }
.cal_type_skola { background: #9b59b6; }
.cal_type_annat { background: #95a5a6; }