/* カレンダー全体のラッパー */
.ec-calendar-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ヘッダー（月の切り替え） */
.ec-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ec-calendar-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.ec-nav-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.ec-nav-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* カレンダーグリッド */
.ec-calendar {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* 曜日ヘッダー */
.ec-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.ec-weekday {
    padding: 12px;
    text-align: center;
    font-weight: bold;
    color: #555;
}

/* 日曜日の色 */
.ec-weekday.ec-sunday {
    color: #e74c3c;
}

/* 土曜日の色 */
.ec-weekday.ec-saturday {
    color: #3498db;
}

/* 日付グリッド */
.ec-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

/* 各日付セル */
.ec-day {
    background: white;
    min-height: 100px;
    padding: 8px;
    position: relative;
}

.ec-day-empty {
    background: #fafafa;
}

.ec-day-number {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

/* 日曜日の日付 */
.ec-day-sunday .ec-day-number {
    color: #e74c3c;
}

/* 土曜日の日付 */
.ec-day-saturday .ec-day-number {
    color: #3498db;
}

.ec-today .ec-day-number {
    background: #007bff;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* イベントエリア */
.ec-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* イベント項目 */
.ec-event {
    display: block;
    padding: 4px 8px;
    background: #3498db;
    color: white;
    text-decoration: none;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-event:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* 複数日イベントのスタイル */
.ec-event-start {
    background: #27ae60;
    border-radius: 3px 0 0 3px;
    margin-right: -8px;
    padding-right: 16px;
}

.ec-event-start::after {
    content: '→';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.ec-event-continue {
    background: #2ecc71;
    border-radius: 0;
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 16px;
    padding-right: 16px;
}

.ec-event-end {
    background: #27ae60;
    border-radius: 0 3px 3px 0;
    margin-left: -8px;
    padding-left: 16px;
}

.ec-event-end::before {
    content: '←';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ec-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .ec-day-number {
        font-size: 12px;
    }
    
    .ec-event {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .ec-calendar-header h3 {
        font-size: 18px;
    }
    
    .ec-weekday {
        padding: 8px 4px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ec-day {
        min-height: 60px;
    }
    
    .ec-event span {
        display: none;
    }
    
    .ec-event {
        height: 8px;
        padding: 0;
    }
    
    .ec-event::before {
        content: '●';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 8px;
    }
}