/*
 * Palette and card pattern lifted from careerhike.in's own "100+ Online
 * Universities" widget (--ch-* custom properties and .ch-card in the site's
 * homepage source) so the plugin reads as part of that site, not a bolt-on.
 */
:root {
	--cc-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--cc-orange: #f35000;
	--cc-orange-hover: #e8600a;
	--cc-orange-light: #fff4ef;
	--cc-navy: #0f1f45;
	--cc-ink: #1a1a2e;
	--cc-muted: #6b7080;
	--cc-line: #e8e8f0;
	--cc-bg-raised: #ffffff;
	--cc-accent: var(--cc-orange);
	--cc-accent-soft: var(--cc-orange-light);
}

.cc-wizard,
.cc-listing,
.cc-course-list,
.cc-compare-wrap {
	font-family: var(--cc-font);
	color: var(--cc-ink);
	max-width: 720px;
}

.cc-compare-wrap {
	max-width: 100%;
}

/* Wizard */
.cc-wizard__progress {
	display: flex;
	gap: 8px;
	margin-bottom: 28px;
}

.cc-wizard__dot {
	width: 28px;
	height: 4px;
	border-radius: 2px;
	background: var(--cc-line);
}

.cc-wizard__dot.is-active {
	background: var(--cc-orange);
}

.cc-wizard__step h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--cc-navy);
	margin: 0 0 20px;
}

.cc-wizard__cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}

.cc-wizard__card {
	padding: 14px 16px;
	border: 1.5px solid var(--cc-line);
	border-radius: 10px;
	background: #fff;
	color: var(--cc-ink);
	cursor: pointer;
	font-family: var(--cc-font);
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cc-wizard__card:hover {
	border-color: var(--cc-orange);
	background: var(--cc-orange-light);
	color: var(--cc-orange);
}

.cc-wizard__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 420px;
	margin-bottom: 16px;
}

.cc-wizard__form input {
	padding: 10px 12px;
	border: 1.5px solid var(--cc-line);
	border-radius: 8px;
	font-family: var(--cc-font);
	font-size: 15px;
}

.cc-wizard__form input:focus {
	outline: none;
	border-color: var(--cc-orange);
}

.cc-wizard__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.cc-wizard__error {
	color: #c53d1f;
	font-size: 14px;
}

.cc-wizard__submit,
.cc-btn {
	display: inline-block;
	padding: 11px 24px;
	background: var(--cc-orange);
	color: #fff;
	border: none;
	border-radius: 24px;
	font-family: var(--cc-font);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, box-shadow 0.15s;
}

.cc-wizard__submit:hover,
.cc-btn:hover {
	background: var(--cc-orange-hover);
	box-shadow: 0 4px 14px rgba(232, 96, 10, 0.3);
}

.cc-wizard__back {
	display: block;
	margin-top: 14px;
	background: none;
	border: none;
	color: var(--cc-muted);
	cursor: pointer;
	font-family: var(--cc-font);
	font-size: 14px;
	padding: 0;
}

.cc-wizard__college-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}

/* Same visual pattern as careerhike.in's own university cards: white card,
 * light border, centered logo, bold name, pill-style explore affordance. The
 * whole card still toggles the checkbox; a separate "View details" link
 * (stopping propagation) reaches the manual link without selecting/deselecting. */
.cc-wizard__college-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: 12px 10px 10px;
	border: 1.5px solid var(--cc-line);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
}

.cc-wizard__college-card:hover {
	border-color: var(--cc-orange-hover);
	box-shadow: 0 4px 16px rgba(232, 96, 10, 0.12);
	transform: translateY(-2px);
}

.cc-wizard__college-card.is-selected {
	border-color: var(--cc-orange);
	background: var(--cc-orange-light);
}

.cc-wizard__college-card input[type="checkbox"] {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 16px;
	height: 16px;
	accent-color: var(--cc-orange);
}

.cc-wizard__college-logo-wrap {
	width: 100%;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 2px;
}

.cc-wizard__college-logo-wrap img {
	max-height: 40px;
	max-width: 90%;
	object-fit: contain;
	display: block;
}

.cc-wizard__college-title {
	font-weight: 700;
	font-size: 13px;
	color: var(--cc-ink);
	line-height: 1.3;
}

.cc-wizard__college-meta {
	font-size: 12px;
	color: var(--cc-muted);
}

