/**
 * AS Review Form — frontend styles.
 * Zamzam Cosmetics Theme (Clean Luxury Light Theme with Crimson Red Accents).
 */

.asrf {
	--asrf-bg: #FFFFFF;
	--asrf-card-bg: #FFFFFF;
	--asrf-primary: #BA142F;             /* Zamzam Crimson Red */
	--asrf-primary-hover: #9A0F26;       /* Darker Crimson */
	--asrf-primary-light: #FFF5F6;       /* Soft Rose Tint */
	--asrf-primary-border: #F7D8DD;      /* Light Crimson Border */
	--asrf-focus: #BA142F;
	--asrf-focus-ring: rgba(186, 20, 47, 0.18);
	--asrf-border: #F1E4E6;              /* Soft Card Border */
	--asrf-input-bg: #FAF7F8;            /* Warm Off-White Input */
	--asrf-input-border: #E5D5D8;        /* Soft Input Border */
	--asrf-input-hover: #D8BFC4;
	--asrf-text: #1E293B;                /* Dark Charcoal Text */
	--asrf-label: #334155;               /* Medium Slate Label */
	--asrf-muted: #64748B;               /* Muted Text */
	--asrf-star-empty: #CBD5E1;         /* Muted Star */
	--asrf-gold: #F59E0B;                /* Star Rating Amber Gold */
	--asrf-error: #DC2626;
	--asrf-success: #16A34A;
	--asrf-radius: 14px;
	--asrf-card-radius: 24px;

	box-sizing: border-box;
	max-width: 760px;
	margin: 0 auto;
	color: var(--asrf-text);
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
}

.asrf *,
.asrf *::before,
.asrf *::after {
	box-sizing: border-box;
}

/* ---------- Card Container ---------- */
.asrf-form {
	background: var(--asrf-card-bg);
	border: 1px solid var(--asrf-border);
	border-radius: var(--asrf-card-radius);
	padding: 44px 40px;
	box-shadow: 0 20px 45px -10px rgba(186, 20, 47, 0.07), 0 4px 16px rgba(0, 0, 0, 0.02);
	position: relative;
	overflow: hidden;
}

.asrf-form::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, #BA142F 0%, #E63956 50%, #BA142F 100%);
}

@media (max-width: 560px) {
	.asrf-form {
		padding: 32px 20px;
		border-radius: 18px;
	}
}

.asrf-title {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 800;
	color: var(--asrf-text);
	letter-spacing: -0.02em;
	text-align: center;
}

.asrf-subtitle {
	margin: 0 0 32px;
	font-size: 14px;
	color: var(--asrf-muted);
	text-align: center;
}

/* ---------- Layout & Fields ---------- */
.asrf-field {
	margin-bottom: 24px;
}

.asrf-label {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--asrf-label);
}

#asrf-stars-label {
	margin-bottom: 10px;
}

.asrf-required {
	color: var(--asrf-primary);
	margin-left: 4px;
	font-weight: 800;
}

/* ---------- Icons ---------- */
.asrf-label-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	margin-right: 8px;
}

.asrf-icon--name,
.asrf-icon--review {
	color: var(--asrf-primary);
}

.asrf-icon--rating {
	color: var(--asrf-gold);
}

/* ---------- Inputs & Textarea ---------- */
.asrf-input {
	width: 100%;
	padding: 14px 18px;
	background: var(--asrf-input-bg);
	border: 1px solid var(--asrf-input-border);
	border-radius: var(--asrf-radius);
	color: var(--asrf-text);
	font-size: 15px;
	font-family: inherit;
	line-height: 1.5;
	transition: all 0.25s ease;
	outline: none;
}

.asrf-textarea {
	min-height: 130px;
	resize: vertical;
}

.asrf-input::placeholder {
	color: #94A3B8;
}

.asrf-input:hover {
	border-color: var(--asrf-input-hover);
	background: #FFFFFF;
}

.asrf-input:focus {
	border-color: var(--asrf-primary);
	background: #FFFFFF;
	box-shadow: 0 0 0 4px var(--asrf-focus-ring);
}

.asrf-input.asrf-input--invalid {
	border-color: var(--asrf-error);
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

/* ---------- Star Rating ---------- */
.asrf-stars {
	display: inline-flex;
	gap: 6px;
	padding: 4px 0;
}

.asrf-star {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--asrf-star-empty);
	transition: transform 0.2s ease, color 0.2s ease;
	outline: none;
}

.asrf-star-icon {
	width: 34px;
	height: 34px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: fill 0.2s ease, stroke 0.2s ease;
}

.asrf-star:hover {
	transform: scale(1.18);
}

.asrf-star:focus-visible {
	border-radius: 8px;
	box-shadow: 0 0 0 3px var(--asrf-focus-ring);
}

.asrf-star.is-active {
	color: var(--asrf-gold);
}

.asrf-star.is-active .asrf-star-icon {
	fill: currentColor;
}

.asrf-stars-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--asrf-muted);
}

/* ---------- Field Footer & Counter ---------- */
.asrf-field-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 6px;
}

.asrf-field-footer .asrf-error {
	margin-top: 0;
}

.asrf-counter {
	margin-left: auto;
	font-size: 12px;
	color: var(--asrf-muted);
	white-space: nowrap;
}

/* ---------- Errors & Alerts ---------- */
.asrf-error {
	display: block;
	min-height: 16px;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--asrf-error);
}

.asrf-alert {
	margin-bottom: 24px;
	padding: 14px 20px;
	border-radius: var(--asrf-radius);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.asrf-alert--success {
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
	color: var(--asrf-success);
}

.asrf-alert--error {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	color: var(--asrf-error);
}

/* ---------- Submit Button ---------- */
.asrf-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px 32px;
	margin-top: 10px;
	background: linear-gradient(135deg, #BA142F 0%, #C81E38 100%);
	border: none;
	border-radius: var(--asrf-radius);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 10px 25px -5px rgba(186, 20, 47, 0.35);
}

.asrf-submit-content {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.asrf-submit-icon {
	width: 19px;
	height: 19px;
}

.asrf-submit:hover {
	background: linear-gradient(135deg, #9A0F26 0%, #B0172E 100%);
	transform: translateY(-2px);
	box-shadow: 0 14px 30px -5px rgba(186, 20, 47, 0.45);
}

.asrf-submit:active {
	transform: translateY(0);
	box-shadow: 0 6px 18px -4px rgba(186, 20, 47, 0.3);
}

.asrf-submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px var(--asrf-focus-ring);
}

.asrf-submit.is-loading {
	pointer-events: none;
	opacity: 0.75;
	transform: none;
}

/* ---------- Spinner ---------- */
.asrf-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5 solid rgba(255, 255, 255, 0.35);
	border-top-color: #FFFFFF;
	border-radius: 50%;
	animation: asrf-spin 0.7s linear infinite;
}

.asrf-submit.is-loading .asrf-spinner {
	display: inline-block;
}

@keyframes asrf-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.asrf-star,
	.asrf-input,
	.asrf-submit {
		transition: none;
	}
	.asrf-star:hover,
	.asrf-submit:hover {
		transform: none;
	}
	.asrf-spinner {
		animation-duration: 1.4s;
	}
}
