.icomm-sm-wrap {
	direction: rtl;
	text-align: right;
}

.icomm-sm-wrap .form-table th,
.icomm-sm-wrap .form-table td,
.icomm-sm-wrap .notice,
.icomm-sm-wrap .notice p,
.icomm-sm-wrap .icomm-sm-query-table th,
.icomm-sm-wrap .icomm-sm-query-table td {
	text-align: right;
}

.icomm-sm-wrap [dir="ltr"],
.icomm-sm-wrap input[dir="ltr"],
.icomm-sm-wrap select[dir="ltr"],
.icomm-sm-wrap code[dir="ltr"] {
	direction: ltr;
	text-align: left;
}

.icomm-sm-pro-badge {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 6px;
	font-size: 10px;
	font-weight: 700;
	border-radius: 3px;
	background: #2271b1;
	color: #fff;
	vertical-align: middle;
}

.icomm-sm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin: 16px 0;
}

.icomm-sm-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 14px 16px;
}

.icomm-sm-card h3 {
	margin: 0 0 8px;
	font-size: 13px;
	color: #50575e;
}

.icomm-sm-card .icomm-sm-stat {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.icomm-sm-howto {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 14px 18px 16px;
	margin: 12px 0 18px;
}

.icomm-sm-howto-steps {
	margin: 8px 0 12px 1.2em;
	line-height: 1.6;
}

.icomm-sm-howto-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	font-size: 13px;
	color: #50575e;
}

.icomm-sm-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-left: 4px;
	vertical-align: middle;
}

.icomm-sm-dot-improve { background: #dba617; }
.icomm-sm-dot-adapt { background: #2271b1; }
.icomm-sm-dot-build { background: #00a32a; }

.icomm-sm-status-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 14px;
	padding: 10px 12px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 13px;
}

.icomm-sm-status-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.icomm-sm-empty-guide {
	margin: 8px 0 16px !important;
}

.icomm-sm-card-label {
	font-size: 13px;
	color: #50575e;
	margin-bottom: 6px;
}

.icomm-sm-card-value {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.icomm-sm-opp-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 12px 0 8px;
}

.icomm-sm-opp-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 14px 16px;
	border-right: 4px solid #2271b1;
}

.icomm-sm-opp-improve {
	border-right-color: #dba617;
}

.icomm-sm-opp-adapt {
	border-right-color: #2271b1;
}

.icomm-sm-opp-build {
	border-right-color: #00a32a;
}

.icomm-sm-opp-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.icomm-sm-opp-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 999px;
	background: #f0f0f1;
	color: #1d2327;
}

.icomm-sm-opp-guidance {
	margin: 8px 0;
	line-height: 1.55;
}

.icomm-sm-opp-page {
	margin: 8px 0;
}

.icomm-sm-opp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0;
}

.icomm-sm-opp-tracked {
	border-right-color: #646970;
}

.icomm-sm-opp-status-improved {
	border-right-color: #00a32a;
}

.icomm-sm-opp-status-worse {
	border-right-color: #d63638;
}

.icomm-sm-opp-status-waiting,
.icomm-sm-opp-status-no_data,
.icomm-sm-opp-status-stable {
	border-right-color: #dba617;
}

.icomm-sm-track-table {
	margin-top: 8px;
	max-width: 100%;
}

.icomm-sm-track-table th,
.icomm-sm-track-table td {
	padding: 6px 10px;
}

.icomm-sm-delta-up {
	color: #00a32a;
	font-weight: 600;
}

.icomm-sm-delta-down {
	color: #d63638;
	font-weight: 600;
}

.icomm-sm-locked-preview {
	opacity: 0.55;
	pointer-events: none;
}

.icomm-sm-query-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.icomm-sm-query-table th,
.icomm-sm-query-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #dcdcde;
}

.icomm-sm-version-line {
	margin-top: 24px;
	color: #646970;
	font-size: 12px;
}

/* Busy / scan progress overlay */
body.icomm-sm-busy-open {
	overflow: hidden;
}

.icomm-sm-busy-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 42, 0.52);
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.icomm-sm-busy-overlay.is-visible {
	display: flex;
}

.icomm-sm-busy-card {
	width: min(420px, 100%);
	background: #fff;
	border-radius: 8px;
	padding: 22px 24px 18px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	text-align: center;
	direction: rtl;
}

.icomm-sm-busy-spinner {
	width: 36px;
	height: 36px;
	margin: 0 auto 12px;
	border: 3px solid #dcdcde;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: icomm-sm-spin 0.8s linear infinite;
}

@keyframes icomm-sm-spin {
	to { transform: rotate(360deg); }
}

.icomm-sm-busy-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: #1d2327;
}

.icomm-sm-busy-step {
	margin: 0 0 14px;
	font-size: 13px;
	color: #50575e;
	min-height: 1.4em;
}

.icomm-sm-busy-track {
	height: 10px;
	background: #e2e4e7;
	border-radius: 999px;
	overflow: hidden;
}

.icomm-sm-busy-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #2271b1, #72aee6);
	border-radius: 999px;
	transition: width 0.45s ease;
}

.icomm-sm-busy-pct {
	margin: 8px 0 4px;
	font-size: 13px;
	font-weight: 700;
	color: #2271b1;
}

.icomm-sm-busy-hint {
	margin: 0;
	font-size: 12px;
	color: #646970;
}

