/**
 * IndiaLinks24x7 Planner — front end.
 *
 * The signature device is the spine: a vertical rule running down the left of
 * the checklist that each checkbox sits on, so the list reads as one run of
 * work rather than a pile of separate boxes. It fills in behind completed
 * items, which is where the sense of progress comes from.
 */

.il24x7 {
	--il-ink: #16283f;
	--il-ink-soft: #5b6b7f;
	--il-paper: #ffffff;
	--il-wash: #f4f6f8;
	--il-line: #dde3ea;
	--il-done: #1a7f45;
	--il-done-wash: #eaf5ee;
	--il-todo: #b23c2e;
	--il-opt: #8a6d1f;
	--il-radius: 6px;

	box-sizing: border-box;
	color: var(--il-ink);
	font-size: 16px;
	line-height: 1.55;
	max-width: 780px;
}

.il24x7 *,
.il24x7 *::before,
.il24x7 *::after {
	box-sizing: inherit;
}

/* ---------- Header and score ---------- */

.il24x7-head {
	border-bottom: 1px solid var(--il-line);
	margin-bottom: 28px;
	padding-bottom: 20px;
}

.il24x7-head__title {
	font-size: 1.5rem;
	line-height: 1.25;
	margin: 0 0 8px;
}

.il24x7-head__intro {
	color: var(--il-ink-soft);
	margin: 0 0 18px;
}

.il24x7-score__bar {
	background: var(--il-wash);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.il24x7-score__bar > span {
	background: var(--il-done);
	border-radius: 999px;
	display: block;
	height: 100%;
	transition: width 240ms ease;
	width: 0;
}

.il24x7-score__bar--sm {
	height: 6px;
}

.il24x7-score__text {
	align-items: baseline;
	display: flex;
	gap: 6px;
	margin: 10px 0 2px;
}

.il24x7-score__text strong {
	font-size: 1.15rem;
}

.il24x7-score__pct {
	color: var(--il-ink-soft);
	font-variant-numeric: tabular-nums;
	margin-left: auto;
}

.il24x7-score__sub {
	color: var(--il-ink-soft);
	font-size: 0.875rem;
	margin: 0;
}

.il24x7-score__opt {
	color: var(--il-opt);
}

/* ---------- The list and its spine ---------- */

.il24x7-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 34px;
	position: relative;
}

.il24x7-list::before {
	background: var(--il-line);
	bottom: 14px;
	content: "";
	left: 11px;
	position: absolute;
	top: 14px;
	width: 2px;
}

.il24x7-group {
	margin: 26px 0 12px;
	position: relative;
}

.il24x7-group:first-child {
	margin-top: 0;
}

.il24x7-group h3 {
	color: var(--il-ink-soft);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	margin: 0;
	text-transform: uppercase;
}

/* The group heading interrupts the spine so sections read as separate runs. */
.il24x7-group::before {
	background: var(--il-paper);
	content: "";
	height: 100%;
	left: -23px;
	position: absolute;
	top: 0;
	width: 4px;
}

.il24x7-item {
	border-bottom: 1px solid var(--il-line);
	display: flex;
	gap: 12px;
	padding: 14px 0;
	position: relative;
}

.il24x7-item:last-child {
	border-bottom: 0;
}

.il24x7-item__check {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	flex: 1 1 auto;
	gap: 12px;
}

.il24x7-item.is-locked .il24x7-item__check {
	cursor: not-allowed;
	opacity: 0.55;
}

.il24x7-item__input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

/* The node that sits on the spine. */
.il24x7-box {
	align-items: center;
	background: var(--il-paper);
	border: 2px solid var(--il-todo);
	border-radius: 50%;
	color: var(--il-todo);
	display: flex;
	flex: 0 0 auto;
	height: 24px;
	justify-content: center;
	margin-left: -34px;
	margin-top: 1px;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
	width: 24px;
}

.il24x7-box__tick {
	display: none;
}

