/**
 * WP AI Chat Wizard - Frontend styles.
 */

.wpai-chat {
	position: fixed;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.75rem;
	transform: translateY(0);
	transition: transform 200ms cubic-bezier(0.18, 0.67, 0.45, 1), top 200ms ease, bottom 200ms ease;
}

.wpai-chat--bottom-right {
	right: 0px;
	bottom: 0px;
}

.wpai-chat--bottom-left {
	left: 0px;
	bottom: 0px;
	align-items: flex-start;
}

.wpai-chat--open .wpai-chat__launcher-group {
	display: none;
}

.wpai-chat--open.wpai-chat--docked {
	top: 0;
	bottom: 0;
	transform: none;
	height: 100vh;
	align-items: stretch;
}

.wpai-chat--open.wpai-chat--docked.wpai-chat--bottom-right {
    right: 0px;
    left: auto;
    z-index: 9999;
    position: fixed;
    top: 32px;
    height: calc(100vh - 32px);
}

.wpai-chat--open.wpai-chat--docked.wpai-chat--bottom-left {
	left: 0px;
	right: auto;
}

.wpai-chat__launcher {
	padding: 0.85rem 1.35rem;
	font-size: 0.95rem;
	font-weight: 600;
	border: 1px solid #000000;
	border-radius: 8px;
	background: #ffffff;
	color: #000000;
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wpai-chat__launcher:hover,
.wpai-chat__launcher:focus {
	transform: translateY(-2px);
	box-shadow: 0 20px 36px rgba(0, 0, 0, 0.18);
	outline: none;
}

.wpai-chat__launcher:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.wpai-chat__window {
	width: min(360px, calc(100vw - 32px));
	max-height: min(640px, calc(100vh - 48px));
	background: #ffffff;
	border: 1px solid #000000;
	border-radius: 16px;
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.96);
	pointer-events: none;
	transition: transform 220ms cubic-bezier(0.18, 0.67, 0.45, 1), opacity 180ms ease;
}

.wpai-chat__window[aria-hidden="false"],
.wpai-chat__window:not([hidden]),
.wpai-chat--open .wpai-chat__window {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	display: block !important;
}

.wpai-chat--open .wpai-chat__window {
	width: min(520px, calc(100vw - 64px));
	max-height: 100vh;
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wpai-chat__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.1rem;
	background: rgba(0, 0, 0, 0.03);
	border-bottom: 1px solid #000000;
}

.wpai-chat__header-buttons {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.wpai-chat__primary-action {
	border: 1px solid #000000;
	background: #ffffff;
	color: #000000;
	padding: 0.35rem 0.9rem;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 999px;
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease;
}

.wpai-chat__primary-action:hover {
	background: #000000;
	color: #ffffff;
}

.wpai-chat__disclaimer {
	margin: 0 1.25rem 0.75rem;
	font-size: 0.75rem;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.6);
}

.wpai-chat__header-text > strong {
	display: block;
	font-size: 1rem;
	margin-bottom: 0.25rem;
}

.wpai-chat__greeting {
	margin: 0;
	font-size: 0.875rem;
	color: rgba(0, 0, 0, 0.72);
}

.wpai-chat__header-actions {
	display: inline-flex;
	gap: 0.4rem;
}

.wpai-chat__btn {
	min-width: 2rem;
	min-height: 2rem;
	border: 1px solid #000000;
	border-radius: 8px;
	background: #ffffff;
	color: #000000;
	font-weight: 600;
	cursor: pointer;
	transition: transform 140ms ease, box-shadow 140ms ease;
}

.wpai-chat__btn:hover,
.wpai-chat__btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
	outline: none;
}

.wpai-chat__body {
	flex: 1;
	padding: 1rem 1.25rem;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
	background: #fdfdfd;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.4) transparent;
	position: relative;
	z-index: 1;
}

.wpai-chat__body::-webkit-scrollbar {
	width: 8px;
}

.wpai-chat__body::-webkit-scrollbar-track {
	background: transparent;
	margin: 0;
}

.wpai-chat__body::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 999px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

.wpai-chat__body::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.65);
}

