/* ============================================================
   AcceGuru - shared admin styles
   ============================================================
   This file holds the surfaces NOT replaced by the new
   admin/css/acceguru-design.css redesign:

   - Block Editor sidebar (.a11y-sidebar*, .a11y-chip, .a11y-issue*)
   - Help-tip popup (.a11y-help-tip*)
   - Front-end overlay shared issue chrome (.a11y-issue__row/help/code/wp-hint)
   - Bulk Alt Text progress bar / log items (JS-built)

   Old dashboard / settings / table / cards CSS lived here
   before the redesign. Those rules now come from
   acceguru-design.css inside .wrap.a11y-design.
   ============================================================ */

/* ============================================================
   Block Editor sidebar
   ============================================================ */

.a11y-sidebar {
	padding: 12px;
	font-size: 13px;
}

.a11y-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 8px;
}

.a11y-sidebar__description {
	margin: 0;
	color: #555;
	font-size: 12px;
}

.a11y-sidebar__rescan {
	flex-shrink: 0;
}

.a11y-sidebar__summary {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 10px 12px;
	margin-bottom: 12px;
}

.a11y-sidebar__summary-headline {
	margin: 0 0 6px;
	font-weight: 600;
	font-size: 13px;
	color: #1e1e1e;
}

.a11y-sidebar__impact-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 6px;
}

.a11y-chip {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	border: 1.5px solid currentColor;
	font-size: 11px;
	font-weight: 600;
}

.a11y-sidebar__scan-date {
	margin: 4px 0 0;
	font-size: 11px;
	color: #999;
}

.a11y-sidebar__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 10px;
}

.a11y-sidebar__filter-tab {
	font-size: 11px !important;
	padding: 2px 8px !important;
	height: auto !important;
	min-height: unset !important;
}

.a11y-sidebar__issues {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.a11y-issue {
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.a11y-issue:hover {
	border-color: #2271b1;
}

.a11y-issue__badge {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	align-self: flex-start;
}

.a11y-issue__description {
	font-size: 12px;
	color: #1e1e1e;
	line-height: 1.4;
}

.a11y-issue__wcag {
	font-size: 10px;
	color: #757575;
	font-family: monospace;
}

.a11y-sidebar__empty {
	color: #999;
	font-size: 12px;
	font-style: italic;
	text-align: center;
	padding: 16px 0;
}

.a11y-sidebar__footer {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #e0e0e0;
	text-align: center;
}

/* ============================================================
   Bulk Alt Text - progress bar + log (JS-built)
   ============================================================
   The Bulk Alt page itself is rendered inside the AI tab
   (.wrap.a11y-design) where the design system overrides the
   container chrome. These rules cover the JS-injected log
   items + progress bar fallback styling.
   ============================================================ */

.acceguru-bulk-alt__controls {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: 16px;
	flex-wrap: wrap;
}

.acceguru-bulk-alt__progress {
	margin-top: 16px;
	max-width: 600px;
}

.acceguru-bulk-alt__bar {
	height: 16px;
	background: #f0f0f0;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	overflow: hidden;
}

.acceguru-bulk-alt__fill {
	display: block;
	height: 100%;
	background: #2271b1;
	transition: width 0.2s ease;
}

.acceguru-bulk-alt__log:empty {
	display: none;
}

.acceguru-bulk-alt__log-item {
	padding: 4px 0;
	font-size: 13px;
	border-bottom: 1px solid #f4f4f4;
	line-height: 1.5;
}

.acceguru-bulk-alt__log-item:last-child {
	border-bottom: none;
}

.acceguru-bulk-alt__log-item--ok strong {
	color: #1a7f37;
}

.acceguru-bulk-alt__log-item--err strong {
	color: #b32d2e;
}

/* ============================================================
   Help tooltips (popup tooltip used in dashboard, settings,
   sidebar, overlay - hover/focus/click behaviour driven by
   admin.js)
   ============================================================ */

.a11y-help-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	margin-left: 4px;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #2271b1;
	cursor: help;
	vertical-align: middle;
	position: relative;
}

.a11y-help-tip:hover,
.a11y-help-tip:focus {
	color: #135e96;
	outline: none;
}

.a11y-help-tip:focus-visible {
	box-shadow: 0 0 0 2px #2271b1;
}

.a11y-help-tip .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

.a11y-help-tip__content {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 2147483000;
	display: none;
	max-width: 280px;
	min-width: 200px;
	padding: 10px 12px;
	background: #1e1e1e;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 4px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	white-space: normal;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
	pointer-events: none;
}

.a11y-help-tip__content::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX( calc( -50% + var( --a11y-tip-arrow-shift, 0px ) ) );
	border: 6px solid transparent;
	border-top-color: #1e1e1e;
}

/* When auto-flipped to render BELOW the icon (added by JS when there is
   not enough room above). Arrow points up. */
.a11y-help-tip__content.is-below {
	bottom: auto;
	top: calc(100% + 8px);
}
.a11y-help-tip__content.is-below::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #1e1e1e;
}

.a11y-help-tip:hover + .a11y-help-tip__content,
.a11y-help-tip:focus + .a11y-help-tip__content,
.a11y-help-tip[aria-expanded="true"] + .a11y-help-tip__content {
	display: block;
}

.a11y-help-tip-wrap {
	display: inline-block;
	position: relative;
}

/* ============================================================
   Shared issue-card extras (sidebar + front-end overlay)
   ============================================================ */

.a11y-issue__row {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 6px;
}

.a11y-issue__help {
	margin: 6px 0 0;
	padding: 6px 8px;
	background: #f6f7f7;
	border-left: 3px solid #c3c4c7;
	font-size: 12px;
	line-height: 1.45;
	color: #1d2327;
}

.a11y-issue__help-link {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	text-decoration: none;
}

.a11y-issue__help-link:hover {
	text-decoration: underline;
}

.a11y-issue__code {
	margin-top: 6px;
}

.a11y-issue__code-summary {
	font-size: 12px;
	color: #2271b1;
	cursor: pointer;
	list-style: none;
	outline: none;
}

.a11y-issue__code-summary::-webkit-details-marker {
	display: none;
}

.a11y-issue__code-selector {
	margin-top: 6px;
	font-family: Menlo, Consolas, monospace;
	font-size: 11px;
	color: #646970;
	word-break: break-all;
}

.a11y-issue__code-pre {
	margin: 4px 0 0;
	padding: 8px 10px;
	background: #1e1e1e;
	color: #f6f7f7;
	font-family: Menlo, Consolas, monospace;
	font-size: 11px;
	line-height: 1.45;
	border-radius: 4px;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-all;
}

.a11y-issue__wp-hint {
	margin: 4px 0;
	padding: 6px 8px;
	background: #fff8e5;
	border-left: 3px solid #dba617;
	font-size: 12px;
	line-height: 1.45;
	color: #1d2327;
}

