/* Atlas Events — public stylesheet
   Uses CSS custom properties driven by the admin color setting.
   ------------------------------------------------------------------ */

:root {
	--ae-primary:       #2563eb;
	--ae-primary-light: #eff6ff;
	--ae-primary-dark:  #1d4ed8;
	--ae-text:          #111827;
	--ae-muted:         #6b7280;
	--ae-border:        #e5e7eb;
	--ae-bg:            #ffffff;
	--ae-radius:        6px;
	--ae-shadow:        0 1px 3px rgba(0,0,0,.10);
	--ae-font:          inherit;
}

/* Wrapper ---------------------------------------------------------------- */
.ae-calendar-wrap {
	font-family: var(--ae-font);
	color: var(--ae-text);
	max-width: 100%;
}

/* Toolbar ---------------------------------------------------------------- */
.ae-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.ae-toolbar__nav {
	display: flex;
	align-items: center;
	gap: 4px;
}
.ae-toolbar__nav button {
	background: var(--ae-bg);
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 6px 12px;
	cursor: pointer;
	font-size: 14px;
	transition: background .15s;
}
.ae-toolbar__nav button:hover { background: var(--ae-primary-light); }
.ae-toolbar__nav button.ae-btn-today { font-weight: 600; }
.ae-toolbar__title {
	font-size: 18px;
	font-weight: 700;
	flex: 1;
	min-width: 160px;
}
.ae-toolbar__views {
	display: flex;
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	overflow: hidden;
}
.ae-toolbar__views button {
	background: var(--ae-bg);
	border: none;
	border-right: 1px solid var(--ae-border);
	padding: 6px 14px;
	cursor: pointer;
	font-size: 13px;
	transition: background .15s;
}
.ae-toolbar__views button:last-child { border-right: none; }
.ae-toolbar__views button.ae-view-active {
	background: var(--ae-primary);
	color: #fff;
	font-weight: 600;
}
.ae-filter-wrap {
	margin-left: auto;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.ae-filter-wrap select {
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 6px 10px;
	font-size: 13px;
	background: var(--ae-bg);
	cursor: pointer;
}

/* RSVP ----------------------------------------------------------------------- */
.ae-rsvp-wrap {
	max-width: 480px;
	margin: 24px 0;
	font-family: var(--ae-font);
	color: var(--ae-text);
}
.ae-rsvp-meta { margin-bottom: 16px; }
.ae-rsvp-capacity { display: flex; align-items: center; gap: 10px; }
.ae-rsvp-bar {
	flex: 1;
	height: 8px;
	background: var(--ae-border);
	border-radius: 4px;
	overflow: hidden;
}
.ae-rsvp-bar__fill {
	height: 100%;
	background: var(--ae-primary);
	border-radius: 4px;
	transition: width .3s;
}
.ae-rsvp-spots { font-size: 13px; color: var(--ae-muted); white-space: nowrap; margin: 0; }
.ae-rsvp-waitlist-count { font-size: 12px; color: var(--ae-muted); margin: 4px 0 0; }
.ae-rsvp-status {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: var(--ae-radius);
	font-size: 14px;
	font-weight: 500;
}
.ae-rsvp-status--confirmed  { background: #f0fdf4; color: #166534; }
.ae-rsvp-status--waitlisted { background: #fffbeb; color: #92400e; }
.ae-rsvp-icon { font-style: normal; font-size: 16px; }
.ae-rsvp-cancel-btn {
	margin-left: auto;
	background: none;
	border: none;
	font-size: 12px;
	color: var(--ae-muted);
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
}
.ae-rsvp-cancel-btn:hover { color: var(--ae-text); }
.ae-rsvp-full {
	font-size: 14px;
	color: var(--ae-muted);
	padding: 12px 0;
}
.ae-rsvp-waitlist-notice {
	font-size: 13px;
	color: #92400e;
	background: #fffbeb;
	border-radius: var(--ae-radius);
	padding: 8px 12px;
	margin-bottom: 12px;
}
.ae-rsvp-form { display: flex; flex-direction: column; gap: 12px; }
.ae-rsvp-field { display: flex; flex-direction: column; gap: 4px; }
.ae-rsvp-field label { font-size: 13px; font-weight: 500; }
.ae-rsvp-field label span { color: var(--ae-muted); }
.ae-rsvp-field input {
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 8px 12px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	transition: border-color .15s;
}
.ae-rsvp-field input:focus {
	outline: none;
	border-color: var(--ae-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ae-primary) 15%, transparent);
}
.ae-rsvp-submit {
	align-self: flex-start;
	background: var(--ae-primary);
	color: #fff;
	border: none;
	border-radius: var(--ae-radius);
	padding: 9px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.ae-rsvp-submit:hover  { background: var(--ae-primary-dark); }
.ae-rsvp-submit:disabled { opacity: .6; cursor: not-allowed; }
.ae-rsvp-msg {
	font-size: 13px;
	color: #991b1b;
	min-height: 1em;
}

/* Month grid ------------------------------------------------------------- */
.ae-month-grid {
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	overflow: hidden;
	box-shadow: var(--ae-shadow);
}
.ae-month-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: var(--ae-primary);
	color: #fff;
}
.ae-month-header__day {
	padding: 8px 4px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.ae-month-body {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}
.ae-day-cell {
	border-right: 1px solid var(--ae-border);
	border-bottom: 1px solid var(--ae-border);
	min-height: 90px;
	padding: 4px;
	background: var(--ae-bg);
	transition: background .1s;
}
.ae-day-cell:nth-child(7n) { border-right: none; }
.ae-day-cell--other-month { background: #f9fafb; }
.ae-day-cell--today .ae-day-num {
	background: var(--ae-primary);
	color: #fff;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ae-day-num {
	font-size: 12px;
	font-weight: 600;
	color: var(--ae-muted);
	margin-bottom: 4px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Event dots in month grid */
.ae-event-dot {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 11px;
	padding: 1px 4px;
	border-radius: 3px;
	background: var(--ae-primary-light);
	color: var(--ae-primary-dark);
	margin-bottom: 2px;
	text-decoration: none;
	transition: background .1s;
}
.ae-event-dot:hover { background: var(--ae-primary); color: #fff; }
.ae-event-dot--more {
	color: var(--ae-muted);
	background: transparent;
	font-style: italic;
}

/* List view ------------------------------------------------------------- */
.ae-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.ae-list-date-header {
	padding: 10px 0 4px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--ae-muted);
	border-bottom: 2px solid var(--ae-border);
	margin-bottom: 8px;
	margin-top: 16px;
}
.ae-list-date-header:first-child { margin-top: 0; }

.ae-event-card {
	display: flex;
	flex-direction: column;
	padding: 16px;
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	background: var(--ae-bg);
	transition: box-shadow .15s, transform .15s;
	margin-bottom: 10px;
}
.ae-event-card__link {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	text-decoration: none;
	color: inherit;
}
.ae-event-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	transform: translateY(-1px);
}
.ae-event-card__thumb {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--ae-radius);
	flex-shrink: 0;
}
.ae-event-card__thumb-placeholder {
	width: 80px;
	height: 80px;
	border-radius: var(--ae-radius);
	background: var(--ae-primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 28px;
	color: var(--ae-primary);
}
.ae-event-card__body { flex: 1; min-width: 0; }
.ae-event-card__title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 4px;
	color: var(--ae-text);
}
.ae-event-card__date {
	font-size: 13px;
	color: var(--ae-primary);
	font-weight: 600;
	margin-bottom: 4px;
}
.ae-event-card__venue {
	font-size: 13px;
	color: var(--ae-muted);
}
.ae-event-card__cost {
	font-size: 13px;
	color: var(--ae-muted);
	margin-top: 4px;
}
.ae-event-card__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}
.ae-event-cat-badge {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 20px;
	background: var(--ae-primary-light);
	color: var(--ae-primary-dark);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-decoration: none;
}

/* Event card join button (listing) -------------------------------------- */
.ae-event-card__join {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--ae-border);
}
.ae-event-card__join .ae-single__join-btn {
	font-size: 13px;
	padding: 5px 14px;
}
.ae-event-card__join-btn--loading {
	display: inline-block;
	font-size: 13px;
	opacity: .6;
	color: var(--ae-muted);
}

/* Single event ---------------------------------------------------------- */
.ae-single {
	max-width: 780px;
}
.ae-single__header {
	margin-bottom: 24px;
}
.ae-single__thumb {
	width: 100%;
	max-height: 400px;
	object-fit: cover;
	border-radius: var(--ae-radius);
	margin-bottom: 20px;
}
.ae-single__meta-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	background: var(--ae-primary-light);
	border-left: 4px solid var(--ae-primary);
	padding: 16px;
	border-radius: 0 var(--ae-radius) var(--ae-radius) 0;
	margin-bottom: 24px;
}
.ae-single__meta-item { display: flex; flex-direction: column; gap: 2px; }
.ae-single__meta-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--ae-muted);
}
.ae-single__meta-value { font-size: 14px; font-weight: 600; color: var(--ae-text); }
.ae-single__meta-value a { color: var(--ae-primary); }

