.ai-congrats-widget {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	margin: 24px 0;
	background: #fafafa;
	position: relative;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-congrats-open-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	background: #2563eb;
	color: #ffffff;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s ease, transform 0.1s ease;
}

.ai-congrats-open-btn:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
}

.ai-congrats-open-btn:active {
	transform: translateY(0);
}

.ai-congrats-form {
	margin-top: 16px;
	display: none;
}

.ai-congrats-form.ai-congrats-form--visible {
	display: block;
}

.ai-congrats-row {
	margin-bottom: 12px;
}

.ai-congrats-row label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	color: #374151;
}

.ai-congrats-select,
.ai-congrats-textarea,
.ai-congrats-input {
	width: 100%;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	font-size: 14px;
	box-sizing: border-box;
	background: #ffffff;
}

.ai-congrats-input {
	margin-top: 6px;
}

.ai-congrats-input--custom {
	display: none; /* по умолчанию скрыто, показываем при выборе "Свой вариант…" */
}

.ai-congrats-textarea {
	min-height: 80px;
	resize: vertical;
}

.ai-congrats-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

.ai-congrats-generate-btn {
	padding: 9px 18px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	background: #16a34a;
	color: #ffffff;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s ease, transform 0.1s ease;
}

.ai-congrats-generate-btn:hover:not([disabled]) {
	background: #15803d;
	transform: translateY(-1px);
}

.ai-congrats-generate-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.ai-congrats-remaining {
	font-size: 12px;
	color: #6b7280;
}

.ai-congrats-remaining-unlimited {
	color: #059669;
	font-weight: 500;
}

.ai-congrats-message {
	margin-top: 8px;
	font-size: 13px;
	min-height: 18px;
}

.ai-congrats-message--error {
	color: #b91c1c;
}

.ai-congrats-message--success {
	color: #047857;
}

.ai-congrats-result-wrapper {
	margin-top: 14px;
	border-top: 1px dashed #e5e7eb;
	padding-top: 10px;
}

.ai-congrats-result-title {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
	color: #111827;
}

.ai-congrats-result {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Карточки вариантов */
.ai-congrats-variant {
	position: relative;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	padding: 10px 12px 40px;
	font-size: 14px;
	line-height: 1.5;
}

.ai-congrats-variant-text {
	white-space: pre-line;
	color: #111827;
}

.ai-congrats-copy-btn {
	position: absolute;
	right: 10px;
	bottom: 8px;
	border: none;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	background: #f3f4f6;
	color: #374151;
	transition: background 0.15s ease, transform 0.1s ease;
}

.ai-congrats-copy-btn:hover {
	background: #e5e7eb;
	transform: translateY(-1px);
}

.ai-congrats-copy-btn:active {
	transform: translateY(0);
}

/* Фиксированная кнопка для мобилок */
.ai-congrats-mobile-btn {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 9999;
	padding: 12px;
	border-radius: 999px;
	border: none;
	background: #2563eb;
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	text-align: center;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
	display: none;
	cursor: pointer;
}

/* Только на узких экранах показываем кнопку снизу */
@media (max-width: 768px) {
	.ai-congrats-mobile-btn {
		display: block;
	}
}

/* Чтобы фиксированная кнопка не перекрывала футер */
body {
	padding-bottom: 60px;
}

@media (min-width: 769px) {
	body {
		padding-bottom: 0;
	}
}


.ai-congrats-input--custom::placeholder {
    color: #ccc !important;
    opacity: 1 !important;
}