.paca-backend-settings {
	> h1 { display: none; } // Moved into the sidebar (.tab--buttons h1).
}

.paca-backend-settings form td {
	padding: 20px;
}

.paca-metabox-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#paca-metabox h2.hndle {
	padding-left: 16px !important;
	padding-right: 16px !important;
	font-weight: 500 !important;
	font-size: 13px !important;
}

#paca-modal {
	position: fixed;
	z-index: 99999;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 24px;
}

.paca-modal-content {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	max-width: 520px;
	width: 100%;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
}

.paca-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f1;

	h2 {
		margin: 0;
		font-size: 14px !important;
		font-weight: 600 !important;
		color: #1d2327;
		line-height: 1.4;
	}
}

#paca-modal-close {
	background: transparent;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #646970;
	cursor: pointer;
	padding: 2px 4px;
	border-radius: 4px;

	&:hover {
		color: #1d2327;
		background: #f0f0f1;
	}
}

.paca-modal-body {
	padding: 16px 20px;
	font-size: 13.5px;
	color: #50575e;
	line-height: 1.6;
}

.paca-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 20px;
	border-top: 1px solid #f0f0f1;

	.button:not(#paca-modal-cancel) {
		background: #1a7f37 !important;
		border-color: #1a7f37 !important;
		color: #fff !important;
		box-shadow: none !important;

		&:hover {
			background: #166f30 !important;
			border-color: #166f30 !important;
		}
	}

	#paca-modal-cancel {
		background: transparent !important;
		border-color: #b22222 !important;
		color: #b22222 !important;
		box-shadow: none !important;

		&:hover {
			background: #b22222 !important;
			color: #fff !important;
		}
	}
}

#paca-help-write-input {
	width: 100%;
	min-height: 150px;
}

.paca-post-types-selector {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0.5rem 0;
	width: 100%;
	max-width: max-content;
}

.paca-learn-about-post-type-checkbox,
.paca-learn-about-select-all {
	margin-right: 0 !important;
}

.paca-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}

.paca-get-keys a {
	display: flex;
	flex-direction: column;
	max-width: max-content;
}

.paca-create-image {
	width: 100%;
	height: auto;
}

.paca-subheading {
	padding-bottom: 0 !important;
}

.paca-subheading h2 {
	margin-bottom: 0;
}

.extra-space-below {
	margin-bottom: 1rem !important;
}

.paca-textarea-wrapper {
	display: flex;
	flex-direction: column;
	align-self: flex-start;
}

.paca-char-counter {
	font-size: 11.5px;
	color: #a7aaad;
	align-self: flex-end;
	pointer-events: none;
}

.paca-license {
	margin-top: 0 !important;
	font-weight: bold;
}

.paca-license-active {
	color: #228b22;
}

.paca-license-inactive {
	color: #b22222;
}

.paca-search-post-types-selector {
	display: flex;
	flex-direction: column;
	max-width: max-content;
	gap: 0.5rem;
}

.paca-search-post-type-row {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.paca-search-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.paca-remove-from-search-label {
	margin-top: 1rem !important;
	margin-bottom: 0;
}

#paca-ai-tools-notices-mount {
	position: sticky;
	top: 0;
	z-index: 31; // Above WP notices but below modals.
	margin-left: 16px;
	margin-top: 8px;
	margin-bottom: 8px;
}

.paca-notice-button {
	border: 1px solid #000000 !important;
	background: linear-gradient(160deg, #ffffff 0%, #f5f5f5 100%) !important;
	box-shadow: none !important;
	outline: none !important;
	color: #000000 !important;

	svg {
		fill: none !important;

		&.paca-icon-close {
			fill: currentColor !important;
		}
	}

	&:hover {
		background: #000000 !important;
		color: #ffffff !important;
	}

	&.is-in-search {
		border-color: #cc1818 !important;
		color: #cc1818 !important;

		&:hover {
			background: #cc1818 !important;
			color: #ffffff !important;
		}
	}

	&.is-loading {
		opacity: 0.45 !important;
		pointer-events: none !important;
		position: relative !important;
		overflow: hidden !important;

		&::after {
			content: '';
			position: absolute;
			inset: 0;
			background: linear-gradient(
				90deg,
				transparent 0%,
				rgba(255, 255, 255, 0.7) 50%,
				transparent 100%
			);
			background-size: 200% 100%;
			animation: paca-shimmer 1.2s ease-in-out infinite;
		}
	}

	&.is-disabled {
		opacity: 0.35 !important;
		cursor: default !important;

		&:hover {
			background: linear-gradient(160deg, #ffffff 0%, #f5f5f5 100%) !important;
			color: #000000 !important;
		}
	}
}

@keyframes paca-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.paca-ai-tools-popover {
	z-index: 999 !important;

	.components-popover__content {
		border-radius: 0;
		box-shadow: none;
	}
}