/**
 * Frontend stylesheet for the Website AI Readability Tool.
 * Uses primary color #ffbc1a and offers sleek, modern aesthetics.
 */

.ai-readability-container {
	max-width: 700px;
	margin: 20px auto;
	padding: 40px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #333333;
	border-top: 5px solid #ffbc1a;
	box-sizing: border-box;
}

.ai-readability-container * {
	box-sizing: border-box;
}

/* Header Styles */
.ai-readability-header {
	text-align: center;
	margin-bottom: 35px;
}

.ai-readability-title {
	font-size: 28px;
	font-weight: 800;
	color: #1a202c;
	margin: 0 0 8px 0;
	line-height: 1.2;
}

.ai-readability-subtitle {
	font-size: 16px;
	color: #ffbc1a;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 20px 0;
}

.ai-readability-description {
	font-size: 15px;
	line-height: 1.6;
	color: #4a5568;
	margin: 0;
	text-align: left;
}

/* Form Styles */
.ai-readability-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ai-readability-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 580px) {
	.ai-readability-form-row {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

.ai-readability-form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
}

.ai-readability-form-group label {
	font-size: 14px;
	font-weight: 600;
	color: #2d3748;
}

.ai-readability-form-group label .required {
	color: #e53e3e;
}

.ai-readability-form-group input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 15px;
	color: #2d3748;
	background-color: #f7fafc;
	transition: all 0.2s ease-in-out;
}

.ai-readability-form-group input:focus {
	outline: none;
	border-color: #ffbc1a;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(255, 188, 26, 0.15);
}

.ai-readability-form-group input.error {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Submit Button */
.ai-readability-submit {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	padding: 15px;
	background-color: #ffbc1a;
	color: #111111;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(255, 188, 26, 0.25);
}

.ai-readability-submit:hover {
	background-color: #e2a510;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(255, 188, 26, 0.35);
}

.ai-readability-submit:active {
	transform: translateY(0);
}

.ai-readability-submit:disabled {
	background-color: #cbd5e0;
	color: #718096;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

/* Button Spinner */
.ai-btn-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid rgba(17, 17, 17, 0.1);
	border-top-color: #111111;
	border-radius: 50%;
	animation: ai-spin 0.8s linear infinite;
}

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

/* Alerts */
.ai-form-alert {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.ai-form-alert.error {
	background-color: #fff5f5;
	color: #c53030;
	border: 1px solid #fed7d7;
}

/* Radar Scan Loader Overlay */
.ai-scanning-status {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 50px 0;
	text-align: center;
}

.ai-scanning-progress {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 320px;
}

.ai-scanning-progress h3 {
	font-size: 18px;
	margin: 25px 0 8px 0;
	color: #2d3748;
}

.ai-scanning-progress p {
	font-size: 14px;
	color: #718096;
	margin: 0;
}

/* Radar Animation */
.ai-radar-container {
	position: relative;
	width: 80px;
	height: 80px;
}

.ai-radar-ring {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 2px solid #ffbc1a;
	border-radius: 50%;
	opacity: 0;
	animation: ai-pulse 2.2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
}

.ai-radar-ring.delay-1 {
	animation-delay: 0.7s;
}

.ai-radar-ring.delay-2 {
	animation-delay: 1.4s;
}

.ai-radar-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 16px;
	height: 16px;
	background-color: #ffbc1a;
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(255, 188, 26, 0.8);
}

@keyframes ai-pulse {
	0% {
		transform: scale(0.3);
		opacity: 0.8;
	}
	80% {
		opacity: 0;
	}
	100% {
		transform: scale(1.3);
		opacity: 0;
	}
}

/* Results Panel */
.ai-results-panel {
	animation: ai-fade-in 0.4s ease-out;
}

@keyframes ai-fade-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.ai-results-header {
	display: flex;
	align-items: center;
	gap: 25px;
	padding: 25px;
	background: #f8fafc;
	border-radius: 12px;
	margin-bottom: 30px;
}

@media (max-width: 480px) {
	.ai-results-header {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}
}

.ai-grade-badge {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 4px 15px rgba(0,0,0,0.06);
	flex-shrink: 0;
}

.ai-grade-badge-A {
	border: 5px solid #48bb78;
}

.ai-grade-badge-B {
	border: 5px solid #ecc94b;
}

.ai-grade-badge-C {
	border: 5px solid #f56565;
}

.ai-grade-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #718096;
	letter-spacing: 0.5px;
	line-height: 1;
	margin-bottom: 2px;
}

.ai-grade-val {
	font-size: 40px;
	font-weight: 900;
	line-height: 1;
}

.ai-grade-val-A { color: #48bb78; }
.ai-grade-val-B { color: #d69e2e; }
.ai-grade-val-C { color: #e53e3e; }

.ai-grade-desc-wrapper {
	flex-grow: 1;
	text-align: left;
}

.ai-grade-title {
	font-size: 20px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 8px 0;
}

.ai-grade-message {
	font-size: 14px;
	line-height: 1.6;
	color: #4a5568;
	margin: 0;
}

.ai-grade-message a {
	color: #1a202c;
	font-weight: 700;
	text-decoration: underline;
}

.ai-grade-message a:hover {
	color: #ffbc1a;
}

/* Checks List */
.ai-checks-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 30px;
}

.ai-check-item {
	display: flex;
	gap: 15px;
	padding: 20px;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	transition: box-shadow 0.2s ease;
	text-align: left;
}

.ai-check-item:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.ai-check-item.pass {
	border-left: 5px solid #48bb78;
}

.ai-check-item.fail {
	border-left: 5px solid #f56565;
}

.ai-check-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	margin-top: 2px;
}

.ai-check-item.pass .ai-check-icon {
	background-color: #c6ecd9;
	color: #2f855a;
}

.ai-check-item.fail .ai-check-icon {
	background-color: #fed7d7;
	color: #c53030;
}

.ai-check-item.pass .ai-check-icon::before {
	content: "\2713";
	font-size: 14px;
	font-weight: bold;
}

.ai-check-item.fail .ai-check-icon::before {
	content: "\2715";
	font-size: 12px;
	font-weight: bold;
}

.ai-check-content h4 {
	font-size: 16px;
	font-weight: 700;
	color: #2d3748;
	margin: 0 0 6px 0;
}

.ai-check-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #4a5568;
	margin: 0;
}

/* Footer Section */
.ai-results-footer {
	text-align: center;
}

.ai-scan-again-btn {
	padding: 12px 30px;
	background: #f7fafc;
	border: 2px solid #e2e8f0;
	color: #4a5568;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ai-scan-again-btn:hover {
	background: #edf2f7;
	border-color: #cbd5e0;
	color: #2d3748;
}
