.gform-admin {

	.gform-data-grid {
		background: var(--gform-admin-color-white);
		border: 1px solid var(--gform-admin-color-metal-gray);
		border-radius: 3px;
		box-shadow: var(--gform-admin-box-shadow-outline-light);
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		width: 100%;

		* {
			box-sizing: border-box;
		}
	}

	.gform-data-grid__header {
		display: flex;
		justify-content: space-between;
		padding-block: var(--gform-admin-spacer-5);
		padding-inline: var(--gform-admin-spacer-6);
	}

	.gform-data-grid__controls {
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-direction: column-reverse;
		inline-size: 100%;

		@media (min-width: 40.625rem) {
			flex-direction: row;
		}
	}

	.gform-data-grid__controls-inner {
		padding-block: var(--gform-admin-spacer-4);
		padding-inline: var(--gform-admin-spacer-6);
	}

	.gform-data-grid__controls-inner--left:not(:last-child) {
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);

		@media (min-width: 40.625rem) {
			border-block-start: 0;
		}
	}

	.gform-data-grid__controls-inner--right {
		display: flex;
		gap: var(--gform-admin-spacer-3);

		@media (min-width: 40.625rem) {
			margin-inline-start: auto;
		}
	}

	.gform-data-grid__controls-search,
	.gform-data-grid__controls-bulk-actions {
		align-items: center;
		display: flex;
		gap: var(--gform-admin-spacer-3);
		inline-size: 100%;
	}

	.gform-data-grid__controls-search {
		justify-content: flex-end;

		@media (min-width: 40.625rem) {
			max-inline-size: 28.75rem;
		}
	}

	.gform-data-grid__controls-bulk-actions {
		justify-content: flex-start;

		@media (min-width: 40.625rem) {
			max-inline-size: 25rem;
		}
	}

	.gform-data-grid__controls-search-input,
	.gform-data-grid__controls-bulk-actions-select {
		flex-grow: 1;
	}

	.gform-data-grid__controls-simple-filters {
		position: relative;
	}

	.gform-data-grid__controls-simple-filters-list-item--reset {

		&.gform-data-grid__controls-simple-filters-list-item:last-child { /* extra selectors to override droplist styles */
			margin-block-end: calc(var(--gform-admin-spacer-1) * -1);
		}

		.gform-droplist__item-trigger-text {
			color: var(--gform-admin-color-blue-ribbon);
			padding: 0;
			text-align: center;
		}
	}

	.gform-data-grid__controls-simple-filters-count {
		align-items: center;
		background: var(--gform-admin-color-blue-ribbon);
		block-size: 0.875rem;
		border-radius: 0.125rem;
		color: var(--gform-admin-color-white);
		display: flex;
		inline-size: 0.875rem;
		inset-block-start: -2px;
		inset-inline-end: -2px;
		justify-content: center;
		position: absolute;
	}

	.gform-data-grid__active-filters {
		align-items: center;
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-wrap: wrap;
		gap: var(--gform-admin-spacer-3);
		justify-content: center;
		padding-block: var(--gform-admin-spacer-2);
		padding-inline: var(--gform-admin-spacer-6);
	}

	.gform-data-grid__controls-date-filters--has-filter {
		position: relative;

		&::after {
			background: var(--gform-admin-color-blue-ribbon);
			block-size: 0.875rem;
			border-radius: 50%;
			content: "";
			display: block;
			inline-size: 0.875rem;
			inset-block-start: -2px;
			inset-inline-end: -2px;
			position: absolute;
		}
	}

	.gform-data-grid__controls-date-filters-calendar {
		inset-inline-end: 0;
	}

	.gform-data-grid__select-notice {
		align-items: center;
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-direction: row;
		gap: var(--gform-admin-spacer-4);
		justify-content: center;
		min-block-size: 2.6875rem;
		padding: 0.375rem var(--gform-admin-spacer-6);

		.gform-data-grid__bold-text {
			font-weight: var(--gform-admin-font-weight-semibold);
		}
	}

	.gform-data-grid__column-row {
		background: var(--gform-admin-color-light-blue);
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-direction: row;
		padding-inline: var(--gform-admin-spacer-3);
		width: 100%;

		.gform-data-grid__column {
			padding-block: var(--gform-admin-spacer-3);
			padding-inline: var(--gform-admin-spacer-3);

			.gform-text {
				color: var(--gform-admin-color-comet);
			}
		}

		.gform-data-grid__column--bulk-select {
			flex: none;
			padding-inline-end: 0.25rem;
		}
	}

	.gform-data-grid__data-row {
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-direction: row;
		padding-inline: var(--gform-admin-spacer-3);
		width: 100%;

		.gform-data-grid__column {
			padding-block: var(--gform-admin-spacer-5);
			padding-inline: var(--gform-admin-spacer-3);
		}

		.gform-data-grid__column--row-select {
			flex: none;
			padding-inline-end: 0.25rem;
		}
	}

	.gform-data-grid--highlight-hover .gform-data-grid__data-row {

		&:hover {
			background: var(--gform-admin-color-alabaster);
		}
	}

	.gform-data-grid--highlight-selected .gform-data-grid__data-row.gform-data-grid__data-row--selected {
		background: var(--gform-admin-color-light-blue);

		&:hover {
			background: var(--gform-admin-color-light-blue);
		}
	}

	.gform-data-grid--equal-grid {

		.gform-data-grid__column-row,
		.gform-data-grid__data-row {
			justify-content: space-between;
		}
	}

	.gform-data-grid__column {
		align-items: center;
		display: flex;
		overflow: hidden;

		.gform-text {
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			width: 100%;
		}
	}

	.gform-input-wrapper--theme-cosmos {

		&.gform-data-grid__bulk-select-checkbox,
		&.gform-data-grid__row-select-checkbox {

			.gform-input--checkbox + .gform-label::before {
				margin: 0; /* extra selectors to override checkbox styles */
			}
		}
	}

	.gform-data-grid__data {
		position: relative;
	}

	.gform-data-grid__no-data-message {
		align-items: center;
		background: var(--gform-admin-color-white);
		border: 1px solid var(--gform-admin-color-white-iris);
		border-radius: 3px;
		box-shadow: var(--gravitysmtp-admin-box-shadow-mega);
		display: flex;
		flex-direction: column;
		justify-content: center;
		left: 50%;
		padding: 1.5rem;
		position: absolute;
		text-align: center;
		top: 50%;
		transform: translate(-50%, -50%);
	}

	.gform-data-grid__pagination {
		align-items: center;
		border-block-start: 1px solid var(--gform-admin-color-metal-gray);
		display: flex;
		flex-direction: row;
		justify-content: center;
		padding: 1.25rem 1.5rem;
	}

	.gform-data-grid__loader {
		background-color: var(--gform-admin-color-porcelain-gray);
		block-size: 22px;
		border-radius: 11px;
		opacity: 1;

		&.gform-data-grid__loader--animating {
			animation: gravitysmtpOpacityCycle 1s ease-in-out infinite;
			animation-delay: -0.5s;
		}
	}

	.gform-data-grid--empty {

		.gform-data-grid__pagination {
			block-size: 4.8125rem;
		}

		.gform-pagination {
			display: none;
		}
	}

	.gform-data-grid--loading .gform-data-grid__pagination {
		opacity: 0.5;
		position: relative;

		&::after {
			block-size: 100%;
			content: "";
			display: block;
			inline-size: 100%;
			inset-block-start: 0;
			inset-inline-start: 0;
			position: absolute;
		}
	}
}

@keyframes gravitysmtpOpacityCycle {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.5;
	}
}
