/* com_myactivities + mod_my_calendar - ปฏิทินกิจกรรม */

.my-cal-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }

.my-cal {
	background: #fff; border: 1px solid var(--my-line, #e5e7eb);
	border-radius: var(--my-radius, 14px); padding: 16px;
	box-shadow: var(--my-shadow, 0 2px 14px rgba(16, 40, 80, .08));
}

.my-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.my-cal__title { font-size: 1.05rem; margin: 0; color: var(--my-dark, #10427a); }
.my-cal__nav {
	width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--my-line, #e5e7eb);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--my-primary, #1b5fa8); text-decoration: none; background: #fff;
}
.my-cal__nav:hover { background: var(--my-primary, #1b5fa8); color: #fff; border-color: transparent; }

.my-cal__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.my-cal__grid th {
	font-size: .8rem; font-weight: 600; color: var(--my-muted, #6b7280);
	padding: 6px 0; text-align: center; background: transparent;
}
.my-cal__grid th.is-weekend { color: #d1495b; }

.my-cal__cell { text-align: center; padding: 3px 0; vertical-align: top; height: 46px; }
.my-cal__day {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	font-size: .88rem; color: #33405a; text-decoration: none;
}
.my-cal__cell.is-out .my-cal__day { color: #c3cbd6; }
.my-cal__cell.is-weekend .my-cal__day { color: #d1495b; }
.my-cal__cell.is-out.is-weekend .my-cal__day { color: #e6b8bf; }
.my-cal__cell.has-events .my-cal__day { font-weight: 700; background: #eef4fb; color: var(--my-primary, #1b5fa8); }
.my-cal__cell.has-events .my-cal__day:hover { background: var(--my-primary, #1b5fa8); color: #fff; }
.my-cal__cell.is-today .my-cal__day {
	background: var(--my-primary, #1b5fa8); color: #fff;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--my-primary, #1b5fa8) 18%, transparent);
}

.my-cal__dots { display: flex; gap: 3px; justify-content: center; margin-top: 2px; height: 6px; }
.my-cal__dots i, .my-cal__legend i {
	width: 6px; height: 6px; border-radius: 50%; background: var(--dot, #1b5fa8); display: inline-block;
}

.my-cal__legend {
	list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--my-line, #e5e7eb);
	display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--my-muted, #6b7280);
}
.my-cal__legend li { display: flex; align-items: center; gap: 7px; }
.my-cal__legend i { width: 9px; height: 9px; }

/* ------------------------------------------------------------ agenda --- */
.my-cal-agenda {
	background: #fff; border: 1px solid var(--my-line, #e5e7eb);
	border-radius: var(--my-radius, 14px); padding: 18px;
	box-shadow: var(--my-shadow, 0 2px 14px rgba(16, 40, 80, .08));
}
.my-cal-agenda__title {
	display: flex; align-items: center; gap: 9px; font-size: 1.05rem;
	margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid #edf2f8; color: var(--my-dark, #10427a);
}
.my-cal-agenda__title i { color: var(--my-primary, #1b5fa8); }
.my-cal-agenda__empty { color: var(--my-muted, #6b7280); margin: 0; }

.my-cal-agenda__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.my-cal-agenda__item {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 12px; border-radius: var(--my-radius-sm, 8px);
	border: 1px solid var(--my-line, #e5e7eb);
	border-inline-start: 4px solid var(--ev, #1b5fa8);
	transition: box-shadow .18s ease, transform .18s ease;
}
.my-cal-agenda__item:hover { box-shadow: var(--my-shadow, 0 2px 14px rgba(16, 40, 80, .08)); transform: translateY(-2px); }

.my-cal-agenda__date {
	flex: 0 0 auto; width: 48px; height: 52px; border-radius: 10px;
	background: color-mix(in srgb, var(--ev, #1b5fa8) 12%, #ffffff); color: var(--ev, #1b5fa8);
	display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	.my-cal-agenda__date { background: #eef4fb; }
}
.my-cal-agenda__date strong { font-size: 1.2rem; }
.my-cal-agenda__date small { font-size: .7rem; }

.my-cal-agenda__body { min-width: 0; }
.my-cal-agenda__time { font-size: .8rem; color: var(--my-muted, #6b7280); display: inline-flex; gap: 6px; align-items: center; }
.my-cal-agenda__name { font-size: .98rem; margin: 3px 0; line-height: 1.5; }
.my-cal-agenda__name a { color: #13203a; text-decoration: none; }
.my-cal-agenda__name a:hover { color: var(--my-primary, #1b5fa8); }
.my-cal-agenda__place { font-size: .82rem; color: var(--my-muted, #6b7280); display: inline-flex; gap: 6px; align-items: center; }
.my-cal-agenda__place i, .my-cal-agenda__time i { color: var(--ev, #1b5fa8); }

/* ------------------------------------------------------- detail view --- */
.my-ev {
	background: #fff; border: 1px solid var(--my-line, #e5e7eb);
	border-radius: var(--my-radius, 14px); padding: 26px;
	box-shadow: var(--my-shadow, 0 2px 14px rgba(16, 40, 80, .08));
}
.my-ev__type {
	display: inline-block; background: var(--ev, #1b5fa8); color: #fff;
	border-radius: 999px; padding: 3px 14px; font-size: .78rem; font-weight: 600;
}
.my-ev__title { font-size: 1.6rem; margin: 10px 0 16px; }
.my-ev__figure { margin: 0 0 18px; }
.my-ev__figure img { width: 100%; border-radius: var(--my-radius-sm, 8px); display: block; }
.my-ev__meta {
	list-style: none; margin: 0 0 18px; padding: 14px 0; display: flex; flex-wrap: wrap; gap: 10px 26px;
	border-block: 1px dashed var(--my-line, #e5e7eb); font-size: .9rem;
}
.my-ev__meta li { display: flex; align-items: center; gap: 8px; }
.my-ev__meta i { color: var(--ev, #1b5fa8); }
.my-ev__body { line-height: 1.8; }
.my-ev__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ------------------------------------------- mod_my_calendar wrapper --- */
.my-calmod__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.my-calmod__badge {
	width: 58px; height: 58px; border-radius: 18px; flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
	background: linear-gradient(135deg, var(--my-light, #2e80d6), var(--my-primary, #1b5fa8)); color: #fff;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--my-primary, #1b5fa8) 28%, transparent);
}
.my-calmod__title { margin: 0; font-size: 1.35rem; color: var(--my-dark, #10427a); }
.my-calmod__sub { margin: 0; font-size: .88rem; color: var(--my-muted, #6b7280); }

.my-calmod__more {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
	font-size: .88rem; font-weight: 600; color: var(--my-primary, #1b5fa8); text-decoration: none;
}
.my-calmod__more:hover { text-decoration: underline; }

@media (max-width: 991px) {
	.my-cal-layout { grid-template-columns: 1fr; }
	.my-calmod__badge { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 14px; }
}