.cc-wizard__college-explore {
	display: inline-block;
	margin-top: 4px;
	padding: 3px 11px;
	background: var(--cc-orange-light);
	color: var(--cc-orange);
	border: 1.5px solid var(--cc-orange);
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.cc-wizard__college-card:hover .cc-wizard__college-explore {
	background: var(--cc-orange);
	color: #fff;
}

/* Listing */
.cc-listing__filters {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.cc-listing__filters select {
	padding: 8px 10px;
	border: 1.5px solid var(--cc-line);
	border-radius: 8px;
	font-family: var(--cc-font);
}

.cc-college-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

/* Mirrors careerhike.in's .ch-uni-widget .ch-card exactly: white card, thin
 * border, centered logo, bold name, pill "Explore" link. The card's own link
 * goes to the manual/external college URL (falling back to the internal
 * single-college page); "Add to compare" is a separate control beneath it. */
.cc-college-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	border: 1.5px solid var(--cc-line);
	border-radius: 8px;
	padding: 14px 12px 12px;
	background: #fff;
	transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
}

.cc-college-card:hover {
	border-color: var(--cc-orange-hover);
	box-shadow: 0 4px 16px rgba(232, 96, 10, 0.12);
	transform: translateY(-2px);
}

.cc-college-card__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.cc-college-card__logo-wrap {
	width: 100%;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 6px;
}

.cc-college-card__logo-wrap img {
	max-height: 44px;
	max-width: 90%;
	object-fit: contain;
	display: block;
}

.cc-college-card__title {
	font-weight: 700;
	font-size: 14px;
	color: var(--cc-ink);
	line-height: 1.3;
	margin: 0 0 4px;
}

.cc-college-card__meta {
	font-size: 12px;
	color: var(--cc-muted);
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.cc-college-card__desc {
	font-size: 12.5px;
	color: var(--cc-muted);
	line-height: 1.4;
	margin: 0 0 8px;
}

.cc-college-card__explore {
	display: inline-block;
	padding: 4px 12px;
	background: var(--cc-orange-light);
	color: var(--cc-orange);
	border: 1.5px solid var(--cc-orange);
	border-radius: 20px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}

.cc-college-card:hover .cc-college-card__explore {
	background: var(--cc-orange);
	color: #fff;
}

.cc-compare-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--cc-muted);
	margin-top: 10px;
}

.cc-compare-checkbox input {
	accent-color: var(--cc-orange);
}

.cc-compare-bar {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--cc-navy);
	color: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	margin-top: 20px;
}

/* The [hidden] attribute selector and the class selector above are equal
 * specificity, so without this the bar's own "display: flex" wins by source
 * order and the bar stays visible even while hidden is set. */
.cc-compare-bar[hidden] {
	display: none;
}

.cc-compare-bar__go {
	background: var(--cc-orange);
	color: #fff;
	padding: 8px 18px;
	border-radius: 20px;
	font-weight: 700;
	text-decoration: none;
}

.cc-pagination {
	margin-top: 20px;
}

/* Course list */
.cc-course-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cc-course-list__item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--cc-line);
}

.cc-course-list__item a {
	color: var(--cc-ink);
	font-weight: 600;
	text-decoration: none;
}

.cc-course-list__item a:hover {
	color: var(--cc-orange);
}

.cc-course-list__item.cc-depth-1 {
	padding-left: 20px;
}

.cc-course-list__item.cc-depth-2 {
	padding-left: 40px;
	color: var(--cc-muted);
}

.cc-course-list__count {
	color: var(--cc-muted);
	font-size: 13px;
}

/* Comparison table
 * The wrap is the scroll container for both axes (not just overflow-x): a
 * sticky header needs a real scrolling ancestor to stick within, and setting
 * only overflow-x forces overflow-y to compute as auto anyway per the CSS
 * overflow spec — the wrap would still become that ancestor, just without a
 * bounded height, so the header would never actually appear to stick.
 */
.cc-compare-wrap {
	overflow: auto;
	max-height: 75vh;
	border: 1.5px solid var(--cc-line);
	border-radius: 10px;
}

.cc-compare-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 560px;
	font-size: 14px;
}

.cc-compare-table th,
.cc-compare-table td {
	box-shadow: inset 0 -1px 0 var(--cc-line);
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}

/* First (label) column stays put while the table scrolls horizontally —
 * the row-label equivalent of collegevidya.com's fixed left rail. */
.cc-compare-table th:first-child,
.cc-compare-table td:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--cc-orange-light);
	min-width: 150px;
}

.cc-compare-table thead th {
	background: var(--cc-orange-light);
	color: var(--cc-navy);
	position: sticky;
	top: 0;
	z-index: 2;
	text-align: center;
	box-shadow: inset 0 -1px 0 var(--cc-line), 0 2px 4px rgba(15, 31, 69, 0.08);
}