.il24x7-box__cross {
	display: block;
	line-height: 0;
}

.il24x7-item.is-done .il24x7-box {
	background: var(--il-done);
	border-color: var(--il-done);
	color: #ffffff;
}

.il24x7-item.is-done .il24x7-box__tick {
	display: block;
	line-height: 0;
}

.il24x7-item.is-done .il24x7-box__cross {
	display: none;
}

.il24x7-item.is-locked .il24x7-box {
	background: var(--il-wash);
	border-color: var(--il-line);
	color: var(--il-ink-soft);
}

.il24x7-item.is-locked .il24x7-box__cross {
	display: none;
}

.il24x7-item__input:focus-visible + .il24x7-box {
	outline: 2px solid var(--il-ink);
	outline-offset: 2px;
}

.il24x7-item__body {
	display: block;
	flex: 1 1 auto;
}

.il24x7-item__label {
	display: block;
	font-weight: 600;
}

.il24x7-item.is-done .il24x7-item__label {
	color: var(--il-ink-soft);
	text-decoration: line-through;
	text-decoration-color: var(--il-done);
	text-decoration-thickness: 2px;
}

.il24x7-item__notes {
	color: var(--il-ink-soft);
	display: block;
	font-size: 0.9rem;
	margin-top: 3px;
}

.il24x7-item__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.il24x7-tag {
	background: var(--il-wash);
	border-radius: 3px;
	color: var(--il-ink-soft);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	padding: 2px 7px;
}

.il24x7-tag--opt {
	background: #fdf4e0;
	color: var(--il-opt);
}

.il24x7-tag--lock {
	align-items: center;
	display: inline-flex;
	gap: 4px;
}

.il24x7-tag--lock svg {
	vertical-align: middle;
}

/* ---------- Watch button ---------- */

.il24x7-watch {
	align-items: center;
	align-self: flex-start;
	border: 1px solid var(--il-line);
	border-radius: var(--il-radius);
	color: var(--il-ink);
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.8125rem;
	font-weight: 600;
	gap: 5px;
	padding: 5px 11px;
	text-decoration: none;
	transition: border-color 160ms ease, background-color 160ms ease;
}

.il24x7-watch:hover,
.il24x7-watch:focus {
	background: var(--il-wash);
	border-color: var(--il-ink);
	color: var(--il-ink);
}

/* ---------- Dashboard cards ---------- */

.il24x7-cards {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.il24x7-card {
	border: 1px solid var(--il-line);
	border-radius: var(--il-radius);
	padding: 16px;
}

.il24x7-card.is-complete {
	background: var(--il-done-wash);
	border-color: var(--il-done);
}

.il24x7-card__title {
	font-size: 1rem;
	margin: 0 0 12px;
}

.il24x7-card__meta {
	color: var(--il-ink-soft);
	font-size: 0.875rem;
	margin: 8px 0 0;
}

.il24x7-card__flag {
	color: var(--il-done);
	font-size: 0.8125rem;
	font-weight: 700;
	margin: 4px 0 0;
}

/* ---------- Forms ---------- */

.il24x7-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin: 14px 0 5px;
}

.il24x7-form input[type="text"],
.il24x7-form input[type="email"],
.il24x7-form input[type="tel"],
.il24x7-form input[type="password"],
.il24x7-form input[type="file"],
.il24x7-form select {
	border: 1px solid var(--il-line);
	border-radius: var(--il-radius);
	font: inherit;
	padding: 9px 11px;
	width: 100%;
}

.il24x7-form input:focus,
.il24x7-form select:focus {
	border-color: var(--il-ink);
	outline: 2px solid rgba(22, 40, 63, 0.15);
	outline-offset: 1px;
}

