/* イベントカレンダーのカスタムスタイル */
.top-calendar__content {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
  }

.daiko-calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    margin-bottom: 20px;
    table-layout: fixed;
    max-width: 100%;
    overflow-x: auto;
}

.daiko-calendar th {
    background-color: #f5f5f5;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.daiko-calendar td {
    padding: 0;
    text-align: center;
    cursor: default;
    position: relative;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
}

.daiko-calendar td span {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    font-size: 18px;
}

.daiko-current-month {
    font-size: 1.5em;
    font-weight: bold;
  }

/* 日曜日の色 */
.daiko-calendar th:first-child,
.daiko-calendar td:first-child {
    color: #e74c3c;
}

/* 土曜日の色 */
.daiko-calendar th:last-child,
.daiko-calendar td:last-child {
    color: #3498db;
}

/* イベントがある日のスタイル */
.daiko-calendar td.available {
    cursor: pointer;
    position: relative;
    padding: 0;
}

.daiko-calendar td.available span {
    border-radius: 50%;
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: bold;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* イベントがある日にホバー時のスタイル */
.daiko-calendar td.available:hover span {
    background-color: #c82333;
}

/* 選択された日のスタイル */
.daiko-calendar td.selected {
    position: relative;
}

.daiko-calendar td.selected span {
    border-radius: 50%;
    background-color: #007bff !important;
    color: white !important;
    font-weight: bold;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* フィルター通知のスタイル */
.filter-notice {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* エリアフィルターのスタイル */
.daiko-event-calendar .daiko-calendar-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.daiko-event-calendar .daiko-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.daiko-prev-month,
.daiko-next-month {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daiko-prev-month:hover,
.daiko-next-month:hover {
    background-color: #e9ecef;
}

.daiko-event-calendar .daiko-area-filters {
    margin-top: 10px;
    width: 100%;
}

.daiko-area-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.daiko-area-filter-button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: #f8f9fa;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.daiko-area-filter-button:hover {
    background-color: #e9ecef;
}

.daiko-area-filter-button.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    font-weight: bold;
}

@media (min-width: 768px) {
    .daiko-event-calendar .daiko-calendar-header {
        align-items: center;
    }
    
    .daiko-event-calendar .daiko-area-filters {
        margin-top: 0;
        width: 100%;
    }
}

/* スマホ表示用のスタイル */
@media (max-width: 767px) {
    .daiko-event-calendar {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .daiko-calendar-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
        width: calc(100% + 20px);
    }
    
    .daiko-calendar {
        min-width: 320px;
        border-spacing: 1px;
        margin-bottom: 15px;
    }
    
    .daiko-calendar th,
    .daiko-calendar td {
        padding: 2px;
        font-size: 14px;
        width: 36px;
        height: 36px;
    }
    
    .daiko-current-month {
        font-size: 1.2em;
    }
    
    .daiko-calendar-navigation {
        width: 100%;
        justify-content: space-between;
    }
    
    .daiko-area-filter-button {
        padding: 4px 8px;
        font-size: 0.8em;
    }
    
    .daiko-event-title {
        font-size: 22px;
        margin: 15px auto;
    }
}

/* エリアフィルタのメッセージスタイル */
.daiko-no-filtered-events {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    color: #6c757d;
}

/* イベントタイトルのスタイル */
.daiko-event-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin: 20px auto;
    padding: 0 15px;
    color: #333;
    line-height: 1.4;
}

/* ========================================
   daiko_tm テーマ フロントページ用レイアウト調整
   （テーマに依存しないようプラグイン側で管理）
   ======================================== */
.calendar-container {
    width: 480px;
}

.top-sec02 .event-content {
    display: block;
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
    .top-sec02 .flex {
        justify-content: flex-start;
        gap: 0;
    }
    .top-sec02 .flex .left {
        writing-mode: initial;
        margin-bottom: 20px;
    }
    .top-sec02 .flex .right {
        width: 100%;
        min-width: initial;
        margin-right: 0;
    }
    .top-sec02 .event-calendar__cont [data-component="event-calendar"] {
        margin-left: 0;
    }
}

@media screen and (max-width: 991px) {
    .top-sec02 .event-content {
        border: none;
        padding: 20px 12px;
    }
    .top-sec02 .event-content .event-card {
        border-top: none;
        border-bottom: none;
    }
    .top-sec02 .event-content .event-card a .event-card__thumb {
        width: auto;
    }
}

@media screen and (max-width: 540px) {
    .calendar-container {
        width: 100%;
    }
}