.wpai-chat__messages {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.wpai-chat__message {
	max-width: 85%;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	line-height: 1.45;
	font-size: 0.925rem;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.wpai-chat__message--assistant {
	align-self: flex-start;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.wpai-chat__message--user {
	align-self: flex-end;
	background: #f1f1f1;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.wpai-chat__footer {
	padding: 1rem;
	background: #ffffff;
	border-top: 1px solid #000000;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	height: auto;
	position: relative;
	z-index: 2;
	flex-shrink: 0;
}

.wpai-chat__preview-panel {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	border: 1px solid #000000;
	border-radius: 14px;
	padding: 0.85rem;
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
	margin-bottom: 0.75rem;
	max-width: 280px;
	margin-left: auto;
	position: relative;
}

.wpai-chat__preview-media {
	width: 72px;
	height: 72px;
	border: 1px solid #000000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f7f7f7;
	position: relative;
	overflow: hidden;
	border-radius: 10px;
}

.wpai-chat__preview-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wpai-chat__preview-count {
	position: absolute;
	bottom: -8px;
	right: -8px;
	background: #000000;
	color: #ffffff;
	border-radius: 999px;
	padding: 0 6px;
	font-size: 0.7rem;
	border: 1px solid #ffffff;
}

.wpai-chat__preview-copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.wpai-chat__preview-title {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.wpai-chat__preview-description {
	margin: 0;
	font-size: 0.72rem;
	color: #111111;
	line-height: 1.2;
}

.wpai-chat__preview-panel > .wpai-chat__preview-media {
	align-self: flex-start;
}

.wpai-chat__preview-panel > .wpai-chat__preview-copy {
	flex: 1;
}

.wpai-chat__preview-confirm {
	width: 100%;
	padding: 0.6rem 1rem;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.25rem;
}

.wpai-chat__preview-confirm:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wpai-chat__composer {
	display: flex;
	gap: 1.15rem;
	border: 1px solid #000000;
	border-radius: 18px;
	background: #ffffff;
	padding: 1rem 1.25rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-composer][data-listing-mode='0'] .wpai-chat__upload-column {
	display: none;
}

[data-composer][data-listing-mode='0'] {
	padding: 1.25rem;
}

.wpai-chat__upload-column {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 160px;
	border-right: 1px solid #000000;
	padding-right: 1rem;
}

[data-composer][data-listing-mode='1'] .wpai-chat__upload-column {
	display: flex;
}

[data-composer][data-listing-mode='0'] .wpai-chat__upload-column {
	border-right: 0;
	padding-right: 0;
}

.wpai-chat__upload-heading {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.wpai-chat__upload-chip {
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.1rem 0.6rem;
	border: 1px solid #000000;
	border-radius: 999px;
}

.wpai-chat__upload-hint {
	margin: 0;
	font-size: 0.8rem;
	color: rgba(0, 0, 0, 0.75);
}

.wpai-chat__btn--stacked {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
	padding: 0.45rem 0.75rem;
	font-size: 0.85rem;
	border: 1px solid #000000;
	background: #ffffff;
	color: #000000;
	text-transform: uppercase;
	font-weight: 600;
}

.wpai-chat__btn--stacked svg {
	display: block;
}

.wpai-chat__btn--stacked:hover {
	background: #000000;
	color: #ffffff;
}

.wpai-chat__upload-status {
	font-size: 0.8rem;
	color: rgba(17, 24, 39, 0.8);
	min-height: 1.1rem;
}

.wpai-chat__upload-error {
	margin: 0;
	font-size: 0.82rem;
	color: #b91c1c;
	min-height: 1.2rem;
}

.wpai-chat__thumb-row {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.wpai-chat__thumb {
	width: 46px;
	height: 46px;
	border: 1px solid #000000;
	background: #fdfdfd;
	position: relative;
	padding: 0;
}

.wpai-chat__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wpai-chat__thumb-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #000000;
	color: #ffffff;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	font-size: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ffffff;
}

.wpai-chat__form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	flex: 1;
	padding-left: 0.25rem;
}

.wpai-chat__prompt-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #000000;
}

.wpai-chat__attachment-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wpai-chat__attachment {
	position: relative;
	border: 1px solid rgba(15, 23, 42, 0.15);
	border-radius: 10px;
	background: #ffffff;
	width: 88px;
	padding: 0.45rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.wpai-chat__attachment.is-uploading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 10px;
	backdrop-filter: blur(2px);
}

.wpai-chat__attachment.is-uploading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px;
	border-radius: 50%;
	border: 2px solid rgba(15, 23, 42, 0.2);
	border-top-color: rgba(15, 23, 42, 0.7);
	animation: wpai-spin 1s linear infinite;
	z-index: 1;
}

.wpai-chat__attachment-media {
	width: 100%;
	padding-top: 70%;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: rgba(15, 23, 42, 0.05);
}

.wpai-chat__attachment-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wpai-chat__attachment-name {
	font-size: 0.7rem;
	color: rgba(17, 24, 39, 0.75);
	line-height: 1.3;
	word-break: break-word;
}

.wpai-chat__attachment-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	font-size: 0.9rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.wpai-chat__attachment-remove:hover,
.wpai-chat__attachment-remove:focus-visible {
	background: rgba(0, 0, 0, 0.65);
}

.wpai-chat__message-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.5rem;
}

.wpai-chat__message-attachment {
	width: 86px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 10px;
	overflow: hidden;
	background: rgba(15, 23, 42, 0.02);
	cursor: pointer;
	transition: transform 120ms ease, box-shadow 120ms ease;
}

.wpai-chat__message-attachment img {
	width: 100%;
	height: 64px;
	object-fit: cover;
	display: block;
}

.wpai-chat__message-attachment figcaption {
	margin: 0;
	padding: 0.35rem 0.45rem;
	font-size: 0.7rem;
	text-align: center;
	color: rgba(17, 24, 39, 0.8);
}

.wpai-chat__message-attachment-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	font-size: 1.2rem;
}

