/* ============================================================
   Cornerstone Info Central
   All styles scoped under .cs-ic so nothing leaks into the theme.
   ============================================================ */

.cs-ic {
	/* Brand palette */
	--cs-navy: #15425c;
	--cs-blue: #2e6691;
	--cs-light: #82c3d8;
	--cs-light-bg: #eef7fb;
	--cs-light-bg2: #d6edf5;
	--cs-text: #1a1a1a;
	--cs-text-muted: #6b7280;
	--cs-border: rgba(0, 0, 0, 0.10);
	--cs-radius: 10px;
	--cs-radius-lg: 14px;
	--cs-success-bg: #d4edda;
	--cs-success-text: #155724;

	/* Sizing (overridden inline by shortcode attributes) */
	--cs-ic-frame-h: 80vh;
	--cs-ic-zoom: 0.62;
	--cs-ic-inv: 1.6129;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	color: var(--cs-text);
	background: #f0f4f7;
	border-radius: var(--cs-radius-lg);
	overflow: hidden;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

/* Neutralize common theme resets inside our widget */
.cs-ic *,
.cs-ic *::before,
.cs-ic *::after {
	box-sizing: border-box;
}

.cs-ic h2,
.cs-ic h3 {
	margin: 0;
	padding: 0;
	font-family: inherit;
}

.cs-ic button {
	font-family: inherit;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.cs-ic a {
	box-shadow: none;
}

/* ── HEADER ─────────────────────────────────────────────── */

.cs-ic-header {
	background: var(--cs-navy);
	color: #fff;
	padding: 20px 20px 0;
}

.cs-ic-header-top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.cs-ic-logo {
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cs-ic-logo i {
	color: #fff;
	font-size: 20px;
}

.cs-ic-wordmark {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.65;
	line-height: 1;
	margin-bottom: 3px;
	color: #fff;
}

.cs-ic .cs-ic-title {
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	line-height: 1.1;
}

.cs-ic-date {
	margin-left: auto;
	text-align: right;
	font-size: 12px;
	opacity: 0.7;
	line-height: 1.4;
	color: #fff;
	flex-shrink: 0;
}

/* ── PRIMARY NAV ────────────────────────────────────────── */

.cs-ic-nav {
	display: flex;
	gap: 2px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.cs-ic-nav::-webkit-scrollbar {
	display: none;
}

.cs-ic .cs-ic-ptab {
	flex-shrink: 0;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	line-height: 1.4;
}

.cs-ic .cs-ic-ptab:hover {
	color: rgba(255, 255, 255, 0.85);
	background: none;
}

.cs-ic .cs-ic-ptab.is-active {
	color: #fff;
	border-bottom-color: var(--cs-light);
	background: none;
}

.cs-ic .cs-ic-ptab i {
	font-size: 16px;
}

/* ── MAIN / VIEWS ───────────────────────────────────────── */

.cs-ic-main {
	padding: 20px 16px 24px;
	max-width: 820px;
	margin: 0 auto;
}

.cs-ic-view,
.cs-ic-subview {
	display: none;
}

.cs-ic-view.is-active,
.cs-ic-subview.is-active {
	display: block;
}

/* ── SUBTABS ────────────────────────────────────────────── */

.cs-ic-subtabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

.cs-ic .cs-ic-stab {
	flex: 1;
	padding: 9px 8px;
	border-radius: var(--cs-radius);
	border: 1.5px solid var(--cs-border);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
	background: #fff;
	color: var(--cs-text-muted);
	line-height: 1.4;
}

.cs-ic .cs-ic-stab.is-active {
	background: var(--cs-navy);
	color: #fff;
	border-color: var(--cs-navy);
}

.cs-ic .cs-ic-stab:not(.is-active):hover {
	border-color: var(--cs-blue);
	color: var(--cs-blue);
}

/* ── CALENDAR FRAME ─────────────────────────────────────── */

.cs-ic-frame-wrap {
	background: #fff;
	border-radius: var(--cs-radius-lg);
	border: 0.5px solid var(--cs-border);
	overflow: hidden;
	position: relative;
	height: var(--cs-ic-frame-h);
	min-height: 500px;
}

.cs-ic-frame-wrap iframe {
	display: block;
	border: none;
	width: calc(100% * var(--cs-ic-inv));
	height: calc(var(--cs-ic-frame-h) * var(--cs-ic-inv));
	min-height: calc(500px * var(--cs-ic-inv));
	transform: scale(var(--cs-ic-zoom));
	transform-origin: top left;
}

.cs-ic-frame-foot {
	margin-top: 10px;
	text-align: right;
}

.cs-ic .cs-ic-frame-foot a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 500;
	color: var(--cs-blue);
	text-decoration: none;
}

.cs-ic .cs-ic-frame-foot a:hover {
	color: var(--cs-navy);
	text-decoration: underline;
}

/* ── PROGRESS ───────────────────────────────────────────── */

.cs-ic-progress {
	margin-bottom: 18px;
}

.cs-ic-progress-label {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--cs-text-muted);
	margin-bottom: 6px;
}

.cs-ic-progress-track {
	height: 5px;
	border-radius: 3px;
	background: var(--cs-light-bg2);
	overflow: hidden;
}

.cs-ic-progress-fill {
	height: 100%;
	width: 0;
	background: var(--cs-blue);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.cs-ic-banner {
	background: var(--cs-success-bg);
	border-radius: var(--cs-radius);
	padding: 12px 16px;
	display: none;
	align-items: center;
	gap: 10px;
	color: var(--cs-success-text);
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 18px;
}

.cs-ic-banner.is-visible {
	display: flex;
}

.cs-ic-banner i {
	font-size: 20px;
}

/* ── CHECKLIST SECTIONS ─────────────────────────────────── */

.cs-ic-section {
	margin-bottom: 20px;
}

.cs-ic-section-label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 7px;
	border-bottom: 1.5px solid var(--cs-light-bg2);
}

.cs-ic-section-icon {
	width: 28px;
	height: 28px;
	background: var(--cs-light-bg2);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cs-navy);
	font-size: 15px;
	flex-shrink: 0;
}

.cs-ic .cs-ic-section-label h3 {
	font-size: 12px;
	font-weight: 600;
	color: var(--cs-navy);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	line-height: 1.3;
}

.cs-ic-section-pill {
	margin-left: auto;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 9px;
	border-radius: 20px;
	background: var(--cs-light-bg2);
	color: var(--cs-navy);
	flex-shrink: 0;
}

.cs-ic-section-pill.is-done {
	background: var(--cs-success-bg);
	color: var(--cs-success-text);
}

/* ── CHECKLIST ITEMS ────────────────────────────────────── */

.cs-ic-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--cs-radius);
	background: #fff;
	border: 0.5px solid var(--cs-border);
	margin-bottom: 7px;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
	-webkit-user-select: none;
	user-select: none;
}

