/* Exit Survey Popup — digtiali-core */

#dg-exit-survey-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.25s ease;
	direction: rtl;
}

#dg-exit-survey-overlay.is-active {
	opacity: 1;
}

.dg-es-modal {
	background: #171718;
	border: 1px solid rgba(147, 51, 234, 0.3);
	border-radius: 16px;
	padding: 32px 28px 28px;
	width: 100%;
	max-width: 440px;
	position: relative;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
	transform: translateY(12px);
	transition: transform 0.25s ease;
}

#dg-exit-survey-overlay.is-active .dg-es-modal {
	transform: translateY(0);
}

/* Close button */
.dg-es-close {
	position: absolute;
	top: 14px;
	left: 14px;
	background: none;
	border: none;
	color: #888;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.15s, background 0.15s;
}

.dg-es-close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

/* Progress dots */
.dg-es-progress {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-bottom: 20px;
}

.dg-es-progress-step {
	width: 28px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.15);
	transition: background 0.3s ease;
}

.dg-es-progress-step.is-active {
	background: #9333ea;
}

/* Title + subtitle */
.dg-es-title {
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.4;
}

.dg-es-sub {
	color: #888;
	font-size: 13px;
	margin: 0 0 20px;
}

/* Step 1 — option cards */
.dg-es-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dg-es-option {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	color: #e2e8f0;
	font-size: 14px;
	padding: 12px 16px;
	text-align: right;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
	font-family: inherit;
}

.dg-es-option:hover {
	background: rgba(147, 51, 234, 0.15);
	border-color: rgba(147, 51, 234, 0.5);
	transform: translateX(-2px);
}

.dg-es-option:active {
	transform: translateX(0);
}

/* Step 2 — stars */
.dg-es-stars {
	display: flex;
	flex-direction: row-reverse;
	justify-content: center;
	gap: 8px;
	margin: 8px 0 20px;
}

.dg-es-star {
	background: none;
	border: none;
	font-size: 32px;
	color: rgba(255, 255, 255, 0.2);
	cursor: pointer;
	padding: 4px;
	transition: color 0.15s, transform 0.1s;
	font-family: inherit;
	line-height: 1;
}

.dg-es-star.is-selected,
.dg-es-star.is-hover {
	color: #f59e0b;
}

.dg-es-star:hover {
	transform: scale(1.15);
}

/* Shared button */
.dg-es-btn {
	width: 100%;
	padding: 13px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	font-family: inherit;
	transition: opacity 0.15s, transform 0.1s;
}

.dg-es-btn:active {
	transform: scale(0.98);
}

.dg-es-btn-next {
	background: #9333ea;
	color: #fff;
}

.dg-es-btn-next:disabled {
	background: rgba(147, 51, 234, 0.3);
	color: rgba(255, 255, 255, 0.4);
	cursor: not-allowed;
	transform: none;
}

.dg-es-btn-submit {
	background: #9333ea;
	color: #fff;
}

.dg-es-btn-submit:hover {
	opacity: 0.9;
}

/* Step 3 — textarea + actions */
.dg-es-textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	color: #e2e8f0;
	font-size: 14px;
	padding: 12px;
	resize: vertical;
	font-family: inherit;
	box-sizing: border-box;
	margin-bottom: 14px;
	transition: border-color 0.15s;
}

.dg-es-textarea:focus {
	outline: none;
	border-color: rgba(147, 51, 234, 0.6);
}

.dg-es-textarea::placeholder {
	color: #555;
}

.dg-es-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.dg-es-btn-skip {
	background: none;
	border: none;
	color: #666;
	font-size: 13px;
	cursor: pointer;
	padding: 4px 8px;
	font-family: inherit;
	transition: color 0.15s;
}

.dg-es-btn-skip:hover {
	color: #aaa;
}

/* Loading state */
.dg-es-loading {
	text-align: center;
	color: #888;
	padding: 32px 0;
	font-size: 14px;
}

/* Thank you state */
.dg-es-thankyou {
	text-align: center;
	padding: 20px 0 8px;
}

.dg-es-thankyou-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(16, 185, 129, 0.15);
	color: #10b981;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

/* Mobile */
@media (max-width: 480px) {
	.dg-es-modal {
		padding: 24px 18px 20px;
	}

	.dg-es-title {
		font-size: 16px;
	}

	.dg-es-star {
		font-size: 28px;
	}
}