.wpai-chat__message-attachment:hover,
.wpai-chat__message-attachment:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
}

.wpai-chat__auth-gate {
	margin-bottom: 0.5rem;
	display: flex;
	justify-content: center;
}

.wpai-chat__auth-panel {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.09);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 24px 52px rgba(15, 23, 42, 0.12);
	backdrop-filter: blur(3px);
	animation: wpai-fade-up 220ms ease-out;
}

.wpai-chat__auth-message {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: rgba(17, 24, 39, 0.9);
	line-height: 1.5;
}

.wpai-chat__auth-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.wpai-chat__btn--auth {
	flex: 1 1 auto;
	justify-content: center;
}

.wpai-chat__btn--primary {
	background: #000000;
	color: #ffffff;
	border-color: #000000;
}

.wpai-chat__btn--primary:hover,
.wpai-chat__btn--primary:focus-visible {
	color: #ffffff;
}

.wpai-chat__btn--ghost {
	background: transparent;
	color: rgba(17, 24, 39, 0.8);
	border-color: rgba(17, 24, 39, 0.24);
}

.wpai-chat__btn--ghost:hover,
.wpai-chat__btn--ghost:focus-visible {
	color: rgba(17, 24, 39, 1);
	border-color: rgba(17, 24, 39, 0.4);
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.wpai-chat__auth-step {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 14px;
	background: rgba(249, 250, 251, 0.92);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.wpai-chat__auth-step-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: rgba(17, 24, 39, 0.9);
}

.wpai-chat__auth-step-input {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid rgba(15, 23, 42, 0.18);
	border-radius: 10px;
	font-size: 0.95rem;
	font-family: inherit;
	color: rgba(17, 24, 39, 0.9);
	background: #ffffff;
}

.wpai-chat__auth-step-input:focus {
	outline: none;
	border-color: rgba(15, 23, 42, 0.65);
	box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2);
}

.wpai-chat__auth-step-hint {
	margin: -0.3rem 0 0;
	font-size: 0.8rem;
	color: rgba(17, 24, 39, 0.55);
}

.wpai-chat__auth-step-actions {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
}

.wpai-chat__auth-step-error {
	min-height: 1.1rem;
	margin: 0;
	font-size: 0.85rem;
	color: #b91c1c;
}