.il24x7-row {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.il24x7-btn {
	background: var(--il-ink);
	border: 0;
	border-radius: var(--il-radius);
	color: #ffffff;
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-weight: 600;
	margin-top: 18px;
	padding: 11px 22px;
	text-decoration: none;
}

.il24x7-btn:hover,
.il24x7-btn:focus {
	background: #0d1b2c;
	color: #ffffff;
}

.il24x7-link {
	background: none;
	border: 0;
	color: var(--il-ink-soft);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

.il24x7-logo {
	border: 1px solid var(--il-line);
	border-radius: var(--il-radius);
	display: block;
	height: auto;
	margin-bottom: 8px;
	max-width: 180px;
}

.il24x7-alt {
	border-top: 1px solid var(--il-line);
	margin-top: 26px;
	padding-top: 14px;
}

.il24x7-alt summary {
	color: var(--il-ink-soft);
	cursor: pointer;
	font-size: 0.9rem;
}

/* ---------- Notices and misc ---------- */

.il24x7-notice {
	border-left: 3px solid var(--il-done);
	border-radius: 0 var(--il-radius) var(--il-radius) 0;
	background: var(--il-done-wash);
	margin-bottom: 18px;
	padding: 11px 14px;
}

.il24x7-notice--error {
	background: #fdeeec;
	border-left-color: var(--il-todo);
}

.il24x7-hint,
.il24x7-empty {
	color: var(--il-ink-soft);
	font-size: 0.875rem;
}

.il24x7-gate {
	border: 1px solid var(--il-line);
	border-radius: var(--il-radius);
	padding: 26px;
	text-align: center;
}

.il24x7-gate__text {
	margin: 0;
}

.il24x7-signout {
	margin-top: 24px;
}

.il24x7-saved {
	color: var(--il-ink-soft);
	font-size: 0.8125rem;
	margin-top: 14px;
	min-height: 1.2em;
}

.il24x7-saved.is-error {
	color: var(--il-todo);
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
	.il24x7-item {
		flex-wrap: wrap;
	}

	.il24x7-watch {
		margin-left: 36px;
	}

	.il24x7-score__text {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.il24x7 * {
		transition: none !important;
	}
}

/* ---------- Membership badges on the dashboard ---------- */

.il24x7-memberships {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.il24x7-memberships .il24x7-tag {
	background: #eef2f7;
	color: var(--il-ink);
	font-weight: 600;
}

/* ---------- Granted pages on the dashboard ---------- */

.il24x7-subhead {
	border-top: 1px solid var(--il-line);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 30px 0 10px;
	padding-top: 20px;
	text-transform: uppercase;
}

.il24x7-pagelist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.il24x7-pagelist li {
	border-bottom: 1px solid var(--il-line);
}

.il24x7-pagelist a {
	color: var(--il-ink);
	display: block;
	font-weight: 600;
	padding: 11px 0;
	text-decoration: none;
}

.il24x7-pagelist a:hover,
.il24x7-pagelist a:focus {
	color: var(--il-done);
}

/* ---------- Secondary auth forms ---------- */

.il24x7-form--tight {
	border-top: 1px solid var(--il-line);
	margin-top: 22px;
	padding-top: 6px;
}

.il24x7-link--btn {
	font-size: 0.875rem;
	font-weight: 600;
	margin-top: 12px;
}

/* ---------- Administrator preview ---------- */

.il24x7-preview-bar {
	background: #fdf4e0;
	border: 1px solid #e8d5a3;
	border-left: 4px solid #8a6d1f;
	border-radius: var(--il-radius);
	display: block;
	margin-bottom: 22px;
	padding: 12px 15px;
}

.il24x7-preview-bar strong {
	color: #6b5417;
	display: block;
	font-size: 0.8125rem;
	letter-spacing: 0.05em;
	margin-bottom: 3px;
	text-transform: uppercase;
}

.il24x7-preview-bar span {
	color: var(--il-ink-soft);
	font-size: 0.875rem;
}

.il24x7.is-preview .il24x7-item__check {
	cursor: default;
}

.il24x7.is-preview .il24x7-box {
	opacity: 0.9;
}
