@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";
@import "@wordpress/base-styles/variables";

.sites-dataviews__site {
	display: flex;
	flex-direction: row;

	.button {
		padding: 0;
	}
}

.sites-dataviews__site-favicon {
	margin-right: 16px;
}

.sites-dataviews__site-name {
	display: inline-block;
	text-align: left;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	width: 180px;
	@include heading-medium;
	margin-inline-end: 16px;

	.status-badge {
		/* stylelint-disable-next-line scales/radii */
		border-radius: 12px;
	}
}

.sites-dataviews__site-url {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	@include body-small;
	color: var(--color-neutral-60);
}

.sites-dataviews__site-error-indicator {
	&.is-high .gridicon {
		color: var(--color-error);
	}

	&.is-medium .gridicon {
		color: var(--color-warning);
	}
}

.sites-dataviews__site-error-popover-list {
	margin: 16px;
	margin-inline-start: 32px;

	li {
		@include body-small;
		text-align: start;
	}
}

.sites-dataviews__site-error-popover-content {
	@include body-small;
	margin: 16px;
}

.preview-hidden {
	@media (min-width: 2040px) {
		.sites-dataviews__site-name {
			width: 250px;
		}
	}
}

.is-section-a8c-for-agencies-sites {
	a.site-actions__menu-item {
		&:hover,
		&:focus {
			background: var(--wp-components-color-accent);
			color: var(--color-text-inverted);
		}
	}

	.components-dropdown-menu {
		padding: 8px;
		border-radius: 4px;

		[role="menuitem"],
		[role="menuitemradio"] {
			border-radius: 4px;
		}
	}

	.dataviews-filters__search-widget-listbox {
		max-height: 195px;
	}
}

.sites-dashboard__layout:not(.preview-hidden) {

	.dataviews-pagination {
		line-height: 1;
		width: 368px;

		.components-base-control {
			width: unset !important;
			margin-right: 0 !important;
		}
	}
}