.wpai-chat__auth-summary {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.wpai-chat__auth-summary-head {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.wpai-chat__auth-summary-title {
	font-size: 1rem;
	font-weight: 700;
	color: rgba(17, 24, 39, 0.95);
}

.wpai-chat__auth-summary-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: rgba(17, 24, 39, 0.6);
}

.wpai-chat__auth-form {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 0.75rem 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wpai-chat__auth-form:first-of-type {
	border-top: none;
	padding-top: 0;
}

.wpai-chat__auth-form-actions {
	display: flex;
	justify-content: flex-end;
}

.wpai-chat__auth-form .wpai-chat__login-input,
.wpai-chat__auth-form .wpai-chat__register-input {
	width: 100%;
}

.wpai-chat__auth-form .wpai-chat__login-label,
.wpai-chat__auth-form .wpai-chat__register-label {
	text-align: left;
}

.wpai-chat__auth-summary-actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
}

.wpai-chat__auth-summary-error {
	min-height: 1rem;
	margin: 0;
	font-size: 0.85rem;
	color: #b91c1c;
}

.wpai-chat__input {
	width: 100%;
	min-height: 78px;
	padding: 0.9rem 1rem;
	border: 1px solid #000000;
	border-radius: 0;
	resize: vertical;
	font-size: 0.95rem;
	font-family: inherit;
	color: #000000;
	background: #ffffff;
}

.wpai-chat__input:focus {
	outline: none;
	box-shadow: inset 0 0 0 2px #111111;
}

.wpai-chat__form-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.25rem;
}

.wpai-chat__btn--send {
	border: 1px solid #000000;
	background: #000000;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wpai-chat__btn--send:hover {
	background: #ffffff;
	color: #000000;
}

@media (max-width: 640px) {
	.wpai-chat__composer {
		flex-direction: column;
	}

	.wpai-chat__upload-column {
		width: 100%;
		border-right: 0;
		border-bottom: 1px solid #000000;
		padding-right: 0;
		padding-bottom: 0.75rem;
	}

	.wpai-chat__composer {
		padding: 1rem;
	}
}

.wpai-chat__btn--send {
	padding: 0.6rem 1.25rem;
	font-size: 0.9rem;
}

.wpai-chat__launcher-group {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: stretch;
}

.wpai-chat__launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wpai-chat__launcher-icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.wpai-chat__launcher--login,
.wpai-chat__launcher--register {
	font-size: 0.9rem;
	padding: 0.7rem 1.1rem;
	justify-content: center;
	text-align: center;
}

.wpai-chat__window--typing::after {
	content: '';
	display: block;
	width: 44px;
	height: 4px;
	background: rgba(0, 0, 0, 0.12);
	border-radius: 999px;
	margin: 0.5rem auto 0;
	animation: wpai-pulse 1.4s ease-in-out infinite;
}

.wpai-chat__login {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	backdrop-filter: blur(3px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease;
}

.wpai-chat__login[aria-hidden="false"],
.wpai-chat__login:not([hidden]) {
	opacity: 1;
	pointer-events: auto;
}

.wpai-chat__login-card {
	width: min(420px, calc(100vw - 48px));
	background: #ffffff;
	border: 1px solid #000000;
	border-radius: 16px;
	padding: 1.6rem;
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
}

.wpai-chat__login-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
}

.wpai-chat__login-header h2 {
	margin: 0;
	font-size: 1.2rem;
}

.wpai-chat__login-intro {
	margin: 0;
	font-size: 0.925rem;
	color: rgba(0, 0, 0, 0.75);
}

.wpai-chat__login-form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.wpai-chat__login-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
}

.wpai-chat__login-input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 0.95rem;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	font-family: inherit;
}

.wpai-chat__login-input:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.75);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.wpai-chat__login-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.wpai-chat__login-error {
	min-height: 1.25rem;
	margin: 0;
	font-size: 0.85rem;
	color: #be123c;
}

.wpai-chat__register {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	backdrop-filter: blur(3px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease;
}

.wpai-chat__register[aria-hidden="false"],
.wpai-chat__register:not([hidden]) {
	opacity: 1;
	pointer-events: auto;
}

.wpai-chat__register-card {
	width: min(420px, calc(100vw - 48px));
	background: #ffffff;
	border: 1px solid #000000;
	border-radius: 16px;
	padding: 1.6rem;
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.wpai-chat__register-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
}

.wpai-chat__register-header h2 {
	margin: 0;
	font-size: 1.2rem;
}

.wpai-chat__register-intro {
	margin: 0;
	font-size: 0.925rem;
	color: rgba(0, 0, 0, 0.75);
}

.wpai-chat__register-form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.wpai-chat__register-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
}

