.cci-inspector-shell {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 16px 40px;
}

#cci-inspector-app {
	display: grid;
	gap: 20px;
}

.cci-app-card {
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	border: 1px solid #d6e1f2;
	border-radius: 24px;
	padding: 22px;
	box-shadow: 0 16px 38px rgba(15, 33, 72, 0.08);
}

.cci-app-card-hero {
	background:
		radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 34%),
		linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.cci-app-card header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.cci-task-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.cci-task-card {
	background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
	border: 1px solid #dce6f3;
	border-radius: 20px;
	padding: 18px;
	display: grid;
	gap: 12px;
}

.cci-task-card .cci-status-pill {
	width: fit-content;
}

.cci-status-pill {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: #e8f2ff;
	color: #1553b7;
}

.cci-task-type {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #4b4fd2;
}

.cci-task-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cci-app-button {
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	font-weight: 700;
	cursor: pointer;
	background: linear-gradient(135deg, #4a49d9 0%, #3f6dff 100%);
	color: #fff;
	box-shadow: 0 10px 24px rgba(63, 109, 255, 0.22);
}

.cci-app-button.is-secondary {
	background: #eef3ff;
	color: #394bdb;
	box-shadow: none;
}

.cci-app-button:disabled {
	opacity: 0.72;
	cursor: wait;
}

.cci-inspection-panel {
	display: grid;
	gap: 16px;
}

.cci-section-card {
	padding: 0;
	overflow: hidden;
	border-color: #cfdcf4;
}

.cci-section-summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	cursor: pointer;
	background: linear-gradient(135deg, #4450d8 0%, #6b71ff 100%);
	color: #fff;
	font-weight: 700;
}

.cci-section-summary::-webkit-details-marker {
	display: none;
}

.cci-section-summary-main {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.cci-section-title {
	font-size: 16px;
	line-height: 1.35;
}

.cci-section-progress {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.cci-section-chevron {
	width: 0;
	height: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	border-left: 10px solid rgba(255, 255, 255, 0.95);
	transition: transform 0.2s ease;
}

.cci-section-card[open] .cci-section-chevron {
	transform: rotate(90deg);
}

.cci-section-body {
	padding: 18px;
	background: #fff;
	display: grid;
	gap: 16px;
}

.cci-question-card {
	border: 1px solid #dce4f2;
	border-left: 6px solid #a13c3c;
	border-radius: 22px;
	padding: 18px;
	background: #fff;
	display: grid;
	gap: 14px;
}

.cci-question-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.cci-question-card label {
	margin: 0;
	font-size: 18px;
	line-height: 1.45;
	color: #1d2536;
}

.cci-question-required {
	font-size: 12px;
	font-weight: 700;
	color: #a13c3c;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.cci-question-answer-wrap {
	display: grid;
	gap: 10px;
}

.cci-choice-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.cci-choice-button {
	border: 1px solid #c6d3ea;
	border-radius: 18px;
	padding: 16px 14px;
	background: #fff;
	color: #2f3a4f;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.cci-choice-button:hover,
.cci-choice-button:focus {
	border-color: #aebbd0;
	box-shadow: 0 10px 22px rgba(71, 85, 105, 0.12);
	outline: none;
	transform: translateY(-1px);
}

.cci-choice-button.is-selected {
	background: #eef2f7;
	border-color: #98a2b3;
	color: #243047;
	box-shadow: inset 0 0 0 1px rgba(152, 162, 179, 0.55), 0 10px 22px rgba(71, 85, 105, 0.12);
}

.cci-choice-button.is-selected.is-green {
	background: #2e7d4f;
	border-color: #2e7d4f;
	color: #fff;
}

.cci-choice-button.is-selected.is-red {
	background: #a83227;
	border-color: #a83227;
	color: #fff;
}

.cci-choice-button.is-selected.is-amber {
	background: #b54708;
	border-color: #b54708;
	color: #fff;
}

.cci-choice-button.is-selected.is-blue {
	background: #4657d8;
	border-color: #4657d8;
	color: #fff;
}

.cci-choice-button.is-selected.is-grey {
	background: #667085;
	border-color: #667085;
	color: #fff;
}

.cci-question input[type="text"],
.cci-question input[type="number"],
.cci-question textarea,
.cci-question select {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	border: 1px solid #c3cfdf;
	border-radius: 14px;
	background: #fff;
}

.cci-question input.is-invalid,
.cci-question textarea.is-invalid,
.cci-question select.is-invalid {
	border-color: #d92d20;
	box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.cci-question textarea {
	min-height: 100px;
	resize: vertical;
}

.cci-air-date-input {
	cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%231f2937' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") no-repeat right 14px center !important;
	padding-right: 44px !important;
}

.cci-question-tool-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	justify-content: flex-end;
	align-items: center;
	padding-top: 4px;
}

.cci-question-tool-button,
.cci-inline-tool-link {
	border: 0;
	background: transparent;
	color: #4b50d6;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.cci-question-tool-button.is-active {
	color: #243fc6;
}

.cci-question-tool-panels {
	display: grid;
	gap: 12px;
}

.cci-question-tool-panel {
	padding: 16px;
	border: 1px solid #e1e8f5;
	border-radius: 16px;
	background: #fafcff;
	display: grid;
	gap: 10px;
}

/* The generic display:grid declaration above must not override the HTML hidden
 * attribute: this is what keeps the note, media and action forms closed until
 * their matching toolbar control is pressed. */
.cci-question-tool-panel[hidden] {
	display: none !important;
}

.cci-question-tool-button .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	line-height: 20px;
}

.cci-question-footer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px 24px;
	align-items: center;
}

.cci-question-status[hidden] {
	display: block;
	visibility: hidden;
}

.cci-question-footer > .cci-question-tool-row {
	grid-column: 2;
	justify-self: end;
}

.cci-question-footer .cci-question-tool-panels {
	grid-column: 1 / -1;
}

.cci-question-tool-label {
	font-size: 13px;
	font-weight: 700;
	color: #3b4860;
}

.cci-question-media-box {
	display: grid;
	gap: 10px;
}

.cci-question-media-list {
	display: grid;
	gap: 8px;
}

.cci-question-media-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid #dce4f2;
	border-radius: 14px;
	background: #fff;
}

.cci-question-media-item a {
	color: #2547ca;
	font-weight: 600;
	text-decoration: none;
	word-break: break-word;
}

.cci-question-media-empty,
.cci-question-instruction-copy {
	padding: 12px 14px;
	border: 1px dashed #ccd8ee;
	border-radius: 14px;
	background: #fbfcff;
	color: #64748b;
	font-size: 14px;
}

.cci-question-instruction-spacer {
	display: none;
}

.cci-note {
	font-size: 13px;
	color: #667085;
}

/* The cleaner widget uses the same runner structure as the admin Run Inspection view. */
.cci-runner-panel .cci-section-body {
	display: grid;
	gap: 18px;
	padding: 18px 18px 6px;
	background: #fff;
}

.cci-runner-panel .cci-section-summary {
	background: linear-gradient(135deg, #3956d8 0%, #6172ff 100%);
}

.cci-runner-panel .cci-section-card {
	padding: 0;
	overflow: hidden;
	border-color: #cfdcf4;
}

.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-section-body {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
}

.cci-runner-panel .cci-section-card[data-section-key="title_page"] [data-question-key-wrap="conducted_on"] { order: 1; }
.cci-runner-panel .cci-section-card[data-section-key="title_page"] [data-question-key-wrap="room_number"] { order: 2; }
.cci-runner-panel .cci-section-card[data-section-key="title_page"] [data-question-key-wrap="prepared_by"] { order: 3; }
.cci-runner-panel .cci-section-card[data-section-key="title_page"] [data-question-key-wrap="pick_location"] { order: 4; }

.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-question-card {
	border-left-color: #4f8b63;
	padding: 14px 16px;
	gap: 10px;
	min-height: 0;
	background: #f8fafc;
}

.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-question-tool-row {
	display: none;
}

.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-question-card-head {
	margin-bottom: 2px;
}

.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-question-card label {
	font-size: 16px;
}

.cci-runner-panel .cci-question-card {
	background: #f8fafc;
}

.cci-runner-panel .cci-question-card.is-answer-positive {
	border-left-color: #4f8b63;
}

.cci-runner-panel .cci-question-card.is-answer-negative {
	border-left-color: #b8292f;
}

@media (max-width: 900px) {
	.cci-runner-panel .cci-section-card[data-section-key="title_page"] .cci-section-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.cci-runner-panel .cci-section-card[data-section-key="title_page"] [data-question-key-wrap] {
		order: initial;
	}
}

@media (max-width: 768px) {
	.cci-choice-grid {
		grid-template-columns: 1fr;
	}

	.cci-question-card {
		padding: 16px;
	}

	.cci-question-card label {
		font-size: 16px;
	}

	.cci-choice-button {
		font-size: 17px;
	}
}

#cci-inspector-app button,
#cci-inspector-app .cci-app-button,
#cci-inspector-app .cci-choice-button,
#cci-inspector-app .cci-question-tool-button,
#cci-inspector-app .cci-inline-tool-link {
	transition:
		transform 0.14s ease,
		box-shadow 0.14s ease,
		border-color 0.14s ease,
		background-color 0.14s ease,
		color 0.14s ease,
		filter 0.14s ease;
	-webkit-tap-highlight-color: transparent;
}

#cci-inspector-app button:not(:disabled):hover,
#cci-inspector-app button:not(:disabled):focus-visible,
#cci-inspector-app .cci-app-button:not(:disabled):hover,
#cci-inspector-app .cci-app-button:not(:disabled):focus-visible,
#cci-inspector-app .cci-choice-button:not(:disabled):hover,
#cci-inspector-app .cci-choice-button:not(:disabled):focus-visible,
#cci-inspector-app .cci-question-tool-button:not(:disabled):hover,
#cci-inspector-app .cci-question-tool-button:not(:disabled):focus-visible,
#cci-inspector-app .cci-inline-tool-link:not(:disabled):hover,
#cci-inspector-app .cci-inline-tool-link:not(:disabled):focus-visible {
	box-shadow: 0 12px 26px rgba(63, 109, 255, 0.2) !important;
	transform: translateY(-1px);
	outline: none;
}

#cci-inspector-app button:not(:disabled):active,
#cci-inspector-app .cci-app-button:not(:disabled):active,
#cci-inspector-app .cci-choice-button:not(:disabled):active,
#cci-inspector-app .cci-question-tool-button:not(:disabled):active,
#cci-inspector-app .cci-inline-tool-link:not(:disabled):active {
	box-shadow: 0 4px 12px rgba(63, 109, 255, 0.16) !important;
	transform: translateY(1px) scale(0.99);
	filter: brightness(0.98);
}

#cci-inspector-app .cci-choice-button:not(:disabled):hover,
#cci-inspector-app .cci-choice-button:not(:disabled):focus-visible {
	box-shadow: 0 10px 22px rgba(71, 85, 105, 0.12) !important;
	border-color: #aebbd0;
}

#cci-inspector-app .cci-choice-button:not(:disabled):active {
	box-shadow: 0 4px 12px rgba(71, 85, 105, 0.12) !important;
}

#cci-inspector-app button:disabled,
#cci-inspector-app .cci-app-button:disabled,
#cci-inspector-app .cci-choice-button:disabled {
	transform: none !important;
	box-shadow: none !important;
}