.ae-single__organizer,
.ae-single__location {
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 16px;
	margin-bottom: 16px;
}
.ae-single__organizer h3,
.ae-single__location h3 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--ae-muted);
}
.ae-single__ticket-btn {
	display: inline-block;
	background: var(--ae-primary);
	color: #fff;
	padding: 12px 28px;
	border-radius: var(--ae-radius);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	margin-top: 16px;
	transition: background .15s;
}
.ae-single__ticket-btn:hover { background: var(--ae-primary-dark); color: #fff; }

/* Upcoming widget -------------------------------------------------------- */
.ae-upcoming-list { list-style: none; margin: 0; padding: 0; }
.ae-upcoming-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px 0;
	border-bottom: 1px solid var(--ae-border);
}
.ae-upcoming-item:last-child { border-bottom: none; }
.ae-upcoming-date-block {
	min-width: 42px;
	text-align: center;
	background: var(--ae-primary);
	color: #fff;
	border-radius: var(--ae-radius);
	padding: 4px 6px;
	line-height: 1.1;
}
.ae-upcoming-date-block .ae-day  { font-size: 18px; font-weight: 800; }
.ae-upcoming-date-block .ae-mon  { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.ae-upcoming-info a { font-size: 14px; font-weight: 600; color: var(--ae-text); text-decoration: none; }
.ae-upcoming-info a:hover { color: var(--ae-primary); }
.ae-upcoming-info small { display: block; font-size: 12px; color: var(--ae-muted); margin-top: 2px; }

/* Loading state ---------------------------------------------------------- */
.ae-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	color: var(--ae-muted);
	font-size: 14px;
}
.ae-spinner {
	width: 24px; height: 24px;
	border: 3px solid var(--ae-border);
	border-top-color: var(--ae-primary);
	border-radius: 50%;
	animation: ae-spin .7s linear infinite;
	margin-right: 10px;
}
@keyframes ae-spin { to { transform: rotate(360deg); } }