.wpai-chat__register-input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 0.95rem;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	font-family: inherit;
}

.wpai-chat__register-input:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.75);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.wpai-chat__register-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.wpai-chat__register-error {
	min-height: 1.25rem;
	margin: 0;
	font-size: 0.85rem;
	color: #be123c;
}

.wpai-chat__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.65rem;
}

.wpai-chat__choice {
	padding: 0.45rem 0.95rem;
	border: 1px solid #000000;
	border-radius: 999px;
	background: #ffffff;
	color: #000000;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 140ms ease, box-shadow 140ms ease;
}

.wpai-chat__choice:hover,
.wpai-chat__choice:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
	outline: none;
}

.wpai-chat__inline-form {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
	align-items: center;
}

.wpai-chat__inline-form input {
	flex: 1;
	padding: 0.6rem 0.85rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	font-size: 0.95rem;
	font-family: inherit;
}

.wpai-chat__inline-form input:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.75);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.wpai-chat__btn--inline {
	padding: 0.55rem 1.05rem;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 8px;
	border: 1px solid #000000;
	background: #ffffff;
	color: #000000;
	cursor: pointer;
}

.wpai-chat__product-list {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin-top: 0.35rem;
}

.wpai-chat__product-card {
	display: flex;
	gap: 0.85rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.wpai-chat__product-card-media img {
	width: 74px;
	height: 74px;
	object-fit: cover;
	border-radius: 10px;
}

.wpai-chat__product-card-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.wpai-chat__product-card-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.9);
}

.wpai-chat__product-card-badge {
	display: inline-block;
	align-self: flex-start;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background: #0f8b8d;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.wpai-chat__product-card-price {
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
}

.wpai-chat__product-card-desc {
	margin: 0;
	font-size: 0.85rem;
	color: rgba(0, 0, 0, 0.6);
}

.wpai-chat__product-card-actions {
	margin-top: 0.35rem;
}

.wpai-chat__product-card-actions a {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
	text-decoration: underline;
}

.wpai-chat__message--rich {
	background: transparent;
	box-shadow: none;
}

.wpai-chat__auth-panel,
.wpai-chat__auth-step,
.wpai-chat__auth-summary {
	animation: wpai-fade-up 200ms ease-out;
}

@keyframes wpai-pulse {
	0%, 100% {
		transform: scaleX(0.85);
		opacity: 0.5;
	}
	50% {
		transform: scaleX(1);
		opacity: 1;
	}
}

@keyframes wpai-fade-up {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes wpai-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 782px) {
	.wpai-chat {
		left: 0;
		right: 0;
		bottom: 0;
		align-items: stretch;
	}

	.wpai-chat__launcher {
		align-self: flex-end;
		margin: 0 1rem 1rem;
	}

	.wpai-chat--open.wpai-chat--docked {
		top: auto;
		bottom: 0;
		transform: none;
	}

	.wpai-chat__window {
		position: fixed;
		inset: 0;
		width: 100vw;
		max-height: 100vh;
		border-radius: 0;
		box-shadow: none;
		transform: translateY(100%);
		transition: transform 200ms cubic-bezier(0.18, 0.67, 0.45, 1), opacity 200ms ease;
	}

	.wpai-chat__window[aria-hidden="false"],
	.wpai-chat__window:not([hidden]) {
		transform: translateY(0);
	}

	.wpai-chat--open .wpai-chat__window {
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
	}

	.wpai-chat__body {
		padding: 1rem;
	}

	.wpai-chat__login {
		padding: 1.5rem;
	}

	.wpai-chat__login-card {
		width: 100%;
		min-height: 100%;
		border-radius: 0;
		justify-content: center;
	}

	.wpai-chat__register {
		padding: 1.5rem;
	}

	.wpai-chat__register-card {
		width: 100%;
		min-height: 100%;
		border-radius: 0;
		justify-content: center;
	}
}