.cs-ic-item:active {
	background: var(--cs-light-bg);
}

.cs-ic-item.is-checked {
	background: var(--cs-light-bg);
	border-color: var(--cs-light);
}

.cs-ic-circle {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--cs-light);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	margin-top: 1px;
}

.cs-ic-item.is-checked .cs-ic-circle {
	background: var(--cs-blue);
	border-color: var(--cs-blue);
}

.cs-ic-circle i {
	display: none;
	color: #fff;
	font-size: 13px;
}

.cs-ic-item.is-checked .cs-ic-circle i {
	display: block;
}

.cs-ic-item-text {
	font-size: 15px;
	color: var(--cs-text);
	line-height: 1.45;
	flex: 1;
	transition: color 0.12s;
}

.cs-ic-item.is-checked .cs-ic-item-text {
	color: var(--cs-text-muted);
	text-decoration: line-through;
	text-decoration-color: var(--cs-light);
}

.cs-ic .cs-ic-item-link {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
	color: var(--cs-blue);
	background: var(--cs-light-bg2);
	border: 0.5px solid var(--cs-light);
	border-radius: 6px;
	padding: 4px 9px;
	text-decoration: none;
	white-space: nowrap;
	line-height: 1.4;
}

.cs-ic .cs-ic-item-link:hover {
	background: var(--cs-light);
	color: var(--cs-navy);
}

.cs-ic .cs-ic-item-link i {
	font-size: 13px;
}

/* ── RESET ──────────────────────────────────────────────── */

.cs-ic-reset-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 4px;
}

.cs-ic .cs-ic-reset {
	font-size: 13px;
	color: var(--cs-text-muted);
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 6px 4px;
	line-height: 1.4;
}

.cs-ic .cs-ic-reset:hover {
	color: var(--cs-navy);
	background: none;
}

/* ── CONTACTS ───────────────────────────────────────────── */

.cs-ic-contacts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 620px) {
	.cs-ic-contacts {
		grid-template-columns: 1fr 1fr;
	}
}

.cs-ic-contact {
	background: #fff;
	border-radius: var(--cs-radius-lg);
	border: 0.5px solid var(--cs-border);
	padding: 16px 18px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.cs-ic-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--cs-light-bg2);
	color: var(--cs-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	flex-shrink: 0;
	letter-spacing: 0.02em;
}

.cs-ic-contact-info {
	flex: 1;
	min-width: 0;
}

.cs-ic-contact-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--cs-text);
	margin-bottom: 2px;
}

.cs-ic-contact-role {
	font-size: 13px;
	color: var(--cs-text-muted);
	margin-bottom: 6px;
}

.cs-ic .cs-ic-contact-phone {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	font-weight: 500;
	color: var(--cs-blue);
	text-decoration: none;
}

.cs-ic .cs-ic-contact-phone:hover {
	color: var(--cs-navy);
	text-decoration: underline;
}

.cs-ic .cs-ic-contact-phone i {
	font-size: 15px;
}

.cs-ic-contact-pending {
	font-size: 13px;
	color: var(--cs-text-muted);
	font-style: italic;
}

.cs-ic-note {
	margin-top: 24px;
	padding: 14px 16px;
	background: var(--cs-light-bg);
	border-radius: var(--cs-radius);
	border-left: 3px solid var(--cs-light);
	font-size: 13px;
	color: var(--cs-text-muted);
	line-height: 1.5;
}

.cs-ic-note strong {
	color: var(--cs-navy);
	font-weight: 600;
}

/* ── SMALL SCREENS ──────────────────────────────────────── */

@media (max-width: 520px) {
	.cs-ic-header {
		padding: 16px 14px 0;
	}

	.cs-ic-main {
		padding: 16px 12px 20px;
	}

	.cs-ic-date {
		display: none;
	}
}

/* ── VERSION STAMP ──────────────────────────────────────── */

.cs-ic-version {
	padding: 0 16px 12px;
	text-align: right;
	font-size: 10px;
	letter-spacing: 0.06em;
	color: var(--cs-text-muted);
	opacity: 0.45;
	font-variant-numeric: tabular-nums;
	-webkit-user-select: all;
	user-select: all;
}