/* Empty state ------------------------------------------------------------ */
.ae-empty {
	text-align: center;
	padding: 40px;
	color: var(--ae-muted);
	font-size: 15px;
}

/* Virtual event badge ---------------------------------------------------- */
.ae-virtual-badge {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 20px;
	vertical-align: middle;
	margin-left: 10px;
	line-height: 1.4;
}
.ae-virtual-badge--virtual {
	background: #dbeafe;
	color: #1d4ed8;
	border: 1px solid #93c5fd;
}
.ae-virtual-badge--hybrid {
	background: #ede9fe;
	color: #6d28d9;
	border: 1px solid #c4b5fd;
}
.ae-virtual-badge--sm {
	font-size: 10px;
	padding: 2px 8px;
	margin-left: 6px;
}

/* Virtual location line -------------------------------------------------- */
.ae-virtual-location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #1d4ed8;
}

/* Provider tag ----------------------------------------------------------- */
.ae-provider-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 2px 7px;
	border-radius: 4px;
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
}
.ae-provider-tag--zoom          { background: #e0f2fe; color: #0369a1; border-color: #7dd3fc; }
.ae-provider-tag--facebook-live { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.ae-provider-tag--youtube-live  { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.ae-provider-tag--google-meet   { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.ae-provider-tag--teams         { background: #f5f3ff; color: #6d28d9; border-color: #c4b5fd; }
.ae-provider-tag--skype         { background: #e0f2fe; color: #0284c7; border-color: #7dd3fc; }
.ae-provider-tag--webex         { background: #fdf4ff; color: #86198f; border-color: #e879f9; }

/* Join button ------------------------------------------------------------ */
.ae-join-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}
.ae-join-platform {
	font-size: 13px;
	color: var(--ae-muted);
}
.ae-single__join-btn {
	display: inline-block;
	background: #1d4ed8;
	color: #fff;
	padding: 12px 28px;
	border-radius: var(--ae-radius);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	transition: background .15s, opacity .15s;
}
.ae-single__join-btn:hover           { background: #1e40af; color: #fff; }
.ae-provider-btn--zoom               { background: #0e72ed; }
.ae-provider-btn--zoom:hover         { background: #0b5ecc; }
.ae-provider-btn--facebook-live      { background: #1877f2; }
.ae-provider-btn--facebook-live:hover{ background: #0d65da; }
.ae-provider-btn--youtube-live       { background: #ff0000; }
.ae-provider-btn--youtube-live:hover { background: #cc0000; }
.ae-provider-btn--google-meet        { background: #1a73e8; }
.ae-provider-btn--google-meet:hover  { background: #1558b0; }
.ae-provider-btn--teams              { background: #6264a7; }
.ae-provider-btn--teams:hover        { background: #4f5194; }
.ae-provider-btn--skype              { background: #00aff0; }
.ae-provider-btn--skype:hover        { background: #0095cc; }
.ae-provider-btn--webex              { background: #00b2a9; }
.ae-provider-btn--webex:hover        { background: #009990; }

.ae-single__join-btn--locked,
.ae-single__join-btn--pending {
	background: #f3f4f6;
	color: #6b7280;
	cursor: default;
	border: 1px solid #e5e7eb;
	padding: 10px 20px;
	font-size: 14px;
}
.ae-single__join-btn--locked:hover,
.ae-single__join-btn--pending:hover { background: #f3f4f6; color: #6b7280; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 600px) {
	.ae-month-body { grid-template-columns: repeat(7, 1fr); }
	.ae-day-cell { min-height: 52px; padding: 2px; }
	.ae-event-dot { display: none; }
	.ae-day-num { font-size: 11px; }
	.ae-event-card__link { flex-direction: column; }
	.ae-event-card__thumb,
	.ae-event-card__thumb-placeholder { width: 100%; height: 140px; }
}
