/*
Theme Name: Lightning Child
Theme URI: 
Template: lightning
Description: 
Author: 
Tags: 
Version: 0.6.0
*/
/* カレンダー全体のコンテナ */
.yca-calendar-wrapper {
    margin: 20px 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* PC版で横並びにする設定 */
.yca-calendar-flex {
    display: flex;
    gap: 30px; /* カレンダー間の隙間 */
    flex-wrap: wrap; /* 画面が狭いときは折り返す */
    margin-bottom: 40px;
    justify-content: space-between;
}

/* 各月のカレンダーの幅（PCでは48%程度） */
.yca-month-table {
    flex: 1;
    min-width: 320px; /* スマホで崩れないための最小幅 */
}

/* テーブルのデザイン調整 */
.yca-month-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #0073aa; /* 外枠を少し強調 */
}

/* ヘッダーの年月表示 */
.yca-month-table h3 {
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-bottom: 2px solid #0073aa;
}

/* 曜日の行 */
.yca-month-table th {
    background: #0073aa;
    color: #fff;
    font-weight: normal;
    padding: 8px 0;
    text-align: center;
}

/* 日付のセル */
.yca-month-table td {
    border: 1px solid #ddd;
    height: 80px; /* 高さを少し出す */
    vertical-align: top;
    padding: 4px;
    position: relative;
}

/* 日付数字 */
.day-num {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
}

/* 土日の色付け */
.yca-month-table th.sun, .yca-month-table td.sun { background: #fff5f5; }
.yca-month-table th.sun { background: #d32f2f; }
.yca-month-table th.sat, .yca-month-table td.sat { background: #f5faff; }
.yca-month-table th.sat { background: #1976d2; }

/* イベントのリンク（黄色ハイライト） */
.event-link {
    display: block;
    /*background: #fff176; /* 背景色はPHPから注入 */
    color: #333 !important;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid;/* PHPから色を注入 */
}

.event-link:hover {
    background: #ffee58;
    opacity: 0.9;
}
/* カレンダーナビゲーション */
.yca-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -40px; /* カレンダーのタイトル行と同じ高さに持ってくるための調整 */
    position: relative;
    z-index: 10;
}

.yca-calendar-nav a {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.yca-calendar-nav a:hover {
    color: #0073aa;
}

/* カレンダー本体の余白調整 */
.yca-calendar-flex {
    margin-top: 20px;
}

/* タイトルとボタンが重ならないようにする調整 */
.yca-month-table h3 {
    padding-left: 50px;
    padding-right: 50px;
}

/* スマホでの調整 */
@media screen and (max-width: 767px) {
    .yca-calendar-nav {
        margin-bottom: 10px;
        position: static;
    }
    .yca-calendar-nav a {
        background: #f0f0f0;
        border-radius: 4px;
        padding: 5px 15px;
    }
}
/* 外枠のコンテナ */
.yca-upcoming-container {
    margin-top: 40px;
    border: 1px solid #0073aa;
    padding: 40px;
    background-color: #fff;
}

/* タイトル */
.yca-upcoming-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 1.4rem;
    border: none; /* Lightningのデフォルト下線を消す場合 */
}

/* 各イベントの行 */
.yca-event-item {
    display: flex;
    margin-bottom: 25px;
    align-items: flex-start;
    line-height: 1.6;
    border-bottom: 1px dotted #eee;
    /* border-left と padding-left はPHPから注入 */
}

/* 日時テキスト部分 */
.yca-event-date {
    flex: 0 0 420px; /* 固定幅 */
    color: #666;
    font-size: var(--vk-size-text);
    letter-spacing: 0.05em;
}

/* タイトルリンク部分 */
.yca-event-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: normal;
    font-size: var(--vk-size-text);
}

.yca-event-link:hover {
    text-decoration: underline;
}

/* スマホ表示の際の調整（レスポンシブ） */
@media screen and (max-width: 768px) {
    .yca-upcoming-container {
        padding: 20px;
    }
    .yca-event-item {
        flex-direction: column; /* 縦並びに */
        margin-bottom: 20px;
        border-bottom: 1px dotted #ccc;
        padding-bottom: 10px;
    }
    .yca-event-date {
        flex: none;
        width: 100%;
        font-size: var(--vk-size-text);
        margin-bottom: 5px;
    }
}