@use "@automattic/jetpack-base-styles/root-variables";

.jetpack-ai-logo-generator__prompt {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: var(--font-body-small);

	.components-button {

		&:focus:not(:disabled):not(.is-primary) {
			box-shadow: 0 0 0 2px var(--color-link, #3858e9);
		}

		&.is-link {
			text-decoration: none;

			&:not(:disabled) {
				color: var(--color-link, #3858e9);
			}
		}
	}
}

.jetpack-ai-logo-generator__prompt-header {
	display: flex;
	gap: 16px;
	align-items: center;

	.jetpack-ai-logo-generator__prompt-label {
		font-weight: 500;
		flex-grow: 1;
	}

	.jetpack-ai-logo-generator__prompt-actions {
		display: flex;
		font-size: var(--font-body-extra-small);
		line-height: 20px;

		.jetpack-ai-logo-generator-icon {
			margin-right: 4px;
			// the svg icon with this class has no fill, only paths
			stroke: currentColor;
		}
	}
}

.jetpack-ai-image-generator__prompt-query {
	display: flex;
	padding: 8px 8px 8px var(--grid-unit-15, 16px);
	justify-content: space-between;
	align-items: flex-end;
	align-self: stretch;
	border-radius: calc(4px * 2);
	border: 1px solid var(--studio-gray-10, #ccc);
	background: var(--studio-white, #fff);
	gap: 8px;

	@media (min-width: 700px) {
		gap: 48px;
	}

	.prompt-query__input {
		border: 0;
		resize: none;
		flex-grow: 1;
		padding: 6px 0;
		vertical-align: baseline;
		color: var(--studio-gray-100);
		line-height: 1.6;
		overflow-wrap: break-word;

		&:focus,
		&:active {
			outline: 0;
		}

		&[contentEditable="false"] {
			color: var(--studio-gray-50, #646970);
		}

		&:not([contentEditable="false"]) {
			cursor: text;
		}

		&[data-placeholder]:empty::before {
			content: attr(data-placeholder);
			color: var(--studio-gray-50, #646970);
		}

		&[data-placeholder]:empty:focus:not([contentEditable="false"])::before {
			content: "";
		}
	}
}

.jetpack-ai-logo-generator__prompt-footer {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.jetpack-ai-logo-generator__prompt-requests {
	color: var(--studio-gray-50, #646970);
	font-size: var(--font-body-extra-small);
	line-height: 21px;
	display: flex;

	.prompt-footer__icon {
		height: 20px;
		width: 20px;

		path {
			fill: var(--studio-gray-20, #a7aaad);
		}
	}
}

.jetpack-ai-logo-generator__prompt-error {
	color: var(--studio-red-50, #d63638);
	font-size: var(--font-body-extra-small);
	line-height: 21px;
}
