/**
 * Hey! Feedback — Frontend Styles
 */

.hey-feedback-widget {
	--hfb-primary: #2271b1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 16px;
	margin: 12px 0;
	max-width: 400px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hey-feedback-widget *,
.hey-feedback-widget *::before,
.hey-feedback-widget *::after {
	box-sizing: inherit;
}

/* Header */
.hey-feedback-header {
	margin-bottom: 12px;
}

.hey-feedback-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: #1e1e1e;
}

.hey-feedback-description {
	font-size: 13px;
	color: #666;
	margin: 0;
}

/* Shared button reset */
.hey-feedback-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid #ddd;
	background: #fafafa;
	border-radius: 6px;
	padding: 8px 16px;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
	color: #333;
	font-family: inherit;
}

.hey-feedback-btn:hover {
	background: #f0f0f0;
	border-color: #bbb;
}

.hey-feedback-btn:active {
	transform: scale(0.97);
}

.hey-feedback-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Like / Dislike */
.hey-feedback-like-dislike {
	display: flex;
	gap: 10px;
}

.hey-feedback-icon {
	font-size: 18px;
}

.hey-feedback-btn-like:hover {
	background: #e8f5e9;
	border-color: #66bb6a;
}

.hey-feedback-btn-dislike:hover {
	background: #ffebee;
	border-color: #ef5350;
}

/* Emoji */
.hey-feedback-emoji {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.hey-feedback-emoji-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	font-size: 24px;
	border: 1px solid #eee;
	background: transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.15s, background 0.15s;
	padding: 0;
	font-family: inherit;
}

.hey-feedback-emoji-btn:hover {
	transform: scale(1.2);
	background: #f5f5f5;
}

.hey-feedback-emoji-btn:active {
	transform: scale(1.1);
}

.hey-feedback-emoji-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Star Rating */
.hey-feedback-stars {
	display: flex;
	gap: 4px;
}

.hey-feedback-star {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	font-size: 24px;
	border: none;
	background: transparent;
	cursor: pointer;
	color: #ccc;
	transition: color 0.15s, transform 0.1s;
	padding: 0;
	font-family: inherit;
}

.hey-feedback-star:hover {
	transform: scale(1.15);
}

.hey-feedback-star--active {
	color: #f5a623;
}

.hey-feedback-star:disabled {
	cursor: not-allowed;
	transform: none;
}

/* NPS */
.hey-feedback-nps {
	text-align: center;
}

.hey-feedback-nps-question {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 10px 0;
	color: #333;
}

.hey-feedback-nps-scale {
	display: flex;
	gap: 2px;
	justify-content: center;
	flex-wrap: wrap;
}

.hey-feedback-nps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	font-size: 13px;
	font-weight: 500;
	border: 1px solid #ddd;
	background: #fafafa;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	color: #555;
	padding: 0;
	font-family: inherit;
}

.hey-feedback-nps-btn:hover {
	background: var(--hfb-primary);
	border-color: var(--hfb-primary);
	color: #fff;
}

.hey-feedback-nps-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.hey-feedback-nps-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 11px;
	color: #999;
}

/* Text Feedback */
.hey-feedback-text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hey-feedback-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.5;
	resize: vertical;
	min-height: 80px;
	color: #333;
	background: #fafafa;
	transition: border-color 0.15s;
}

.hey-feedback-textarea:focus {
	outline: none;
	border-color: var(--hfb-primary);
	background: #fff;
}

.hey-feedback-textarea::placeholder {
	color: #aaa;
}

.hey-feedback-submit-btn {
	align-self: flex-end;
	background: var(--hfb-primary);
	color: #fff;
	border-color: var(--hfb-primary);
	padding: 8px 20px;
	font-weight: 500;
}

