/* Akasha Calendario — estilos base. Colores editables desde el widget (variables CSS). */
.akcal {
	--akcal-accent: #74a9dc;
	--akcal-accent-text: #0b2545;
	--akcal-soft: #dbe9f7;
	--akcal-today: #bcd8f1;
	--akcal-pill: #0b2545;
	--akcal-pill-text: #fff;
	--akcal-dot: #22c55e;
	--akcal-chip: #dbe9f7;
	--akcal-chip-text: #1d4e89;
	--akcal-card: #fff;
	--akcal-border: #e5e7eb;
	--akcal-text: #111827;
	--akcal-muted: #6b7280;
	--akcal-radius: 16px;
	--akcal-gap: 16px;
	color: var(--akcal-text);
	display: flex;
	flex-direction: column;
	gap: calc(var(--akcal-gap) * 2);
	line-height: 1.35;
}
.akcal *, .akcal *::before, .akcal *::after { box-sizing: border-box; }
.akcal a { color: inherit; text-decoration: none; }
.akcal a:hover { text-decoration: underline; }
.akcal [hidden] { display: none !important; }

/* Barras de cabecera */
.akcal-bar {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	background: var(--akcal-accent); color: var(--akcal-accent-text);
	border-radius: var(--akcal-radius); padding: 14px 22px; margin-bottom: var(--akcal-gap);
}
.akcal-bar--soft { background: var(--akcal-soft); }
.akcal .akcal-h { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: inherit; }
.akcal-bar--soft .akcal-h { font-size: 1.15rem; }
.akcal-range { font-size: .9rem; opacity: .8; }
.akcal-nav { margin-left: auto; display: flex; gap: 6px; }
.akcal-nav button {
	all: unset; cursor: pointer; background: #fff; color: var(--akcal-accent-text);
	border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; line-height: 1.4;
	border: 1px solid rgba(0,0,0,.08);
}
.akcal-nav button:hover { background: var(--akcal-pill); color: var(--akcal-pill-text); }
.akcal-nav button:disabled { opacity: .35; cursor: default; background: #fff; color: var(--akcal-accent-text); }
.akcal-nav button:focus-visible { outline: 2px solid var(--akcal-pill); outline-offset: 2px; }

/* Pestañas Semana / Próximamente */
.akcal--tabs { gap: 0; }
.akcal-bar--tabs { background: var(--akcal-soft); padding: 8px 12px 8px 8px; }
.akcal-tabs { display: flex; gap: 4px; background: rgba(255,255,255,.55); padding: 4px; border-radius: 999px; }
.akcal-tab {
	all: unset; cursor: pointer; padding: 8px 20px; border-radius: 999px;
	font-size: 1.1rem; font-weight: 800; line-height: 1.2; color: var(--akcal-accent-text);
	transition: background .15s, color .15s;
}
.akcal-tab:hover { background: rgba(255,255,255,.9); }
.akcal-tab[aria-selected="true"] { background: var(--akcal-pill); color: var(--akcal-pill-text); }
.akcal-tab:focus-visible { outline: 2px solid var(--akcal-pill); outline-offset: 2px; }
.akcal-weekctl { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.akcal--tabs .akcal-footer { margin-top: calc(var(--akcal-gap) * 2); }

/* Tarjetas */
.akcal-card {
	background: var(--akcal-card); border: 1px solid var(--akcal-border);
	border-radius: var(--akcal-radius); padding: 14px;
}
.akcal-card.is-past { opacity: .55; }
.akcal .akcal-title { margin: 4px 0 6px; font-size: 1.15rem; font-weight: 800; line-height: 1.25; color: var(--akcal-text); }
.akcal-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.akcal-time { font-weight: 600; color: var(--akcal-muted); }
.akcal-date { font-size: .85rem; font-weight: 700; color: var(--akcal-muted); }
.akcal-badge {
	display: inline-flex; align-items: center; gap: 6px; background: #f1f3f5; border-radius: 999px;
	padding: 3px 10px; font-size: .75rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #374151;
}
.akcal-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--akcal-dot); }
.akcal-field { color: var(--akcal-muted); font-size: .95rem; }
.akcal-field strong { color: var(--akcal-text); font-weight: 700; }
.akcal-excerpt { margin: 6px 0 0; color: var(--akcal-muted); font-size: .92rem; }
.akcal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.akcal-chip {
	background: var(--akcal-chip); color: var(--akcal-chip-text); border-radius: 999px;
	padding: 3px 12px; font-size: .8rem; font-weight: 700;
}
.akcal-more { font-size: .85rem; font-weight: 700; color: var(--akcal-chip-text) !important; margin-left: auto; }
.akcal-img img { display: block; width: 100%; height: auto; border-radius: calc(var(--akcal-radius) * .6); box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* Próximamente: tarjeta horizontal */
.akcal-list { display: flex; flex-direction: column; gap: var(--akcal-gap); }
.akcal-card--row { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
.akcal-card--row .akcal-img { flex: 0 0 120px; }
.akcal-card--row .akcal-img img { aspect-ratio: 3 / 4; object-fit: cover; }
.akcal-card--row .akcal-body { flex: 1; min-width: 0; }
.akcal-empty { color: var(--akcal-muted); margin: 0; padding: 0 6px; }

/* Semana: 7 columnas */
.akcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.akcal-day { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.akcal-dayhead {
	background: var(--akcal-soft); border-radius: calc(var(--akcal-radius) * .75);
	padding: 10px 14px; display: flex; flex-direction: column; gap: 2px;
}
.akcal-day.is-today .akcal-dayhead { background: var(--akcal-today); }
.akcal-day.is-past .akcal-dayhead { opacity: .65; }
.akcal-dname { display: block; font-weight: 800; color: var(--akcal-accent-text); }
.akcal-dname::first-letter, .akcal-date::first-letter { text-transform: uppercase; }
.akcal-ddate { color: var(--akcal-muted); font-size: .92rem; }
.akcal-todaypill {
	margin-top: 4px; background: var(--akcal-pill); color: var(--akcal-pill-text); border-radius: 999px;
	padding: 2px 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; align-self: stretch;
}
.akcal-daybody { display: flex; flex-direction: column; gap: 10px; }
.akcal-card--col { padding: 12px; }
.akcal-card--col .akcal-title { font-size: 1.02rem; }
.akcal-card--col .akcal-time { display: block; font-size: .9rem; margin: 4px 0 2px; }
.akcal-card--col .akcal-img { margin: 8px 0; }
.akcal-card--col .akcal-field { font-size: .88rem; }
.akcal-none { color: var(--akcal-border); font-size: 1.4rem; text-align: center; padding: 6px 0; }

.akcal-footer { text-align: center; }
.akcal-all {
	display: inline-block; background: var(--akcal-pill); color: var(--akcal-pill-text) !important;
	border-radius: 999px; padding: 10px 22px; font-weight: 700;
}

/* Tablet: scroll horizontal de la semana */
@media (max-width: 1024px) {
	.akcal-panel { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
	.akcal-grid { grid-template-columns: repeat(7, minmax(210px, 1fr)); }
	.akcal-day { scroll-snap-align: start; }
}
/* Móvil: días apilados, se ocultan los días sin actividades */
@media (max-width: 640px) {
	.akcal-panel { overflow: visible; }
	.akcal-grid { grid-template-columns: 1fr; }
	.akcal-day.is-empty:not(.is-today) { display: none; }
	.akcal-dayhead { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
	.akcal-todaypill { margin: 0 0 0 auto; align-self: auto; }
	.akcal-card--row { padding: 14px; gap: 12px; }
	.akcal-card--row .akcal-img { flex-basis: 84px; }
	.akcal-card--col .akcal-img img { width: auto; max-width: 100%; max-height: 240px; }
	.akcal .akcal-h { font-size: 1.25rem; }
	.akcal-bar { padding: 12px 16px; }
	.akcal-bar--tabs { padding: 8px; }
	.akcal-tabs { width: 100%; }
	.akcal-tab { flex: 1; text-align: center; padding: 8px 10px; font-size: 1rem; }
	.akcal-weekctl { padding: 4px 8px 0; }
}
