/* ============================================================
   AdVajra — Deactivation Survey Modal
   Vanilla CSS, no framework, runs on wp-admin/plugins.php only.
   ============================================================ */

/* Overlay */
#advajra-survey-overlay {
	position: fixed;
	inset: 0;
	background: rgba(5, 10, 20, 0.78);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.28s ease;
	pointer-events: none;
}

#advajra-survey-overlay.is-visible {
	opacity: 1;
	pointer-events: all;
}

/* Modal card */
#advajra-survey-modal {
	background: linear-gradient(145deg, #0f1c2e 0%, #1a2d45 100%);
	border: 1px solid rgba(237, 175, 3, 0.3);
	border-radius: 20px;
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 0;
	box-shadow:
		0 32px 80px rgba(0, 0, 0, 0.55),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset;
	transform: scale(0.93) translateY(14px);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#advajra-survey-overlay.is-visible #advajra-survey-modal {
	transform: scale(1) translateY(0);
}

/* Header */
.avds-header {
	padding: 24px 28px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	position: relative;
}

.avds-header-eyebrow {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 800;
	color: #edaf03;
	margin: 0 0 6px;
}

.avds-header h2 {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1.25;
}

.avds-header p {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1.5;
}

.avds-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1;
}

.avds-close:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

/* Body */
.avds-body {
	padding: 20px 28px;
}

.avds-section-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.35);
	margin: 0 0 12px;
}

/* Reason grid */
.avds-reason-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 20px;
}

.avds-reason-card {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 11px;
	padding: 11px 13px;
	cursor: pointer;
	transition: all 0.18s ease;
	text-align: left;
	width: 100%;
	display: flex;
	align-items: flex-start;
	gap: 9px;
}

.avds-reason-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	transform: translateY(-1px);
}

.avds-reason-card.is-selected {
	background: rgba(237, 175, 3, 0.1);
	border-color: #edaf03;
	box-shadow: 0 0 0 1px rgba(237, 175, 3, 0.3);
}

.avds-reason-icon {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.avds-reason-text {
	font-size: 12.5px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.35;
}

.avds-reason-card.is-selected .avds-reason-text {
	color: #ffffff;
}

/* Detail area */
.avds-detail {
	margin-bottom: 20px;
	display: none;
}

.avds-detail.is-visible {
	display: block;
}

.avds-detail-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 8px;
	display: block;
}

.avds-detail textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: #fff;
	font-size: 13px;
	padding: 11px 13px;
	resize: vertical;
	min-height: 80px;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
	line-height: 1.5;
}

.avds-detail textarea::placeholder {
	color: rgba(255, 255, 255, 0.2);
}

.avds-detail textarea:focus {
	outline: none;
	border-color: rgba(237, 175, 3, 0.5);
}

/* Contextual nudge for specific reasons */
.avds-nudge {
	display: none;
	background: rgba(237, 175, 3, 0.08);
	border: 1px solid rgba(237, 175, 3, 0.25);
	border-radius: 10px;
	padding: 11px 14px;
	margin-bottom: 16px;
}

.avds-nudge.is-visible {
	display: flex;
	align-items: center;
	gap: 10px;
}

.avds-nudge-icon {
	font-size: 18px;
	flex-shrink: 0;
}

.avds-nudge p {
	margin: 0;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.75);
	line-height: 1.45;
}

.avds-nudge a {
	color: #edaf03;
	font-weight: 700;
	text-decoration: none;
}

.avds-nudge a:hover {
	text-decoration: underline;
}

/* Footer */
.avds-footer {
	padding: 16px 28px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.avds-btn-submit {
	background: linear-gradient(135deg, #ffe66d, #edaf03);
	color: #0f1c2e;
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
	white-space: nowrap;
}

.avds-btn-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(237, 175, 3, 0.4);
}

.avds-btn-submit:disabled {
	opacity: 0.55;
	cursor: wait;
}

.avds-btn-skip {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.35);
	font-size: 12.5px;
	cursor: pointer;
	font-family: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	padding: 0;
	transition: color 0.2s ease;
	white-space: nowrap;
}

.avds-btn-skip:hover {
	color: rgba(255, 255, 255, 0.65);
}

/* Thank you screen */
.avds-thankyou {
	display: none;
	padding: 40px 28px;
	text-align: center;
}

.avds-thankyou.is-visible {
	display: block;
}

.avds-thankyou-icon {
	font-size: 48px;
	margin-bottom: 14px;
	line-height: 1;
}

.avds-thankyou h3 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 800;
	color: #ffffff;
}

.avds-thankyou p {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1.55;
}

/* Step visibility */
.avds-step { display: block; }
.avds-step.is-hidden { display: none; }