/* Monthly SEO trend */
.icomm-sm-trend-panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 16px 18px 14px;
	margin: 8px 0 20px;
	max-width: 960px;
}

.icomm-sm-trend-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 10px 14px;
	margin-bottom: 12px;
}

.icomm-sm-trend-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	background: #f0f0f1;
	color: #1d2327;
	white-space: nowrap;
}

.icomm-sm-trend-badge--up {
	background: #edfaef;
	color: #007017;
}

.icomm-sm-trend-badge--down {
	background: #fcf0f1;
	color: #b32d2e;
}

.icomm-sm-trend-badge--stable {
	background: #fcf9e8;
	color: #996800;
}

.icomm-sm-trend-badge--unknown {
	background: #f0f0f1;
	color: #50575e;
}

.icomm-sm-trend-summary {
	margin: 0;
	flex: 1 1 240px;
	line-height: 1.5;
	color: #1d2327;
}

.icomm-sm-trend-deltas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 8px;
	margin: 0 0 16px;
}

.icomm-sm-trend-delta {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.icomm-sm-trend-delta__label {
	font-size: 12px;
	color: #50575e;
}

.icomm-sm-trend-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	font-size: 12px;
	color: #50575e;
	margin-bottom: 10px;
}

.icomm-sm-legend-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	margin-left: 6px;
	vertical-align: middle;
}

.icomm-sm-legend-clicks { background: #1d4ed8; }
.icomm-sm-legend-impr { background: #ea580c; }

.icomm-sm-trend-range {
	margin: 0 0 12px;
}

.icomm-sm-trend-section-label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
}

.icomm-sm-trend-compare-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

.icomm-sm-trend-compare-card {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	line-height: 1.45;
}

.icomm-sm-trend-bars-wrap {
	overflow-x: auto;
	padding-bottom: 4px;
	direction: rtl;
}

.icomm-sm-trend-bars {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	gap: 10px;
	min-height: 180px;
	width: max-content;
	min-width: 100%;
	direction: rtl;
}

.icomm-sm-trend-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 0 0 92px;
	width: 92px;
}

.icomm-sm-trend-col.is-partial {
	opacity: 0.78;
}

.icomm-sm-trend-col__bars {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 6px;
	height: 140px;
	width: 100%;
	border-bottom: 1px solid #dcdcde;
	padding-bottom: 2px;
}

.icomm-sm-bar {
	display: block;
	width: 18px;
	min-height: 2px;
	border-radius: 3px 3px 0 0;
}

.icomm-sm-bar--clicks { background: #1d4ed8; }
.icomm-sm-bar--impr { background: #ea580c; }

.icomm-sm-trend-col__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 11px;
	color: #50575e;
	text-align: center;
	line-height: 1.35;
}

.icomm-sm-trend-col__meta strong {
	font-size: 12px;
	color: #1d2327;
}

.icomm-sm-trend-partial {
	color: #996800;
	font-weight: 600;
}

.icomm-sm-trend-rec-title {
	margin: 18px 0 8px;
	font-size: 14px;
}

.icomm-sm-trend-recs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.icomm-sm-trend-rec {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 10px 12px;
	border-right: 4px solid #2271b1;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 4px;
	line-height: 1.45;
}

.icomm-sm-trend-rec--high { border-right-color: #d63638; }
.icomm-sm-trend-rec--medium { border-right-color: #dba617; }
.icomm-sm-trend-rec--low { border-right-color: #00a32a; }

.icomm-sm-trend-rec span {
	color: #50575e;
	font-size: 13px;
}

.icomm-sm-trend-mail-form {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	max-width: 560px;
}

.icomm-sm-trend-mail-title {
	margin: 0 0 6px;
	font-size: 14px;
}

.icomm-sm-trend-mail-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.icomm-sm-trend-chart--clickable {
	cursor: pointer;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	padding: 10px;
}

.icomm-sm-trend-chart--clickable:hover,
.icomm-sm-trend-chart--clickable:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

body.icomm-sm-trend-modal-open {
	overflow: hidden;
}

.icomm-sm-trend-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100100;
	background: rgba(15, 23, 42, 0.55);
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.icomm-sm-trend-modal.is-open {
	display: flex;
}

.icomm-sm-trend-modal__dialog {
	width: min(1100px, 100%);
	max-height: min(92vh, 900px);
	overflow: auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
	padding: 16px 18px 18px;
	direction: rtl;
	text-align: right;
}

.icomm-sm-trend-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.icomm-sm-trend-modal__head h2 {
	margin: 0;
	font-size: 18px;
}

.icomm-sm-trend-modal__close {
	border: 0;
	background: #f0f0f1;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #1d2327;
}

.icomm-sm-trend-modal__close:hover {
	background: #dcdcde;
}

.icomm-sm-trend-modal__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin-bottom: 10px;
}

.icomm-sm-trend-seg {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.icomm-sm-trend-seg__label {
	font-size: 12px;
	color: #50575e;
	margin-left: 4px;
}

.icomm-sm-trend-seg button {
	border: 1px solid #c3c4c7;
	background: #fff;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	cursor: pointer;
	color: #1d2327;
}

.icomm-sm-trend-seg button.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.icomm-sm-trend-modal__hint {
	margin: 0 0 8px;
}

.icomm-sm-trend-modal__canvas-wrap {
	position: relative;
	height: min(58vh, 480px);
	width: 100%;
	direction: rtl;
}