.hey-feedback-submit-btn:hover {
	background: color-mix(in srgb, var(--hfb-primary) 85%, #000);
	border-color: color-mix(in srgb, var(--hfb-primary) 85%, #000);
}

/* Quick Choice */
.hey-feedback-quick-choice-question {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 10px 0;
	color: #333;
}

.hey-feedback-quick-choice-options {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.hey-feedback-choice-btn {
	padding: 8px 14px;
	font-size: 13px;
}

.hey-feedback-choice-btn:hover {
	background: color-mix(in srgb, var(--hfb-primary) 10%, #fff);
	border-color: var(--hfb-primary);
	color: var(--hfb-primary);
}

/* Thank You */
.hey-feedback-thank-you {
	text-align: center;
	padding: 12px 0;
}

.hey-feedback-thank-you-icon {
	display: inline-block;
	font-size: 28px;
	color: #22c55e;
	margin-bottom: 6px;
}

.hey-feedback-thank-you p {
	margin: 0;
	font-size: 14px;
	color: #333;
}

.hey-feedback-error {
	margin: 8px 0 0;
	font-size: 12px;
	color: #d63638;
}

/* Close button (shared) */
.hey-feedback-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	padding: 0;
	font-family: inherit;
}

.hey-feedback-close:hover {
	background: #f0f0f0;
	color: #333;
}

/* =========================
   Floating Button + Panel
   ========================= */
.hey-feedback-floating {
	position: fixed;
	z-index: 99999;
}

.hey-feedback-floating--bottom-right {
	bottom: 20px;
	right: 20px;
}

.hey-feedback-floating--bottom-left {
	bottom: 20px;
	left: 20px;
}

.hey-feedback-floating-trigger {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--hfb-primary);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	transition: transform 0.2s, box-shadow 0.2s;
	padding: 0;
	font-family: inherit;
}

.hey-feedback-floating-trigger:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hey-feedback-floating-panel {
	position: absolute;
	bottom: 68px;
	width: 360px;
	max-height: 500px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 12px;
	opacity: 0;
	transform: translateY(10px) scale(0.95);
	pointer-events: none;
	transition: opacity 0.25s, transform 0.25s;
}

.hey-feedback-floating--bottom-right .hey-feedback-floating-panel {
	right: 0;
}

.hey-feedback-floating--bottom-left .hey-feedback-floating-panel {
	left: 0;
}

.hey-feedback-floating--open .hey-feedback-floating-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.hey-feedback-floating--open .hey-feedback-floating-trigger {
	background: color-mix(in srgb, var(--hfb-primary) 85%, #000);
}

.hey-feedback-floating-panel .hey-feedback-widget {
	border: none;
	box-shadow: none;
	margin: 0;
	padding: 8px 4px;
	max-width: none;
}

/* =========================
   Popup (Modal Overlay)
   ========================= */
.hey-feedback-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s;
}

.hey-feedback-popup-overlay--visible {
	background: rgba(0, 0, 0, 0.4);
}

.hey-feedback-popup {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	padding: 20px;
	max-width: 440px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	opacity: 0;
	transform: scale(0.9) translateY(20px);
	transition: opacity 0.3s, transform 0.3s;
}

.hey-feedback-popup-overlay--visible .hey-feedback-popup {
	opacity: 1;
	transform: scale(1) translateY(0);
}

.hey-feedback-popup .hey-feedback-widget {
	border: none;
	box-shadow: none;
	margin: 0;
	padding: 0;
	max-width: none;
}

/* =========================
   Slide-in Panel
   ========================= */
.hey-feedback-slide-in {
	position: fixed;
	z-index: 99999;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	padding: 20px;
	max-width: 400px;
	width: 100%;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.hey-feedback-slide-in--bottom-right {
	bottom: 20px;
	right: 20px;
}

.hey-feedback-slide-in--bottom-left {
	bottom: 20px;
	left: 20px;
}

.hey-feedback-slide-in--visible {
	transform: translateY(0);
}

.hey-feedback-slide-in .hey-feedback-widget {
	border: none;
	box-shadow: none;
	margin: 0;
	padding: 0;
	max-width: none;
}

/* Honeypot — off-screen, invisible to humans */
.hey-feedback-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 0;
	width: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}


/* =========================
   Mobile adjustments
   ========================= */
@media (max-width: 480px) {
	.hey-feedback-floating-panel {
		width: calc(100vw - 40px);
		right: auto;
		left: 50%;
		transform: translateX(-50%) translateY(10px) scale(0.95);
	}

	.hey-feedback-floating--open .hey-feedback-floating-panel {
		transform: translateX(-50%) translateY(0) scale(1);
	}

	.hey-feedback-slide-in {
		right: 0;
		left: 0;
		max-width: none;
		border-radius: 12px 12px 0 0;
	}

	.hey-feedback-popup {
		width: 95%;
	}
}
