/* Frontend Styles for Tutor Groups & Cohorts */

.tgc-frontend-wrap {
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tgc-my-cohorts-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	border-radius: 8px;
	overflow: hidden;
}

.tgc-my-cohorts-table th,
.tgc-my-cohorts-table td {
	padding: 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.tgc-my-cohorts-table th {
	background: #f8f9fa;
	font-weight: 600;
	color: #333;
}

.tgc-my-cohorts-table tbody tr:hover {
	background: #fafafa;
}

.tgc-meta {
	font-size: 0.85em;
	color: #666;
	margin-top: 5px;
}

/* Status Badges */
.tgc-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}
.tgc-status--active { background: #edfaef; color: #007017; }
.tgc-status--upcoming { background: #f0f6fc; color: #0969da; }
.tgc-status--ended, .tgc-status--completed { background: #f6f8fa; color: #57606a; }
.tgc-status--draft, .tgc-status--pending { background: #fff8c5; color: #9a6700; }

/* Buttons */
.tgc-btn {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	padding: 8px 16px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
	border: none;
	cursor: pointer;
	transition: background 0.2s;
}

.tgc-btn:hover {
	background: #135e96;
	color: #fff;
}

/* Cohort List */
.tgc-cohort-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.tgc-cohort-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tgc-cohort-card h3 {
	margin: 0 0 10px 0;
	font-size: 1.2em;
}

.tgc-cohort-card .tgc-meta {
	margin-bottom: 15px;
}

/* Notices */
.tgc-notice {
	padding: 12px 15px;
	border-radius: 4px;
	margin-bottom: 15px;
	font-weight: 500;
}
.tgc-notice-info { background: #e0f0fa; color: #0a4b78; }
.tgc-notice-warning { background: #fff8c5; color: #9a6700; border-left: 4px solid #d4a72c; }

/* ── Group Buy Premium UI ────────────────────────────────────────────────── */

.tgc-gb-widget-wrap {
	margin: 25px 0;
	font-family: var(--tgc-gb-font-family, -apple-system, BlinkMacSystemFont, "Outfit", "Inter", Roboto, sans-serif);
}

.tgc-gb-card {
	background: var(--tgc-gb-bg, rgba(255, 255, 255, 0.95));
	backdrop-filter: blur(10px);
	border: 1px solid var(--tgc-gb-border, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 15%, transparent));
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 10px 25px -5px var(--tgc-gb-shadow, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 8%, transparent)), 0 8px 10px -6px var(--tgc-gb-shadow-sec, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 5%, transparent));
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.tgc-gb-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 30px -10px var(--tgc-gb-shadow-hover, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 15%, transparent)), 0 10px 15px -5px var(--tgc-gb-shadow-hover-sec, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 10%, transparent));
}

.tgc-gb-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

/* Pulsing Live Badge */
.tgc-gb-badge-pulse {
	display: inline-flex;
	align-items: center;
	background: #fee4e2;
	color: #d92d20;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tgc-gb-badge-pulse::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #d92d20;
	border-radius: 50%;
	margin-right: 6px;
	animation: tgc-pulse-anim 1.5s infinite;
}

@keyframes tgc-pulse-anim {
	0% { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.7); }
	70% { transform: scale(1.1); opacity: 0.9; box-shadow: 0 0 0 6px rgba(217, 45, 32, 0); }
	100% { transform: scale(0.9); opacity: 0; box-shadow: 0 0 0 0 rgba(217, 45, 32, 0); }
}

