/* PREMIO AI Assistant widget -- reuses the theme's own --premio-* custom properties (defined
   globally in style.css :root) and Poppins typography, so this never looks like a bolted-on
   generic chat plugin. Quiet when closed: just the launcher, no auto-open, no attention animation. */

.premio-ai-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	font-family: "Poppins", sans-serif;
}

.premio-ai-launcher {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--premio-navy, #102033);
	color: var(--premio-cyan, #80CFE3);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(16, 32, 51, 0.35);
	transition: transform 0.15s ease;
}
.premio-ai-launcher:hover { transform: scale(1.05); }

.premio-ai-panel {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--premio-white, #fff);
	border: 1px solid var(--premio-light-grey, #E5E5E5);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(16, 32, 51, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
/* The [hidden] attribute's default UA-stylesheet "display: none" loses to the class rule above
   (same specificity, author CSS always wins over the UA stylesheet) -- so closing the panel sets
   the attribute correctly but it stayed visually open. This rule restores the actual hiding. */
.premio-ai-panel[hidden] {
	display: none;
}

.premio-ai-panel__header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	background: var(--premio-navy, #102033);
	color: var(--premio-white, #fff);
}
.premio-ai-panel__title { font-weight: 600; font-size: 15px; flex: 1; }
.premio-ai-panel__new,
.premio-ai-panel__close {
	background: transparent;
	border: none;
	color: var(--premio-cyan, #80CFE3);
	cursor: pointer;
	font-size: 13px;
}
.premio-ai-panel__close {
	font-size: 20px;
	line-height: 1;
	min-width: 32px;
	min-height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	flex-shrink: 0;
}
.premio-ai-panel__close:hover,
.premio-ai-panel__close:active { background: rgba(255, 255, 255, 0.12); }

.premio-ai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--premio-white, #fff);
}

.premio-ai-bubble {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.5;
	white-space: pre-wrap;
}
.premio-ai-bubble--assistant {
	align-self: flex-start;
	background: var(--premio-light-grey, #E5E5E5);
	color: var(--premio-navy, #102033);
	border-bottom-left-radius: 2px;
}
.premio-ai-bubble--user {
	align-self: flex-end;
	background: var(--premio-cyan, #80CFE3);
	color: var(--premio-navy, #102033);
	border-bottom-right-radius: 2px;
}
.premio-ai-bubble--pending { opacity: 0.6; }

.premio-ai-starters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.premio-ai-starter {
	border: 1px solid var(--premio-cyan, #80CFE3);
	background: var(--premio-white, #fff);
	color: var(--premio-navy, #102033);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12.5px;
	cursor: pointer;
}
.premio-ai-starter:hover { background: var(--premio-light-grey, #E5E5E5); }

.premio-ai-card {
	display: flex;
	gap: 10px;
	border: 1px solid var(--premio-light-grey, #E5E5E5);
	border-radius: 10px;
	padding: 10px;
	align-self: stretch;
}
.premio-ai-card__img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.premio-ai-card__body { flex: 1; min-width: 0; }
.premio-ai-card__name { font-weight: 600; font-size: 13px; margin: 0 0 2px; color: var(--premio-navy, #102033); }
.premio-ai-card__model { font-size: 11.5px; color: var(--premio-grey, #808080); margin: 0 0 4px; }
.premio-ai-card__specs { list-style: none; margin: 0 0 6px; padding: 0; font-size: 11.5px; color: var(--premio-grey, #808080); }
.premio-ai-card__price { font-weight: 600; font-size: 13px; color: var(--premio-navy, #102033); margin: 0 0 6px; }
.premio-ai-card__add {
	background: var(--premio-cyan, #80CFE3);
	color: var(--premio-navy, #102033);
	border: none;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.premio-ai-card__add:disabled { opacity: 0.6; cursor: default; }

.premio-ai-summary {
	border: 1px solid var(--premio-cyan, #80CFE3);
	border-radius: 10px;
	padding: 10px;
	background: var(--premio-white, #fff);
}
.premio-ai-summary__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; color: var(--premio-navy, #102033); }
.premio-ai-summary__row img { width: 32px; height: 32px; object-fit: contain; }
.premio-ai-summary__row span { flex: 1; }
.premio-ai-summary__cta {
	display: block;
	text-align: center;
	margin-top: 8px;
	background: var(--premio-navy, #102033);
	color: var(--premio-white, #fff);
	text-decoration: none;
	border-radius: 8px;
	padding: 10px;
	font-weight: 600;
	font-size: 13px;
}

.premio-ai-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--premio-light-grey, #E5E5E5);
}
.premio-ai-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.premio-ai-input {
	flex: 1;
	resize: none;
	border: 1px solid var(--premio-light-grey, #E5E5E5);
	border-radius: 8px;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 13px;
	max-height: 70px;
}
.premio-ai-send {
	background: var(--premio-navy, #102033);
	color: var(--premio-white, #fff);
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 480px) {
	.premio-ai-widget { right: 12px; bottom: 12px; }
	.premio-ai-panel {
		width: calc(100vw - 24px);
		/* Deliberately NOT near-fullscreen -- stays a clearly bounded card so the page behind it
		   is still visible and it doesn't feel like a takeover. */
		height: min(70vh, 480px);
		bottom: 66px;
	}
	.premio-ai-launcher { width: 50px; height: 50px; }
}
