/* Staybright Free Site Audit — widget styles (namespaced) */

#sba-fab {
	position: fixed;
	bottom: 120px;
	z-index: 99998;
	background: linear-gradient(135deg, #1a56db, #6c3bea);
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 14px 22px;
	font-size: 14px;
	font-weight: 700;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(26, 86, 219, .45);
	display: flex;
	align-items: center;
	gap: 8px;
	transition: transform .2s, box-shadow .2s;
	letter-spacing: .3px;
	line-height: 1;
}
#sba-fab.sba-left { left: 28px; }
#sba-fab.sba-right { right: 28px; }
#sba-fab:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(26, 86, 219, .55);
}
#sba-fab svg { width: 18px; height: 18px; flex-shrink: 0; }

.sba-fab-pulse {
	position: fixed;
	bottom: 22px;
	z-index: 99997;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: rgba(26, 86, 219, .25);
	animation: sba-pulse 2.2s infinite;
	pointer-events: none;
}
.sba-fab-pulse.sba-left { left: 22px; }
.sba-fab-pulse.sba-right { right: 22px; }
@keyframes sba-pulse {
	0%, 100% { transform: scale(1); opacity: .7; }
	50% { transform: scale(1.55); opacity: 0; }
}

#sba-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(10, 14, 26, .6);
	backdrop-filter: blur(4px);
	align-items: center;
	justify-content: center;
	padding: 16px;
}
#sba-overlay.sba-open { display: flex; }

#sba-modal {
	background: #fff;
	border-radius: 20px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
	position: relative;
	animation: sba-slideUp .3s cubic-bezier(.34, 1.4, .64, 1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #111;
	box-sizing: border-box;
}
@keyframes sba-slideUp {
	from { transform: translateY(40px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.sba-modal-header {
	background: linear-gradient(135deg, #1a56db 0%, #6c3bea 100%);
	border-radius: 20px 20px 0 0;
	padding: 28px 28px 24px;
	color: #fff;
	position: relative;
}
.sba-modal-header h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; color: #fff; }
.sba-modal-header p { margin: 0; font-size: 13px; opacity: .85; line-height: 1.5; color: #fff; }

.sba-badge {
	display: inline-block;
	background: rgba(255, 255, 255, .2);
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 20px;
	padding: 3px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .6px;
	margin-bottom: 10px;
	text-transform: uppercase;
}

#sba-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: rgba(255, 255, 255, .2);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 18px;
	color: #fff;
	cursor: pointer;
	line-height: 32px;
	text-align: center;
	transition: background .15s;
	padding: 0;
}
#sba-close:hover { background: rgba(255, 255, 255, .35); }

.sba-modal-body { padding: 28px; }

.sba-steps { display: flex; gap: 0; margin-bottom: 26px; }
.sba-step {
	flex: 1;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #aaa;
	position: relative;
	padding-bottom: 10px;
}
.sba-step::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0; right: 0;
	height: 3px;
	background: #e5e7eb;
	border-radius: 99px;
}
.sba-step.active { color: #1a56db; }
.sba-step.active::after, .sba-step.done::after { background: #1a56db; }
.sba-step.done { color: #1a56db; }
.sba-step-num { display: block; font-size: 18px; margin-bottom: 2px; }

.sba-field { margin-bottom: 16px; }
.sba-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #374151;
	margin-bottom: 6px;
	letter-spacing: .3px;
	text-transform: uppercase;
}
.sba-field input {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 14px;
	color: #111;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	outline: none;
	font-family: inherit;
}
.sba-field input:focus {
	border-color: #1a56db;
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}
.sba-field input.sba-error { border-color: #ef4444; }
.sba-field .sba-err-msg { color: #ef4444; font-size: 11px; margin-top: 4px; display: none; }
.sba-field input.sba-error + .sba-err-msg { display: block; }

.sba-checklist { margin: 0 0 18px; padding: 0; list-style: none; }
.sba-checklist li {
	font-size: 12px;
	color: #6b7280;
	padding: 5px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}
.sba-checklist li::before {
	content: '✓';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: #ede9fe;
	color: #6c3bea;
	border-radius: 50%;
	font-size: 10px;
	font-weight: 800;
	flex-shrink: 0;
}

.sba-btn-primary {
	width: 100%;
	background: linear-gradient(135deg, #1a56db, #6c3bea);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 14px;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	letter-spacing: .3px;
	transition: opacity .15s, transform .15s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
}
.sba-btn-primary:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.sba-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.sba-privacy { text-align: center; font-size: 11px; color: #9ca3af; margin-top: 12px; }

#sba-step-form { display: none; }
#sba-step-loading { display: none; text-align: center; padding: 20px 0; }

.sba-spinner {
	width: 48px; height: 48px;
	border: 4px solid #e5e7eb;
	border-top-color: #1a56db;
	border-radius: 50%;
	animation: sba-spin 1s linear infinite;
	margin: 0 auto 18px;
}
@keyframes sba-spin { to { transform: rotate(360deg); } }
#sba-step-loading h3 { font-size: 17px; color: #111; margin: 0 0 8px; }
#sba-step-loading p { font-size: 13px; color: #6b7280; margin: 0; }

.sba-audit-progress { margin-top: 20px; text-align: left; }
.sba-audit-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: #374151;
	padding: 6px 0;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity .4s, transform .4s;
}
.sba-audit-item.sba-show { opacity: 1; transform: none; }
.sba-audit-item .sba-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #e5e7eb;
	flex-shrink: 0;
	transition: background .3s;
}
.sba-audit-item.sba-done .sba-dot { background: #10b981; }
.sba-audit-item.sba-running .sba-dot { background: #f59e0b; animation: sba-blink .7s infinite; }
@keyframes sba-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

#sba-step-result { display: none; }
.sba-result-header { text-align: center; margin-bottom: 24px; }
.sba-score-ring {
	width: 90px; height: 90px;
	margin: 0 auto 14px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sba-score-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.sba-score-num { font-size: 26px; font-weight: 900; color: #111; position: relative; z-index: 1; }
.sba-score-label { font-size: 11px; color: #6b7280; display: block; }
.sba-result-header h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; color: #111; }
.sba-result-header p { font-size: 13px; color: #6b7280; margin: 0; }

.sba-audit-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sba-audit-card {
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 14px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.sba-audit-card .sba-icon {
	width: 36px; height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	flex-shrink: 0;
}
.sba-icon-green { background: #d1fae5; }
.sba-icon-red { background: #fee2e2; }
.sba-icon-yellow { background: #fef3c7; }
.sba-card-title { font-size: 13px; font-weight: 700; color: #111; margin: 0 0 3px; }
.sba-card-desc { font-size: 12px; color: #6b7280; margin: 0; line-height: 1.5; }

.sba-status-pill {
	margin-left: auto;
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .4px;
	padding: 3px 9px;
	border-radius: 20px;
	text-transform: uppercase;
	align-self: flex-start;
	margin-top: 1px;
}
.sba-pill-good { background: #d1fae5; color: #065f46; }
.sba-pill-issue { background: #fee2e2; color: #991b1b; }
.sba-pill-warn { background: #fef3c7; color: #92400e; }

.sba-btn-download {
	width: 100%;
	background: #10b981;
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 14px;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	letter-spacing: .3px;
	transition: opacity .15s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
}
.sba-btn-download:hover { opacity: .9; }

.sba-btn-restart {
	background: none;
	border: none;
	color: #1a56db;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	margin-top: 12px;
	text-decoration: underline;
	font-family: inherit;
}
