/*
 * AI Prompt Card styles.
 * Font-family and text color are intentionally left to inherit from the
 * active WordPress theme wherever possible, so the widget blends in
 * instead of fighting the theme's typography. Elementor Style-tab
 * controls (Typography / Color groups) can still override any of this
 * per-instance without editing this file.
 */

.apc-card {
	--apc-radius: 18px;
	max-width: 700px;
	margin: 0 auto;
	background-color: transparent; /* inherits the theme/section background unless set in the Style tab */
	border-radius: var(--apc-radius);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05), 0 12px 30px rgba(0, 0, 0, 0.09);
	font-family: inherit;
	color: inherit;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.apc-title {
	margin: 0;
	padding: 24px 24px 6px;
	font-family: inherit;
	color: inherit;
	letter-spacing: -0.01em;
	/* No font-size/weight here on purpose — the chosen heading tag
	   (h1–h6) already picks up the theme's heading styles. */
}

.apc-body {
	padding: 24px;
}

.apc-prompt-box {
	position: relative;
	background: rgba(127, 127, 127, 0.06);
	border: 1px solid rgba(127, 127, 127, 0.18);
	border-radius: 14px;
	padding: 18px 20px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.75;
	color: inherit;
	margin-bottom: 20px;
	word-wrap: break-word;
	white-space: pre-wrap;
	max-height: 320px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(127, 127, 127, 0.4) transparent;
}

.apc-prompt-box::-webkit-scrollbar {
	width: 6px;
}

.apc-prompt-box::-webkit-scrollbar-track {
	background: transparent;
}

.apc-prompt-box::-webkit-scrollbar-thumb {
	background-color: rgba(127, 127, 127, 0.4);
	border-radius: 10px;
}

.apc-buttons {
	display: flex;
}

.apc-btn {
	flex: 1 1 auto;
	width: 100%;
	border: none;
	cursor: pointer;
	color: #fff;
	font-family: inherit; /* buttons don't inherit font-family by default in most browsers */
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 17px 22px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 8px 20px -6px rgba(124, 58, 237, 0.55);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.apc-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px -6px rgba(124, 58, 237, 0.6);
	filter: brightness(1.06);
}

.apc-btn:active {
	transform: translateY(0) scale(0.97);
	box-shadow: 0 4px 10px -4px rgba(124, 58, 237, 0.5);
}

.apc-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.apc-btn .apc-icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.apc-btn .apc-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

.apc-btn-label {
	line-height: 1;
}

.apc-btn-1 {
	/* Fallback if Elementor's Background control hasn't rendered inline
	   styles yet (e.g. very first paint) — the Style tab's Button
	   Background control (solid or gradient) overrides this. */
	background: linear-gradient(135deg, #7c3aed, #ec4899);
}

/* Toast shown after copying */
.apc-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background: #1a1a1a;
	color: #fff;
	font-family: inherit;
	padding: 11px 20px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 99999;
}

.apc-toast.apc-toast-show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ---------------- Responsive breakpoints ---------------- */

/* Tablets */
@media (max-width: 640px) {
	.apc-title {
		padding: 20px 20px 4px;
	}
	.apc-body {
		padding: 20px;
	}
	.apc-prompt-box {
		padding: 16px 18px;
		max-height: 280px;
	}
}

/* Phones */
@media (max-width: 480px) {
	.apc-card {
		--apc-radius: 14px;
	}
	.apc-btn {
		padding: 15px 18px;
		font-size: 14px;
	}
	.apc-body {
		padding: 16px;
	}
	.apc-title {
		padding: 18px 16px 4px;
	}
	.apc-prompt-box {
		font-size: 13.5px;
		max-height: 240px;
	}
}
