/* Kintone Calendar Viewer — ミニマル・クリーンデザイン v1.3.1 */

/* ── ラッパー ──────────────────────────────── */
.kcv-calendar-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    background: #fff;
    border-radius: 12px;
    box-sizing: border-box;
}

/* ── ヘッダーツールバー ────────────────────── */
.kcv-calendar-wrap .fc-header-toolbar {
    padding: 0 8px 16px;
    margin-bottom: 0 !important;
}

.kcv-calendar-wrap .fc-toolbar-title {
    font-size: 1.1rem !important;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #222;
}

/* ── ナビゲーションボタン ──────────────────── */
.kcv-calendar-wrap .fc-button {
    background: transparent !important;
    border: 1px solid #e0e0e0 !important;
    color: #555 !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    padding: 4px 10px !important;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s;
}

.kcv-calendar-wrap .fc-button:hover {
    background: #f5f5f5 !important;
    color: #222 !important;
}

.kcv-calendar-wrap .fc-button-active,
.kcv-calendar-wrap .fc-button.fc-button-active {
    background: #222 !important;
    color: #fff !important;
    border-color: #222 !important;
}

.kcv-calendar-wrap .fc-prev-button,
.kcv-calendar-wrap .fc-next-button {
    padding: 4px 8px !important;
}

/* ── 曜日ヘッダー ──────────────────────────── */
.kcv-calendar-wrap .fc-col-header-cell {
    padding: 8px 0 !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999;
    border: none !important;
    background: transparent !important;
}

.kcv-calendar-wrap .fc-day-sat .fc-col-header-cell-cushion {
    color: #5b8fd4;
}
.kcv-calendar-wrap .fc-day-sun .fc-col-header-cell-cushion {
    color: #d46b5b;
}

/* ── セル全般 ──────────────────────────────── */
.kcv-calendar-wrap .fc-daygrid-day {
    background: #fff;
}

.kcv-calendar-wrap td,
.kcv-calendar-wrap th {
    border-color: #f0f0f0 !important;
}

.kcv-calendar-wrap .fc-day-sat {
    background: #f7f9fd !important;
}
.kcv-calendar-wrap .fc-day-sun {
    background: #fdf8f7 !important;
}

/* ── 日付数字（通常） ──────────────────────── */
.kcv-calendar-wrap .fc-daygrid-day-number {
    font-size: 0.78rem;
    font-weight: 500;
    color: #bbb;
    padding: 6px 8px !important;
    text-decoration: none !important;
    display: block;
}

/* ── 今日の日付（黒丸） ────────────────────── */
/* ::before 疑似要素で円を描くことでレイアウト崩れを回避 */
.kcv-calendar-wrap .fc-day-today .fc-daygrid-day-number {
    position: relative;
    color: #fff !important;
    font-size: 0.72rem;
    padding: 6px 8px !important;
    z-index: 1;
    text-decoration: none !important;
}
.kcv-calendar-wrap .fc-day-today .fc-daygrid-day-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background: #222;
    border-radius: 50%;
    z-index: -1;
}

/* 今日セルの背景はごく薄く */
.kcv-calendar-wrap .fc-day-today {
    background: #fafafa !important;
}

/* 当月以外の日 */
.kcv-calendar-wrap .fc-day-other .fc-daygrid-day-number {
    color: #ddd;
}

/* ── イベント（月表示） ────────────────────── */
.kcv-calendar-wrap .fc-daygrid-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    font-size: 0.72rem !important;
    font-weight: 500;
    margin: 1px 4px !important;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kcv-calendar-wrap .fc-event-title {
    font-weight: 500;
}

/* ── 週表示 ────────────────────────────────── */

/* 時刻ラベル（左端の「9時」「10時」） */
.kcv-calendar-wrap .fc-timegrid-slot-label-cushion,
.kcv-calendar-wrap .fc-timegrid-axis-cushion {
    font-size: 0.7rem !important;
    font-weight: 500;
    color: #bbb !important;
    letter-spacing: 0.02em;
}

/* 時刻ラベルセルの幅・境界 */
.kcv-calendar-wrap .fc-timegrid-axis,
.kcv-calendar-wrap .fc-timegrid-slot-label {
    border-color: #f0f0f0 !important;
}

/* 時刻グリッド横線 */
.kcv-calendar-wrap .fc-timegrid-slot {
    border-color: #f5f5f5 !important;
}
.kcv-calendar-wrap .fc-timegrid-slot-minor {
    border-color: #fafafa !important;
}

/* 週表示イベント */
.kcv-calendar-wrap .fc-timegrid-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 3px 6px !important;
    cursor: default;
}

.kcv-calendar-wrap .fc-timegrid-event .fc-event-title {
    font-size: 0.78rem;
    font-weight: 600;
}

.kcv-calendar-wrap .fc-timegrid-event .fc-event-time {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.85;
}

/* ── リスト表示 ────────────────────────────── */
.kcv-calendar-wrap .fc-list {
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px;
    overflow: hidden;
}

.kcv-calendar-wrap .fc-list-day-cushion {
    background: #fafafa !important;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    padding: 8px 14px !important;
}

.kcv-calendar-wrap .fc-list-event-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.kcv-calendar-wrap .fc-list-event:hover td {
    background: #fafafa !important;
}

.kcv-calendar-wrap .fc-list-empty {
    font-size: 0.85rem;
    color: #bbb;
}

/* ── モバイル対応 ──────────────────────────── */
@media (max-width: 640px) {
    .kcv-calendar-wrap .fc-header-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    .kcv-calendar-wrap .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    .kcv-calendar-wrap .fc-daygrid-event {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }
}