.tgc-gb-discount-tag {
	background: var(--tgc-gb-discount-bg, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 5%, #fff));
	color: var(--tgc-gb-primary, #6941c6);
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
}

.tgc-gb-title {
	font-size: 1.35em;
	font-weight: 700;
	color: var(--tgc-gb-text, #1d182e);
	margin: 0 0 12px 0;
	line-height: 1.3;
}

.tgc-gb-pricing-box {
	background: var(--tgc-gb-pricing-bg, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 3%, #fff));
	border: 1px dashed var(--tgc-gb-pricing-border, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 20%, transparent));
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 20px;
}

.tgc-gb-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.tgc-gb-price-label {
	font-weight: 500;
	color: var(--tgc-gb-text-secondary, #4a4557);
	font-size: 14px;
}

.tgc-gb-price-value {
	font-size: 26px;
	font-weight: 800;
	color: var(--tgc-gb-primary, #6941c6);
	letter-spacing: -0.5px;
}

.tgc-gb-price-row-compare {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: var(--tgc-gb-text-muted, #7a7686);
}

.tgc-gb-price-old {
	text-decoration: line-through;
	font-weight: 500;
}

/* Progress bar section */
.tgc-gb-progress-section {
	margin-bottom: 20px;
}

.tgc-gb-progress-labels {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: var(--tgc-gb-text-secondary, #4a4557);
	margin-bottom: 8px;
}

.tgc-gb-seats-left {
	color: #b93815;
	font-weight: 600;
}

.tgc-gb-progress-bar-bg {
	background: var(--tgc-gb-progress-bg, #f2f4f7);
	height: 10px;
	border-radius: 10px;
	overflow: hidden;
}

.tgc-gb-progress-bar-fill {
	background: linear-gradient(90deg, var(--tgc-gb-accent, #7f56d9) 0%, var(--tgc-gb-primary, #6941c6) 100%);
	height: 100%;
	border-radius: 10px;
	transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Action buttons */
.tgc-gb-action-box {
	margin-bottom: 12px;
}

.tgc-gb-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.tgc-gb-btn--login {
	background: var(--tgc-gb-login-bg, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 5%, #fff));
	color: var(--tgc-gb-login-text, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 80%, #000));
	border: 1px solid var(--tgc-gb-login-border, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 30%, transparent));
}

.tgc-gb-btn--login:hover {
	background: var(--tgc-gb-login-hover-bg, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 10%, #fff));
	color: var(--tgc-gb-login-hover-text, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 90%, #000));
}

.tgc-gb-btn--join {
	background: linear-gradient(180deg, var(--tgc-gb-accent, #7f56d9) 0%, var(--tgc-gb-primary, #6941c6) 100%);
	color: #ffffff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 0 0 1px var(--tgc-gb-primary, #6941c6);
}

.tgc-gb-btn--join:hover {
	background: linear-gradient(180deg, var(--tgc-gb-primary, #6941c6) 0%, var(--tgc-gb-primary-hover, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 80%, #000)) 100%);
	transform: scale(1.01);
	box-shadow: 0 4px 12px var(--tgc-gb-btn-shadow-hover, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 20%, transparent)), 0 0 0 1px var(--tgc-gb-primary-hover, color-mix(in srgb, var(--tgc-gb-primary, #6941c6) 80%, #000));
}

.tgc-gb-btn--disabled {
	background: #f2f4f7;
	color: #98a2b3;
	cursor: not-allowed;
}

.tgc-gb-joined-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ecfdf3;
	color: #027a48;
	padding: 10px 16px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	border: 1px solid #abefc6;
}

.tgc-gb-joined-badge span {
	font-size: 18px;
	margin-right: 6px;
}

.tgc-gb-footer-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #667085;
	gap: 4px;
}

.tgc-gb-footer-meta span {
	font-size: 16px;
	color: #98a2b3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Student Dashboard — Groups & Cohorts
   ══════════════════════════════════════════════════════════════════════════ */

.tgc-student-dashboard {
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.tgc-dashboard-section {
	margin-bottom: 36px;
}

.tgc-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.1em;
	font-weight: 700;
	color: #1d182e;
	margin: 0 0 16px 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #f0ecff;
}

.tgc-section-icon {
	font-size: 1.2em;
	line-height: 1;
}

.tgc-section-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f0ecff;
	color: #6941c6;
	font-size: 0.7em;
	font-weight: 700;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 20px;
	margin-left: auto;
}

/* ── Group Cards ─────────────────────────────────────────────────────────── */
.tgc-group-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.tgc-group-card {
	background: #fff;
	border: 1px solid #ede9fe;
	border-radius: 12px;
	padding: 18px 20px;
	box-shadow: 0 2px 8px rgba(105, 65, 198, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tgc-group-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(105, 65, 198, 0.12);
}

.tgc-group-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.tgc-group-avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, #7f56d9 0%, #6941c6 100%);
	color: #fff;
	font-size: 0.9em;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 0.5px;
}

.tgc-group-card__title-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tgc-group-card__name {
	margin: 0;
	font-size: 1em;
	font-weight: 700;
	color: #1d182e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tgc-role-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
}

.tgc-role-badge--manager {
	background: #fef9c3;
	color: #854d0e;
}

.tgc-role-badge--member {
	background: #f0ecff;
	color: #53389e;
}

.tgc-group-card__desc {
	font-size: 0.85em;
	color: #57606a;
	margin: 0 0 10px 0;
	line-height: 1.5;
}

.tgc-group-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 0.8em;
	color: #6a737d;
	border-top: 1px solid #f0ecff;
	padding-top: 10px;
	margin-top: 10px;
}

/* ── Cohort Enrollment Cards ─────────────────────────────────────────────── */
.tgc-cohort-enroll-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 16px;
}

.tgc-cohort-enroll-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 18px 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tgc-cohort-enroll-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

/* Active card: subtle purple left accent */
.tgc-cohort-enroll-card--active {
	border-left: 4px solid #6941c6;
}

/* Read-only: muted blue accent */
.tgc-cohort-enroll-card--read_only {
	border-left: 4px solid #0969da;
}

/* Pending: amber accent */
.tgc-cohort-enroll-card--pending {
	border-left: 4px solid #d4a72c;
}

/* Top row: cohort name + status badge */
.tgc-cohort-enroll-card__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.tgc-cohort-enroll-card__group {
	font-size: 0.78em;
	color: #6941c6;
	font-weight: 600;
	margin: 0 0 2px 0;
	letter-spacing: 0.2px;
}

.tgc-cohort-enroll-card__name {
	margin: 0;
	font-size: 1.05em;
	font-weight: 700;
	color: #1d182e;
	line-height: 1.3;
}

/* Course link */
.tgc-cohort-enroll-card__course {
	display: block;
	font-size: 0.88em;
	color: #2271b1;
	text-decoration: none;
	font-weight: 500;
	padding: 6px 10px;
	background: #f0f6fc;
	border-radius: 6px;
	transition: background 0.15s ease;
}

.tgc-cohort-enroll-card__course:hover {
	background: #dbeafe;
	color: #135e96;
}

/* Date range */
.tgc-cohort-enroll-card__dates {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f8f9fa;
	border-radius: 8px;
	padding: 10px 14px;
}

.tgc-date-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.tgc-date-item--end {
	text-align: right;
}

.tgc-date-label {
	font-size: 0.7em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #8b949e;
}

.tgc-date-value {
	font-size: 0.88em;
	font-weight: 600;
	color: #1d182e;
}

.tgc-date-sep {
	color: #c0c6ce;
	font-size: 1em;
	flex-shrink: 0;
}

/* Footer: reg number + CTA */
.tgc-cohort-enroll-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border-top: 1px solid #f0f0f0;
	padding-top: 10px;
	margin-top: 0;
}

.tgc-reg-number {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.78em;
	background: #f6f8fa;
	color: #57606a;
	padding: 3px 8px;
	border-radius: 4px;
	border: 1px solid #e5e7eb;
	white-space: nowrap;
}

/* ── Button size / variant extensions ───────────────────────────────────── */
.tgc-btn--sm {
	padding: 6px 12px;
	font-size: 0.82em;
	border-radius: 6px;
	white-space: nowrap;
}

.tgc-btn--ghost {
	background: transparent;
	color: #2271b1;
	border: 1px solid #2271b1;
}

.tgc-btn--ghost:hover {
	background: #f0f6fc;
	color: #135e96;
}

.tgc-btn--pending {
	background: #fff8c5;
	color: #9a6700;
	border: 1px solid #d4a72c;
	cursor: default;
}

.tgc-btn--disabled {
	background: #f0f0f0;
	color: #8b949e;
	cursor: not-allowed;
	border: 1px solid #e5e7eb;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.tgc-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #57606a;
}

.tgc-empty-state__icon {
	display: block;
	font-size: 2.5em;
	margin-bottom: 12px;
}

.tgc-empty-state p {
	margin: 0;
	font-size: 1em;
}

