/* ── WebAbility Scanner UI ── */

/* Layout */
#webability-scanner { max-width: 960px; }

/* Focus styles — accessibility product must have visible focus */
#webability-scanner button:focus-visible,
#webability-scanner input:focus-visible,
#webability-scanner a:focus-visible,
#webability-design button:focus-visible,
#webability-design input:focus-visible,
#webability-design a:focus-visible,
#webability-statement button:focus-visible,
#webability-statement input:focus-visible,
#webability-statement a:focus-visible {
    outline: 2px solid #0052CC;
    outline-offset: 2px;
}
#webability-scanner button:focus:not(:focus-visible),
#webability-scanner input:focus:not(:focus-visible),
#webability-design button:focus:not(:focus-visible),
#webability-design input:focus:not(:focus-visible),
#webability-statement button:focus:not(:focus-visible),
#webability-statement input:focus:not(:focus-visible) {
    outline: none;
}

/* ── Page Header ── */
.wa-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.wa-page-header-left h2 {
    margin: 0 0 2px;
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
}
.wa-page-header-left p {
    margin: 0;
    font-size: 13px;
    color: #646970;
}
.wa-scanned-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: #1e1e1e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wa-scanned-url-icon {
    color: #646970;
    font-size: 14px;
}

/* ── Stat Tiles ── */
.wa-stat-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 200px;
    grid-template-rows: auto;
    gap: 16px;
    margin-bottom: 24px;
}
.wa-stat-tile {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wa-stat-tile-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #646970;
    margin: 0 0 6px;
}
.wa-stat-tile-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    color: #1e1e1e;
}
.wa-stat-tile-sub {
    font-size: 12px;
    color: #646970;
    margin: 6px 0 0;
}
.wa-stat-tile--issues .wa-stat-tile-value { color: #1e1e1e; }
.wa-stat-tile--fixed .wa-stat-tile-value { color: #0a6518; }
.wa-stat-tile--open .wa-stat-tile-value { color: #d63638; }
.wa-stat-tile--open.wa-stat-tile--clear .wa-stat-tile-value { color: #0a6518; }

/* Donut chart tile */
.wa-stat-tile--donut {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.wa-donut {
    position: relative;
    width: 120px;
    height: 120px;
}
.wa-donut svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}
.wa-donut-track {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 10;
}
.wa-donut-fill {
    fill: none;
    stroke: #0a6518;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}
.wa-donut-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.wa-donut-pct {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1;
}
.wa-donut-pct-sub {
    display: block;
    font-size: 10px;
    color: #646970;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Actions Bar ── */
.wa-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.wa-actions-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wa-actions-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Scan Controls (empty state) ── */
.wa-scan-header {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wa-scan-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
}
.wa-scan-header .description {
    margin: 0 0 20px;
    color: #646970;
    font-size: 14px;
}
.wa-scan-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.wa-scan-row input[type="url"] {
    flex: 1;
    max-width: 440px;
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 12px;
}
.wa-last-scan { color: #646970; font-size: 13px; margin-top: 12px; }

/* ── Scan Progress (during scan) ── */
#wa-scan-progress { margin: 20px 0; }
.wa-progress-bar {
    width: 100%; height: 6px;
    background: #e0e0e0; border-radius: 3px; overflow: hidden;
}
.wa-progress-fill {
    height: 100%; width: 0; background: #0052CC;
    border-radius: 3px; transition: width 0.4s ease;
    will-change: width;
}
#wa-scan-status { color: #646970; margin-top: 8px; font-size: 13px; }

/* ── Buttons ── */
.wa-btn-fix-all {
    background: #d63638; color: #fff;
    border: none; border-radius: 6px;
    padding: 10px 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
    min-height: 44px;
}
.wa-btn-fix-all:hover { background: #b32d2f; }
.wa-btn-fix-all:disabled { opacity: 0.5; cursor: not-allowed; }

.wa-btn-rescan {
    background: #fff; color: #1e1e1e;
    border: 1px solid #dcdcde; border-radius: 6px;
    padding: 10px 20px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
    min-height: 44px;
}
.wa-btn-rescan:hover { background: #f6f7f7; border-color: #c3c4c7; }

/* ── Section Labels ── */
.wa-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #646970;
    margin: 0 0 12px;
}

/* ── Category List ── */
.wa-categories { display: flex; flex-direction: column; gap: 8px; }

.wa-category-btn {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wa-category-btn:hover { background: #f6f7f7; border-color: #c3c4c7; }
.wa-category-btn.wa-category-open {
    border-color: #0052CC;
    background: #f8fafd;
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.1);
}
.wa-category-btn.wa-category-resolved {
    border-color: #b7e4c7;
    background: #f0faf0;
}

.wa-category-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-right: 14px; flex-shrink: 0;
}
.wa-category-icon svg { display: block; }
.wa-icon-image { background: #fce8e8; color: #d63638; }
.wa-icon-contrast { background: #fef3e0; color: #9a6700; }
.wa-icon-heading { background: #e8f0fe; color: #0052CC; }
.wa-icon-link { background: #f3e8fc; color: #7b2cbf; }
.wa-icon-theme { background: #e0f5e9; color: #0a6518; }
.wa-icon-other { background: #f0f0f1; color: #646970; }

.wa-category-label-group { flex: 1; min-width: 0; }
.wa-category-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
}
.wa-category-desc {
    display: block;
    font-size: 12px;
    color: #646970;
    font-weight: 400;
    margin-top: 2px;
}

.wa-category-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* Mini progress bar per category */
.wa-cat-progress {
    width: 48px; height: 4px;
    background: #e0e0e0; border-radius: 2px;
    overflow: hidden;
}
.wa-cat-progress-fill {
    height: 100%;
    background: #0a6518;
    border-radius: 2px;
    transition: width 0.4s ease;
    will-change: width;
}

.wa-category-btn::after {
    content: '';
    width: 8px; height: 8px;
    border-right: 2px solid #a7aaad;
    border-bottom: 2px solid #a7aaad;
    transform: rotate(45deg);
    margin-left: 12px; flex-shrink: 0;
    transition: transform 0.2s;
}
.wa-category-btn.wa-category-open::after {
    transform: rotate(-135deg);
    border-color: #0052CC;
}
.wa-category-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px;
    padding: 0 8px; border-radius: 12px;
    font-size: 12px; font-weight: 700;
    background: #fce8e8; color: #d63638;
}
.wa-category-count-resolved {
    background: #e0f5e9; color: #0a6518;
}
.wa-category-check {
    color: #0a6518; font-size: 18px; font-weight: 700;
}

/* ── Issue Panel (expanded category) ── */
.wa-issue-panel {
    display: none;
    background: #fff;
    border: 1px solid #0052CC;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 82, 204, 0.06);
}
.wa-issue-panel.wa-panel-open { display: block; }

.wa-issue-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f1;
    gap: 14px;
    transition: background 0.15s;
}
.wa-issue-item:last-child { border-bottom: none; }
.wa-issue-item:hover { background: #fafbfc; }
.wa-issue-item.wa-issue-fixed { opacity: 0.5; }

.wa-issue-impact {
    width: 4px; min-height: 40px; border-radius: 2px;
    flex-shrink: 0; align-self: stretch;
}
.wa-impact-bar-critical { background: #d63638; }
.wa-impact-bar-serious { background: #dba617; }
.wa-impact-bar-moderate { background: #0052CC; }
.wa-impact-bar-minor { background: #a7aaad; }

.wa-issue-body { flex: 1; min-width: 0; }
.wa-issue-title {
    font-size: 13px; font-weight: 600; color: #1e1e1e;
    margin: 0 0 6px; line-height: 1.4;
}
.wa-issue-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #646970; flex-wrap: wrap;
}
.wa-impact-label {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.wa-impact-label-critical { background: #fce8e8; color: #d63638; }
.wa-impact-label-serious { background: #fef3e0; color: #9a6700; }
.wa-impact-label-moderate { background: #e8f0fe; color: #0052CC; }
.wa-impact-label-minor { background: #f0f0f1; color: #646970; }

.wa-wcag-tag {
    background: #f0f0f1; padding: 1px 8px;
    border-radius: 3px; font-family: "SF Mono", Monaco, Menlo, monospace; font-size: 11px;
    color: #1e1e1e;
}
.wa-target-tag {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; color: #646970;
}
.wa-issue-selector {
    font-size: 11px;
    color: #1e1e1e;
    font-family: "SF Mono", Monaco, Menlo, monospace;
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 8px;
    display: block;
}
.wa-issue-suggestion {
    font-size: 12px; color: #646970; margin-top: 6px;
    line-height: 1.5;
}

.wa-issue-action { flex-shrink: 0; align-self: center; }

.wa-btn-apply {
    background: #0052CC; color: #fff;
    border: none; border-radius: 6px;
    padding: 10px 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
    white-space: nowrap;
    min-height: 44px;
}
.wa-btn-apply:hover { background: #003d99; }
.wa-btn-apply:disabled { opacity: 0.5; cursor: not-allowed; }

.wa-badge-done {
    display: inline-flex; align-items: center; gap: 4px;
    background: #e0f5e9; color: #0a6518;
    padding: 6px 14px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
}
.wa-badge-manual-sm {
    display: inline-flex; align-items: center;
    background: #f0f0f1; color: #646970;
    padding: 6px 14px; border-radius: 6px;
    font-size: 12px;
}

/* ── Empty State ── */
.wa-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wa-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.wa-empty-state h3 { margin: 0 0 8px; font-size: 16px; color: #1e1e1e; }
.wa-empty-state p { margin: 0; color: #646970; font-size: 14px; }

/* ── Scanned Pages Table ── */
.wa-scans-section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wa-scans-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}
.wa-scans-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
}
.wa-scans-subtitle {
    margin: 0;
    font-size: 13px;
    color: #646970;
}
.wa-scan-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.wa-scan-add-row input[type="url"] {
    flex: 1;
    border-radius: 4px;
    font-size: 13px;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    min-height: 44px;
    box-sizing: border-box;
}
.wa-btn-scan-add {
    background: #0052CC;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    min-height: 44px;
}
.wa-btn-scan-add:hover { background: #003d99; }
.wa-btn-scan-add:disabled { opacity: 0.5; cursor: not-allowed; }

.wa-scans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wa-scans-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #646970;
    padding: 8px 12px;
    border-bottom: 2px solid #f0f0f1;
}
.wa-scans-table tbody tr {
    border-bottom: 1px solid #f0f0f1;
    transition: background 0.1s;
}
.wa-scans-table tbody tr:last-child { border-bottom: none; }
.wa-scans-table tbody tr:hover { background: #f8fafd; }
.wa-scans-table tbody tr.wa-scan-row-active {
    background: #f0f6ff;
    border-left: 3px solid #0052CC;
}
.wa-scans-table td {
    padding: 12px;
    vertical-align: middle;
}
.wa-col-page { min-width: 180px; }
.wa-col-date { width: 140px; color: #646970; white-space: nowrap; }
.wa-col-progress { width: 180px; }
.wa-col-actions { width: 140px; white-space: nowrap; }

.wa-scan-page-title {
    display: block;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
}
.wa-scan-page-url {
    display: block;
    font-size: 11px;
    color: #646970;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* Progress bar + chip in table */
.wa-scan-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wa-scan-progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.wa-scan-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    will-change: width;
}
.wa-scan-progress-fill.wa-chip-error { background: #d63638; }
.wa-scan-progress-fill.wa-chip-warning { background: #dba617; }
.wa-scan-progress-fill.wa-chip-default { background: #0052CC; }
.wa-scan-progress-fill.wa-chip-success { background: #0a6518; }

.wa-scan-progress-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.wa-scan-progress-chip.wa-chip-error { background: #fce8e8; color: #d63638; }
.wa-scan-progress-chip.wa-chip-warning { background: #fef3e0; color: #9a6700; }
.wa-scan-progress-chip.wa-chip-default { background: #e8f0fe; color: #0052CC; }
.wa-scan-progress-chip.wa-chip-success { background: #e0f5e9; color: #0a6518; }

/* Table action buttons */
.wa-btn-view-scan {
    background: #0052CC;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 36px;
}
.wa-btn-view-scan:hover { background: #003d99; }
.wa-btn-view-scan:disabled { background: #646970; cursor: default; }

.wa-btn-rescan-url,
.wa-btn-delete-scan {
    background: none;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
    color: #646970;
    transition: all 0.15s;
    line-height: 1;
    margin-left: 4px;
    min-height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wa-btn-rescan-url:hover { border-color: #0052CC; color: #0052CC; }
.wa-btn-delete-scan:hover { border-color: #d63638; color: #d63638; }

/* ── Powered By ── */
.wa-powered-by {
    text-align: center;
    margin-top: 24px;
    padding: 12px;
    font-size: 12px;
    color: #a7aaad;
}
.wa-powered-by a {
    color: #646970;
    text-decoration: none;
}
.wa-powered-by a:hover {
    color: #0052CC;
}

/* ── Toast / Notification ── */
.wa-toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #1e1e1e; color: #fff;
    padding: 12px 20px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100000; opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.wa-toast.wa-toast-visible {
    opacity: 1; transform: translateY(0);
}
.wa-toast-success { background: #0a6518; }
.wa-toast-error { background: #d63638; }

/* ── Spinner ── */
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: wa-spin 0.6s linear infinite;
    vertical-align: middle; margin-right: 6px;
}
.wa-spinner-dark {
    border-color: rgba(0,0,0,0.15);
    border-top-color: #0052CC;
}

/* ── Responsive ── */
@media (max-width: 782px) {
    #webability-scanner { max-width: 100%; }
    .wa-stat-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
    .wa-stat-tile { padding: 16px; }
    .wa-stat-tile-value { font-size: 24px; }
    .wa-stat-tile--donut { grid-column: 1 / -1; }
    .wa-donut { width: 100px; height: 100px; }
    .wa-donut svg { width: 100px; height: 100px; }
    .wa-page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .wa-actions-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .wa-actions-bar-left, .wa-actions-bar-right { width: 100%; }
    .wa-btn-fix-all, .wa-btn-rescan { flex: 1; text-align: center; min-height: 44px; }
    .wa-scan-row { flex-direction: column; align-items: stretch; }
    .wa-scan-row input[type="url"] { max-width: 100%; }
    .wa-category-btn { padding: 16px; min-height: 48px; }
    .wa-category-desc { display: none; }
    .wa-issue-item { flex-wrap: wrap; }
    .wa-issue-action { width: 100%; margin-top: 8px; }
    .wa-btn-apply { width: 100%; text-align: center; min-height: 44px; }
    .wa-issue-selector { max-width: 100%; }
    .wa-scans-table { font-size: 12px; }
    .wa-col-date { display: none; }
    .wa-col-progress { width: 120px; }
    .wa-scan-page-url { max-width: 160px; }
    .wa-scan-add-row { flex-direction: column; align-items: stretch; }
}

/* ── Widget Design & Statement Tabs ── */

/* Shared grid layout */
.wa-design-wrap,
.wa-statement-wrap {
    max-width: 1100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wa-design-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* Statement: preview left (larger), form right */
.wa-statement-wrap .wa-design-grid {
    grid-template-columns: 1fr 420px;
}
.wa-statement-wrap .wa-design-settings { order: 2; }
.wa-statement-wrap .wa-design-preview { order: 1; }

/* Cards */
.wa-design-card,
.wa-preview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.wa-design-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}
.wa-design-card-title svg { color: #6b7280; flex-shrink: 0; }
.wa-design-card-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.5;
}
.wa-design-card-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.wa-design-card-split .wa-design-half { min-width: 0; }

/* ── Position Picker ── */
.wa-position-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.wa-position-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.wa-position-cell:hover { border-color: #a7aaad; }
.wa-position-cell:focus-within { outline: 2px solid #0052CC; outline-offset: 2px; }
.wa-position-cell.wa-position-active {
    border-color: #0052CC;
    background: #f0f6ff;
}
.wa-position-cell input[type="radio"] { display: none; }
.wa-position-dot {
    width: 28px;
    height: 20px;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    position: relative;
    background: #f6f7f7;
    flex-shrink: 0;
}
.wa-position-dot::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #0052CC;
    border-radius: 50%;
}
.wa-position-dot[data-pos="top-left"]::after { top: 2px; left: 2px; }
.wa-position-dot[data-pos="top-right"]::after { top: 2px; right: 2px; }
.wa-position-dot[data-pos="bottom-left"]::after { bottom: 2px; left: 2px; }
.wa-position-dot[data-pos="bottom-right"]::after { bottom: 2px; right: 2px; }
.wa-position-label {
    font-size: 13px;
    font-weight: 500;
    color: #1e1e1e;
}

/* Offset fields */
.wa-offset-row {
    display: flex;
    gap: 12px;
}
.wa-offset-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #646970;
}
.wa-offset-field input[type="number"] {
    width: 64px;
    padding: 4px 6px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}
.wa-offset-unit {
    font-size: 12px;
    color: #646970;
}

/* ── Color Swatches ── */
.wa-color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wa-color-swatch,
.wa-color-custom {
    position: relative;
    cursor: pointer;
}
.wa-color-swatch input[type="radio"],
.wa-color-custom input[type="color"] { position: absolute; opacity: 0; width: 0; height: 0; }
.wa-swatch-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    box-sizing: border-box;
}
.wa-swatch-circle:hover { transform: scale(1.1); }
.wa-color-swatch:focus-within .wa-swatch-circle,
.wa-color-custom:focus-within .wa-swatch-circle { outline: 2px solid #0052CC; outline-offset: 2px; }
.wa-color-active .wa-swatch-circle {
    border-color: #1e1e1e;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0052CC;
}
.wa-swatch-custom {
    background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    color: #fff;
}
.wa-color-input { cursor: pointer; }

/* ── Size Options ── */
.wa-size-options {
    display: flex;
    gap: 6px;
}
.wa-size-option {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #646970;
    transition: all 0.15s;
    background: #fff;
}
.wa-size-option:hover { border-color: #a7aaad; }
.wa-size-option:focus-within { outline: 2px solid #0052CC; outline-offset: 2px; }
.wa-size-option.wa-size-active {
    border-color: #0052CC;
    background: #f0f6ff;
    color: #0052CC;
}
.wa-size-option input[type="radio"] { display: none; }

/* ── Icon Type Options ── */
.wa-icon-type-options {
    display: flex;
    gap: 8px;
}
.wa-icon-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    overflow: visible;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    background: #fff;
}
.wa-icon-type-option:hover { border-color: #a7aaad; }
.wa-icon-type-option:focus-within { outline: 2px solid #0052CC; outline-offset: 2px; }
.wa-icon-type-option.wa-icon-type-active {
    border-color: #0052CC;
    background: #f0f6ff;
}
.wa-icon-type-option input[type="radio"] { display: none; }
.wa-icon-type-label {
    font-size: 12px;
    font-weight: 500;
    color: #646970;
}
.wa-icon-type-active .wa-icon-type-label { color: #0052CC; }
.wa-icon-type-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
}
.wa-icon-type-badge.wa-badge-text {
    font-size: 13px;
    font-weight: 700;
    background: #0052CC;
}
.wa-icon-type-badge.wa-badge-hidden {
    background: #dcdcde;
    color: #646970;
}

/* ── Select & Inputs (shared) ── */
.wa-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 13px;
    color: #1e1e1e;
    background: #fff;
    min-height: 36px;
}

/* ── Preview Browser ── */
.wa-preview-card { position: static; }
.wa-preview-browser {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 12px;
}
.wa-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f6f7f7;
    padding: 8px 12px;
    border-bottom: 1px solid #dcdcde;
}
.wa-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.wa-dot-red { background: #ff5f56; }
.wa-dot-yellow { background: #ffbd2e; }
.wa-dot-green { background: #27c93f; }
.wa-preview-url {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #646970;
    font-family: "SF Mono", Monaco, Menlo, monospace;
}
.wa-preview-viewport {
    position: relative;
    height: 320px;
    background: #f9f9f9;
    overflow: hidden;
}
.wa-preview-content {
    padding: 16px;
}
.wa-preview-header {
    height: 12px;
    width: 60%;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 14px;
}
.wa-preview-block {
    background: #e8e8e8;
    border-radius: 4px;
    margin-bottom: 10px;
}
.wa-preview-block-lg { height: 80px; }
.wa-preview-block-md { height: 40px; }
.wa-preview-block-sm { height: 50px; }
.wa-preview-block-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

/* Widget button in preview */
.wa-preview-widget-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: default;
}
.wa-preview-widget-btn img {
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
.wa-preview-widget-btn[data-position="bottom-right"] { bottom: 16px; right: 16px; }
.wa-preview-widget-btn[data-position="bottom-left"] { bottom: 16px; left: 16px; }
.wa-preview-widget-btn[data-position="top-right"] { top: 16px; right: 16px; }
.wa-preview-widget-btn[data-position="top-left"] { top: 16px; left: 16px; }
.wa-preview-widget-btn[data-position="center-right"] { top: 50%; right: 16px; transform: translateY(-50%); }
.wa-preview-widget-btn[data-position="center-left"] { top: 50%; left: 16px; transform: translateY(-50%); }

/* Save button area */
.wa-design-actions {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

/* ── Statement Generator ── */
.wa-form-group {
    margin-bottom: 20px;
}
.wa-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.wa-required { color: #ef4444; }
.wa-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.wa-input::placeholder { color: #9ca3af; }
.wa-input:hover { border-color: #9ca3af; }
.wa-input:focus,
.wa-textarea:focus,
.wa-select:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    outline: none;
}
.wa-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 44px;
}
.wa-textarea::placeholder { color: #9ca3af; }
.wa-textarea:hover { border-color: #9ca3af; }
.wa-select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.wa-select:hover { border-color: #9ca3af; }
.wa-form-row {
    display: flex;
    gap: 16px;
}
.wa-form-half { flex: 1; min-width: 0; }

.wa-btn-generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: #0052CC;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.01em;
    box-sizing: border-box;
}
.wa-btn-generate:hover {
    background: #003d99;
}
.wa-btn-generate:active {
    transform: scale(0.98);
}

/* ── Statement Preview ── */
.wa-statement-wrap .wa-preview-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.wa-statement-preview .wa-stmt-output {
    min-height: 300px;
    max-height: 560px;
    overflow-y: auto;
    padding: 20px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}
.wa-statement-preview .wa-stmt-output::-webkit-scrollbar { width: 6px; }
.wa-statement-preview .wa-stmt-output::-webkit-scrollbar-track { background: transparent; }
.wa-statement-preview .wa-stmt-output::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.wa-stmt-output h2 { font-size: 17px; margin: 24px 0 8px; color: #111827; font-weight: 600; letter-spacing: -0.01em; }
.wa-stmt-output h2:first-child { margin-top: 0; }
.wa-stmt-output h3 { font-size: 14px; margin: 18px 0 6px; color: #374151; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.wa-stmt-output p { margin: 0 0 12px; color: #4b5563; }
.wa-stmt-output ul { padding-left: 20px; margin: 0 0 12px; }
.wa-stmt-output li { margin-bottom: 6px; color: #4b5563; }
.wa-stmt-output ol { padding-left: 20px; margin: 0 0 12px; }
.wa-stmt-output ol li { margin-bottom: 8px; }
.wa-stmt-output hr { border: none; border-top: 1px solid #e5e7eb; margin: 24px 0; }
.wa-stmt-output em { color: #6b7280; font-style: italic; }
.wa-stmt-output a { color: #0052CC; text-decoration: underline; }
.wa-stmt-output a:hover { text-decoration: none; }
.wa-stmt-output strong { color: #111827; font-weight: 600; }

.wa-stmt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    padding: 40px 20px;
}
.wa-stmt-empty svg { opacity: 0.3; }
.wa-stmt-empty p { margin: 12px 0 0; font-size: 15px; color: #6b7280; font-weight: 500; }
.wa-stmt-hint { font-size: 13px !important; color: #9ca3af !important; font-weight: 400 !important; }

/* Statement action buttons */
.wa-stmt-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}
#webability-statement .wa-stmt-actions .button,
#webability-statement .wa-stmt-actions .button.button-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
    height: auto;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
#webability-statement .wa-stmt-actions .button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
#webability-statement .wa-stmt-actions .button.button-primary {
    background: #0052CC;
    color: #fff;
    border-color: #0052CC;
}
#webability-statement .wa-stmt-actions .button.button-primary:hover {
    background: #003d99;
    border-color: #003d99;
}

/* ── Enhancement options ── */
.wa-enhancement-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wa-enhancement-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.wa-enhancement-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.06);
}
.wa-enhancement-option:focus-within {
    outline: 2px solid #0052CC;
    outline-offset: 2px;
}
#webability-statement .wa-enhancement-option input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #0052CC;
    border-radius: 4px;
    flex-shrink: 0;
}
.wa-enhancement-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wa-enhancement-label strong {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}
.wa-enhancement-label small {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Toggle optional fields ── */
.wa-toggle-optional {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.wa-toggle-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.2s;
    line-height: 1;
}

/* ── Statement header row ── */
.wa-stmt-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* ── Format tabs ── */
.wa-format-tabs {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}
#webability-statement .wa-format-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}
#webability-statement .wa-format-tab:hover {
    color: #334155;
}
#webability-statement .wa-format-tab.wa-format-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Responsive for Design & Statement ── */
@media (max-width: 960px) {
    .wa-design-grid {
        grid-template-columns: 1fr;
    }
    .wa-statement-wrap .wa-design-settings { order: 1; }
    .wa-statement-wrap .wa-design-preview { order: 2; }
    .wa-preview-card { position: static !important; }
    .wa-design-card-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wa-form-row { flex-direction: column; gap: 0; }
}
@media (max-width: 600px) {
    .wa-position-grid { grid-template-columns: 1fr; }
    .wa-offset-row { flex-direction: column; gap: 8px; }
    .wa-size-options { flex-direction: column; }
    .wa-icon-type-options { flex-direction: column; }
    .wa-stmt-actions { flex-direction: column; }
    .wa-stmt-actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .wa-progress-fill,
    .wa-cat-progress-fill,
    .wa-scan-progress-fill { transition: none; will-change: auto; }
    .wa-toast { transition: none; }
    .wa-spinner { animation: none; }
    .wa-preview-widget-btn { transition: none; }
    .wa-swatch-circle { transition: none; }
}

/* ══════════════════════════════════════════════
   WordPress Admin CSS Overrides
   High specificity to beat WP defaults
   ══════════════════════════════════════════════ */

/* Input overrides */
#webability-statement input[type="text"].wa-input,
#webability-statement input[type="url"].wa-input,
#webability-statement input[type="email"].wa-input,
#webability-statement input[type="tel"].wa-input,
#webability-statement input[type="number"].wa-input,
#webability-design input[type="number"] {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: none;
    width: 100%;
}
#webability-statement input[type="text"].wa-input::placeholder,
#webability-statement input[type="url"].wa-input::placeholder,
#webability-statement input[type="email"].wa-input::placeholder,
#webability-statement input[type="tel"].wa-input::placeholder {
    color: #9ca3af;
}
#webability-statement input.wa-input:hover,
#webability-design input[type="number"]:hover {
    border-color: #9ca3af;
}
#webability-statement input.wa-input:focus,
#webability-statement select.wa-select:focus,
#webability-design input[type="number"]:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    outline: none;
}

/* Select overrides */
#webability-statement select.wa-select,
#webability-design select.wa-select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    line-height: 1.4;
    box-shadow: none;
}
#webability-statement select.wa-select:hover,
#webability-design select.wa-select:hover {
    border-color: #9ca3af;
}

/* Button overrides */
#webability-statement button.wa-btn-generate,
#webability-statement button.wa-btn-generate.button,
#webability-statement button.wa-btn-generate.button-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: #0052CC;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    letter-spacing: 0.01em;
    box-sizing: border-box;
    line-height: 1.4;
    height: auto;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.3);
}
#webability-statement button.wa-btn-generate:hover {
    background: #003d99;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}
#webability-statement button.wa-btn-generate:active {
    transform: scale(0.98);
}
#webability-statement button.wa-btn-generate svg {
    stroke: #fff;
}
.wa-stmt-lang-note {
    margin-top: 10px;
    font-size: 12px;
    color: #646970;
}
.wa-stmt-lang-note a {
    color: #0052CC;
    text-decoration: none;
}
.wa-stmt-lang-note a:hover {
    text-decoration: underline;
}

/* Card overrides for statement page — no WP card border interference */
#webability-statement .wa-design-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Label overrides */
#webability-statement .wa-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* Textarea override */
#webability-statement textarea.wa-textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 44px;
    width: 100%;
    background: #fff;
    box-shadow: none;
}
#webability-statement textarea.wa-textarea:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    outline: none;
}

/* Design tab overrides */
#webability-design .wa-design-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
#webability-design .wa-preview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Position cells — modern */
#webability-design .wa-position-cell {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.15s;
}
#webability-design .wa-position-cell:hover { border-color: #93c5fd; }
#webability-design .wa-position-cell.wa-position-active {
    border-color: #0052CC;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08);
}

/* Size options — modern */
#webability-design .wa-size-option {
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
}
#webability-design .wa-size-option:hover { border-color: #93c5fd; }
#webability-design .wa-size-option.wa-size-active {
    border-color: #0052CC;
    background: #eff6ff;
    color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08);
}

/* Icon type options — modern */
#webability-design .wa-icon-type-option {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
}
#webability-design .wa-icon-type-option:hover { border-color: #93c5fd; }
#webability-design .wa-icon-type-option.wa-icon-type-active {
    border-color: #0052CC;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.08);
}

/* Color swatches — modern */
#webability-design .wa-color-active .wa-swatch-circle {
    border-color: #111827;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0052CC;
}

/* Submit button on design page */
#webability-design .wa-design-actions .button-primary {
    background: #0052CC;
    border-color: #0052CC;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.3);
    transition: background 0.15s;
}
#webability-design .wa-design-actions .button-primary:hover {
    background: #003d99;
    border-color: #003d99;
}

/* Custom trigger info box */
.wa-custom-trigger-info {
    margin-top: 16px;
    padding: 16px;
    background: #FFF7ED;
    border: 1px solid #FDBA74;
    border-radius: 8px;
}
.wa-custom-trigger-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #9A3412;
}
.wa-custom-trigger-info p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #78350F;
}
.wa-custom-trigger-info .wa-design-card-desc {
    margin-bottom: 0;
    color: #92400E;
}
.wa-snippet {
    display: block;
    padding: 10px 14px;
    background: #1E293B;
    color: #34D399;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    overflow-x: auto;
    margin-bottom: 10px;
}

/* Verify re-check link */
.wa-btn-verify-link {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #0052CC !important;
    text-decoration: underline !important;
    font-size: 13px !important;
    padding: 0 !important;
    cursor: pointer;
    min-height: auto !important;
}
.wa-btn-verify-link:hover {
    color: #003d99 !important;
}

/* Nav tabs — modern */
.wrap .nav-tab-wrapper .nav-tab {
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    background: #f9fafb;
    color: #6b7280;
    transition: all 0.15s;
}
.wrap .nav-tab-wrapper .nav-tab:hover {
    background: #fff;
    color: #111827;
}
.wrap .nav-tab-wrapper .nav-tab-active,
.wrap .nav-tab-wrapper .nav-tab-active:hover {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
    font-weight: 600;
}
.wrap .nav-tab-wrapper {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

/* ══════════════════════════════════════════════
   Widget Settings Tab
   ══════════════════════════════════════════════ */

.wa-settings-wrap {
    max-width: 1100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wa-settings-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

#webability-settings .wa-design-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Toggle switch */
.wa-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    cursor: pointer;
}
.wa-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.wa-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.wa-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 12px;
    transition: background 0.2s;
    cursor: pointer;
}
.wa-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.wa-toggle-switch input:checked + .wa-toggle-slider {
    background: #0052CC;
}
.wa-toggle-switch input:checked + .wa-toggle-slider::before {
    transform: translateX(20px);
}
.wa-toggle-text {
    font-size: 14px;
    color: #4b5563;
}

/* Offset inline row */
.wa-offset-inline {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}
.wa-form-half { flex: 1; }
.wa-input-with-unit {
    display: flex;
    align-items: center;
    gap: 0;
}
.wa-input-with-unit .wa-input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}
.wa-unit {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #4b5563;
    box-sizing: border-box;
}

/* Settings page inputs */
#webability-settings input[type="number"].wa-input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: none;
    width: 100%;
}
#webability-settings input[type="number"].wa-input:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    outline: none;
}
#webability-settings select.wa-select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    min-height: 44px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    line-height: 1.4;
    box-shadow: none;
}
#webability-settings select.wa-select:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
    outline: none;
}

/* Save button */
.wa-btn-save-settings {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    width: 100%;
    border: none !important;
    border-radius: 10px !important;
    background: #0052CC !important;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.3) !important;
    height: auto !important;
    text-shadow: none !important;
    box-sizing: border-box;
    line-height: 1.4 !important;
}
.wa-btn-save-settings:hover {
    background: #003d99 !important;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3) !important;
}
.wa-btn-save-settings svg { stroke: #fff; }

/* Verify card */
.wa-verify-card .wa-verify-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 8px;
}
.wa-verify-msg {
    font-size: 13px;
    color: #646970;
    margin: 0;
}
.wa-verify-success .wa-verify-msg {
    color: #16a34a;
    font-weight: 600;
}
.wa-verify-error .wa-verify-msg {
    color: #dc2626;
    font-weight: 600;
}
.wa-btn-verify {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    background: #0052CC !important;
    border-color: #0052CC !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 82, 204, 0.3) !important;
    text-shadow: none !important;
}
.wa-btn-verify:hover {
    background: #003d99 !important;
    border-color: #003d99 !important;
}
.wa-btn-verify svg { stroke: #fff; }

/* Quick links */
.wa-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wa-links-list li {
    padding: 0;
    margin: 0;
}
.wa-links-list a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    font-size: 14px;
    color: #0052CC;
    text-decoration: none;
    transition: background 0.15s;
}
.wa-links-list a:hover {
    background: #f0f7ff;
}

/* Compact badge for trigger icon options — miniature preview of actual widget */
.wa-badge-compact {
    width: auto;
    height: auto;
    display: inline-block;
    background: #0052CC;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

/* Settings responsive */
@media (max-width: 900px) {
    .wa-settings-grid {
        grid-template-columns: 1fr;
    }
    .wa-offset-inline {
        flex-direction: column;
        gap: 8px;
    }
}