/* The corner cell is sticky on both axes at once, so it needs to sit above
 * every other sticky cell scrolling underneath it. */
.cc-compare-table thead th:first-child {
	z-index: 3;
	text-align: left;
}

/* Note: no "position: relative" here — sticky already establishes a
 * positioning context for the absolutely-positioned remove button below,
 * and setting relative here would silently override the sticky rule above
 * (equal-or-higher specificity + later in the cascade), unsticking every
 * university header except the untouched corner label cell. */
.cc-compare-table thead th:not(:first-child) {
	padding-top: 28px;
}

.cc-compare-table__remove {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 20px;
	height: 20px;
	line-height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--cc-line);
	color: var(--cc-muted);
	text-decoration: none;
	font-size: 14px;
	text-align: center;
}

.cc-compare-table__remove:hover {
	border-color: var(--cc-orange);
	color: var(--cc-orange);
}

.cc-compare-table thead a {
	color: var(--cc-navy);
	text-decoration: none;
	font-weight: 700;
}

.cc-compare-table thead a:hover {
	color: var(--cc-orange);
}

.cc-compare-table__logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	margin: 0 auto 8px;
}

.cc-compare-table__logo-wrap img {
	max-width: 90%;
	max-height: 48px;
	object-fit: contain;
	display: block;
}

.cc-compare-table__title {
	font-size: 14.5px;
	line-height: 1.35;
	padding: 0 4px;
}

.cc-compare-table__title a {
	display: block;
}

.cc-compare-table__fee-badge {
	display: inline-block;
	margin-top: 6px;
	padding: 3px 12px;
	background: var(--cc-navy);
	color: #fff;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}

.cc-compare-table__group td {
	background: #faf9fc;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--cc-orange);
}

.cc-compare-table__group td:first-child {
	background: #faf9fc;
}

/* Sample certificate preview */
.cc-cert-thumb {
	display: block;
	padding: 0;
	border: 1.5px solid var(--cc-line);
	border-radius: 6px;
	background: #fff;
	cursor: zoom-in;
	overflow: hidden;
}

.cc-cert-thumb img {
	display: block;
	width: 100px;
	height: 130px;
	object-fit: cover;
}

.cc-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 31, 69, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 40px;
}

.cc-lightbox[hidden] {
	display: none;
}

.cc-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.cc-lightbox__close {
	position: absolute;
	top: 20px;
	right: 24px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: var(--cc-navy);
}

.cc-compare-empty {
	padding: 20px;
	border: 1.5px dashed var(--cc-line);
	border-radius: 8px;
	color: var(--cc-muted);
}

/* "Add University" placeholder header cell + trailing spacer column beneath it */
.cc-compare-table__add-cell {
	background: #fff;
	min-width: 160px;
}

.cc-compare-table__add-spacer {
	background: #fff;
}

.cc-compare-table__add-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 96px;
	padding: 14px;
	background: #fff;
	border: 1.5px dashed var(--cc-line);
	border-radius: 8px;
	color: var(--cc-muted);
	font-family: var(--cc-font);
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cc-compare-table__add-card:hover {
	border-color: var(--cc-orange);
	color: var(--cc-orange);
	background: var(--cc-orange-light);
}

.cc-compare-table__add-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--cc-orange-light);
	color: var(--cc-orange);
	font-size: 18px;
	line-height: 1;
}

.cc-compare-table__add-card:hover .cc-compare-table__add-icon {
	background: var(--cc-orange);
	color: #fff;
}

/* Add-university modal */
.cc-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 31, 69, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}

.cc-modal[hidden] {
	display: none;
}

.cc-modal__panel {
	background: #fff;
	border-radius: 10px;
	width: 100%;
	max-width: 480px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--cc-line);
}

.cc-modal__header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--cc-navy);
}

.cc-modal__close {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--cc-muted);
}

.cc-modal__body {
	overflow-y: auto;
	padding: 8px 12px;
}

.cc-modal__empty {
	padding: 20px;
	color: var(--cc-muted);
	text-align: center;
}

.cc-modal__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cc-modal__item a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-radius: 6px;
	color: var(--cc-ink);
	text-decoration: none;
}

.cc-modal__item a:hover {
	background: var(--cc-orange-light);
}

.cc-modal__item-logo {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--cc-line);
	border-radius: 6px;
	background: #fff;
}

.cc-modal__item-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.cc-modal__item-name {
	font-weight: 600;
	font-size: 14px;
}
