/* VRC Event Calendar Styles */
.vrc-calendar-container {
    border: 1px solid #ddd;
    padding: 15px;
    font-family: sans-serif;
}

/* Header: Navigation and View Switcher */
.vrc-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.vrc-calendar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}
.vrc-current-date {
    font-weight: bold;
    font-size: 1.2em;
}
.vrc-calendar-view-switcher {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}
.vrc-calendar-view-switcher a {
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border-left: 1px solid #ccc;
    white-space: nowrap;
}
.vrc-calendar-view-switcher a:first-child {
    border-left: none;
}
.vrc-calendar-view-switcher a.active,
.vrc-calendar-view-switcher a:hover {
    background-color: #0073aa;
    color: white;
}

/* Today View: Detailed List */
.vrc-today-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.vrc-event-item {
    border: 1px solid #eee;
    border-radius: 5px;
    transition: box-shadow 0.2s;
}
.vrc-event-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.vrc-event-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    gap: 15px;
    padding: 10px;
}
.vrc-event-image {
    width: 160px;
    height: 90px;
    flex-shrink: 0;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.vrc-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vrc-event-details {
    flex-grow: 1;
}
.vrc-event-title, .vrc-event-time, .vrc-event-group {
    margin: 0 0 5px 0;
}
.vrc-event-title {
    font-size: 1.1em;
    font-weight: bold;
}

/* Week/Month Grid View (Default for Month) */
.vrc-grid-view {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
}
.vrc-weekday-header {
    text-align: center;
    font-weight: bold;
    background-color: #f7f7ff;
    padding: 8px 4px;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}
.vrc-grid-day {
    min-height: 120px;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 5px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}
.vrc-grid-day.other-month {
    background-color: #f9f9f9;
}
.vrc-grid-day.today {
    background-color: #fffbe6;
}
.vrc-day-header {
    font-weight: bold;
    margin-bottom: 5px;
}
.vrc-day-events {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 12px;
}
.vrc-grid-event {
    display: block;
    background-color: #e4f2fd;
    padding: 3px 5px;
    border-radius: 3px;
    margin-bottom: 3px;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vrc-grid-event:hover {
    background-color: #d1e5f7;
    color: #000;
}
.vrc-grid-event-time {
    font-weight: bold;
}

/* Week View Override: Always vertical list */
.vrc-week-view {
    display: block; /* グリッドを解除 */
    border-left: 0;
}
.vrc-week-view .vrc-weekday-header {
    display: none; /* 曜日ヘッダーを非表示に */
}
.vrc-week-view .vrc-grid-day {
    min-height: 60px; /* 高さを調整 */
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}
.vrc-week-view .vrc-grid-day:first-child {
    border-top: 1px solid #ccc;
}

/* Responsive CSS */
@media (max-width: 768px) {
    .vrc-calendar-container {
        padding: 10px;
    }

    .vrc-calendar-header {
        flex-direction: column;
        align-items: center;
    }
    .vrc-current-date {
        font-size: 1.1em;
    }

    /* Month view becomes vertical on mobile */
    .vrc-month-view {
        display: block; /* グリッドを解除 */
        border-left: 0;
    }
    .vrc-month-view .vrc-weekday-header {
        display: none; /* 曜日ヘッダーを非表示に */
    }
    .vrc-month-view .vrc-grid-day {
        min-height: 60px; /* 高さを調整 */
        border-right: 0;
        border-left: 1px solid #ccc;
        border-right: 1px solid #ccc;
    }
    .vrc-month-view .vrc-grid-day:first-child {
        border-top: 1px solid #ccc;
    }

    .vrc-day-header {
        font-size: 1em;
    }
    .vrc-day-events {
        max-height: 150px;
    }
}

/* --- テーマのH3スタイルを上書きするための追加コード --- */
.vrc-today-view .vrc-event-title {
    border-top: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 5px !important; /* 元々の下の余白を維持 */
}

/* === ここから追加 === */
.vrc-event-time {
    display: flex;
    align-items: center; /* アイコンとテキストを垂直方向に中央揃え */
}

.vrc-event-time .dashicons {
    margin-right: 0.4em; /* アイコンと時間の間に少し余白を追加 */
}
/* === ここまで追加 === */