| @@ -40,8 +40,10 @@ | ||
| 40 | 40 | |
| 41 | 41 | /* Status Colors */ |
| 42 | 42 | --mxch-success: #10b981; |
| 43 | 43 | --mxch-warning: #f59e0b; |
| 44 | + --mxch-warning-light: rgba(245, 158, 11, 0.12); | |
| 45 | + --mxch-warning-text: #92400e; | |
| 44 | 46 | --mxch-error: #ef4444; |
| 45 | 47 | --mxch-info: #3b82f6; |
| 46 | 48 | |
| 47 | 49 | /* Spacing */ |
| @@ -92,8 +94,49 @@ | ||
| 92 | 94 | } |
| 93 | 95 | } |
| 94 | 96 | |
| 95 | 97 | /* ========================================================================== |
| 98 | + RTL locales (Arabic, Hebrew, Persian, Urdu, …) | |
| 99 | + On an RTL locale WordPress moves its admin menu to the RIGHT and sets the | |
| 100 | + `rtl` class + `direction: rtl` on <body>. The base wrapper is pinned | |
| 101 | + `left: 160px; right: 0` for a LEFT-side admin menu, so under RTL its right | |
| 102 | + edge slides under the (now right-side) WP menu and a dead 160px gap opens on | |
| 103 | + the left — the nav ends up hidden/overlapped. Mirror the fixed offsets and | |
| 104 | + the negative content margin. The internal sidebar/content flex row reverses | |
| 105 | + automatically under the inherited `direction: rtl`, so the sidebar lands on | |
| 106 | + the wrapper's right edge (just inside the WP menu) as expected for RTL — no | |
| 107 | + per-child repositioning needed. | |
| 108 | + ========================================================================== */ | |
| 109 | +body.rtl .mxch-admin-wrapper { | |
| 110 | + left: 0; | |
| 111 | + right: 160px; /* WordPress admin menu width (now on the right) */ | |
| 112 | + margin-left: 0; | |
| 113 | + margin-right: -20px; | |
| 114 | +} | |
| 115 | + | |
| 116 | +/* Collapsed/folded admin menu (narrower) on RTL */ | |
| 117 | +body.rtl.folded .mxch-admin-wrapper { | |
| 118 | + left: 0; | |
| 119 | + right: 36px; | |
| 120 | +} | |
| 121 | + | |
| 122 | +/* On mobile the WP admin menu collapses to the top bar, so the wrapper is | |
| 123 | + full-width in both directions — clear the RTL right offset too. */ | |
| 124 | +@media screen and (max-width: 782px) { | |
| 125 | + body.rtl .mxch-admin-wrapper { | |
| 126 | + left: 0; | |
| 127 | + right: 0; | |
| 128 | + margin-right: 0; | |
| 129 | + } | |
| 130 | +} | |
| 131 | + | |
| 132 | +/* Active nav-item accent sits on the sidebar's inner edge; flip it for RTL. */ | |
| 133 | +body.rtl .mxch-nav-link.active { | |
| 134 | + border-right: none; | |
| 135 | + border-left: 3px solid var(--mxch-primary); | |
| 136 | +} | |
| 137 | + | |
| 138 | +/* ========================================================================== | |
| 96 | 139 | Sidebar Navigation |
| 97 | 140 | ========================================================================== */ |
| 98 | 141 | .mxch-sidebar { |
| 99 | 142 | width: var(--mxch-sidebar-width); |
| @@ -1154,8 +1197,23 @@ | ||
| 1154 | 1197 | flex: 1; |
| 1155 | 1198 | margin-bottom: 0; |
| 1156 | 1199 | } |
| 1157 | 1200 | |
| 1201 | +/* Global cap "Current usage" readout (plan-mxchat-20260603-e9b3f9) */ | |
| 1202 | +.mxch-rate-limit-usage { | |
| 1203 | + margin-top: var(--mxch-spacing-md); | |
| 1204 | + padding-top: var(--mxch-spacing-md); | |
| 1205 | + border-top: 1px solid var(--mxch-card-border); | |
| 1206 | +} | |
| 1207 | + | |
| 1208 | +.mxch-rate-limit-usage-head { | |
| 1209 | + display: flex; | |
| 1210 | + align-items: center; | |
| 1211 | + justify-content: space-between; | |
| 1212 | + gap: var(--mxch-spacing-md); | |
| 1213 | + margin-bottom: var(--mxch-spacing-xs); | |
| 1214 | +} | |
| 1215 | + | |
| 1158 | 1216 | /* ========================================================================== |
| 1159 | 1217 | Buttons |
| 1160 | 1218 | ========================================================================== */ |
| 1161 | 1219 | .mxch-btn { |
| @@ -1287,8 +1345,15 @@ | ||
| 1287 | 1345 | color: #991b1b; |
| 1288 | 1346 | border: 1px solid #fecaca; |
| 1289 | 1347 | } |
| 1290 | 1348 | |
| 1349 | +/* Standalone notice sitting between a content header and the first card. | |
| 1350 | + Token-based replacement for the inline margin declarations this component | |
| 1351 | + has been carrying at its call sites (b65e8d). */ | |
| 1352 | +.mxch-notice-block { | |
| 1353 | + margin-bottom: var(--mxch-spacing-lg); | |
| 1354 | +} | |
| 1355 | + | |
| 1291 | 1356 | /* ========================================================================== |
| 1292 | 1357 | Disclosure (collapsible <details>) |
| 1293 | 1358 | Generic Advanced/opt-in surface — used for static-bearer fallback on |
| 1294 | 1359 | mxchat-mcp's Connected Apps tab, and any add-on that needs the same |
| @@ -2076,8 +2141,43 @@ | ||
| 2076 | 2141 | .mxch-admin-wrapper .slider-container + .feedback-container { |
| 2077 | 2142 | margin-left: 15px; |
| 2078 | 2143 | } |
| 2079 | 2144 | |
| 2145 | +/* Persistent unsaved-state badge (plan 7787f8). Quiet warning, not an error: | |
| 2146 | + a field whose value differs from its last-saved state carries this on its | |
| 2147 | + label until the autosave round-trip confirms. */ | |
| 2148 | +.mxch-admin-wrapper .mxchat-unsaved-badge { | |
| 2149 | + display: inline-flex; | |
| 2150 | + align-items: center; | |
| 2151 | + gap: 5px; | |
| 2152 | + margin-left: 8px; | |
| 2153 | + padding: 1px 8px 1px 6px; | |
| 2154 | + border-radius: 10px; | |
| 2155 | + background: var(--mxch-warning-light); | |
| 2156 | + color: var(--mxch-warning-text); | |
| 2157 | + font-size: 11px; | |
| 2158 | + font-weight: 600; | |
| 2159 | + line-height: 1.6; | |
| 2160 | + letter-spacing: 0.2px; | |
| 2161 | + vertical-align: middle; | |
| 2162 | + white-space: nowrap; | |
| 2163 | + animation: mxchUnsavedIn 0.15s ease-out; | |
| 2164 | +} | |
| 2165 | + | |
| 2166 | +.mxch-admin-wrapper .mxchat-unsaved-badge::before { | |
| 2167 | + content: ''; | |
| 2168 | + width: 6px; | |
| 2169 | + height: 6px; | |
| 2170 | + border-radius: 50%; | |
| 2171 | + background: var(--mxch-warning); | |
| 2172 | + flex: none; | |
| 2173 | +} | |
| 2174 | + | |
| 2175 | +@keyframes mxchUnsavedIn { | |
| 2176 | + from { opacity: 0; transform: translateY(1px); } | |
| 2177 | + to { opacity: 1; transform: none; } | |
| 2178 | +} | |
| 2179 | + | |
| 2080 | 2180 | /* ========================================================================== |
| 2081 | 2181 | Real-time Entry Updates |
| 2082 | 2182 | ========================================================================== */ |
| 2083 | 2183 | |
| @@ -2829,21 +2929,46 @@ | ||
| 2829 | 2929 | .mxch-dashboard-grid { |
| 2830 | 2930 | grid-template-columns: 1fr; |
| 2831 | 2931 | } |
| 2832 | 2932 | } |
| 2933 | + | |
| 2934 | +/* ------------------------------------------------------------------ | |
| 2935 | + * Test Streaming Compatibility button (AI Models page) | |
| 2936 | + * Branded .mxch-btn replacing the legacy WP button + dashicon wrench. | |
| 2937 | + * ------------------------------------------------------------------ */ | |
| 2938 | +.mxch-streaming-test-row { | |
| 2939 | + margin-top: var(--mxch-spacing-md, 16px); | |
| 2940 | +} | |
| 2941 | +.mxch-streaming-test-row .mxch-streaming-test-icon { | |
| 2942 | + vertical-align: middle; | |
| 2943 | + margin-right: 8px; | |
| 2944 | +} | |
| 2945 | +.mxch-streaming-test-result { | |
| 2946 | + margin-top: var(--mxch-spacing-sm, 12px); | |
| 2947 | + font-weight: 600; | |
| 2948 | + color: var(--mxch-text-primary, #1a1a2e); | |
| 2949 | +} | |
| 2833 | 2950 | |
| 2834 | 2951 | /* ------------------------------------------------------------------ |
| 2835 | - * Test Streaming Compatibility button (AI Models page) | |
| 2836 | - * Branded .mxch-btn replacing the legacy WP button + dashicon wrench. | |
| 2952 | + * Status pill — documented shell component (CLAUDE.md design table). | |
| 2953 | + * Moved here from admin-api-page.php's inline <style> (plan b6e4d4) so | |
| 2954 | + * every admin page renders it, not just the API page. Rules are | |
| 2955 | + * byte-identical to the inline originals. | |
| 2837 | 2956 | * ------------------------------------------------------------------ */ |
| 2838 | -.mxch-streaming-test-row { | |
| 2839 | - margin-top: var(--mxch-spacing-md, 16px); | |
| 2957 | +.mxch-status-pill { | |
| 2958 | + display: inline-flex; | |
| 2959 | + align-items: center; | |
| 2960 | + gap: 6px; | |
| 2961 | + padding: 4px 10px; | |
| 2962 | + border-radius: 999px; | |
| 2963 | + font-size: 12px; | |
| 2964 | + font-weight: 600; | |
| 2840 | 2965 | } |
| 2841 | -.mxch-streaming-test-row .mxch-streaming-test-icon { | |
| 2842 | - vertical-align: middle; | |
| 2843 | - margin-right: 8px; | |
| 2966 | +.mxch-status-pill .mxch-status-dot { | |
| 2967 | + width: 8px; | |
| 2968 | + height: 8px; | |
| 2969 | + border-radius: 50%; | |
| 2844 | 2970 | } |
| 2845 | -.mxch-streaming-test-result { | |
| 2846 | - margin-top: var(--mxch-spacing-sm, 12px); | |
| 2847 | - font-weight: 600; | |
| 2848 | - color: var(--mxch-text-primary, #1a1a2e); | |
| 2849 | -} | |
| 2971 | +.mxch-status-pill-active { background: #e6f4ea; color: #1d7a3a; } | |
| 2972 | +.mxch-status-pill-active .mxch-status-dot { background: #1d7a3a; } | |
| 2973 | +.mxch-status-pill-disabled { background: #fef3e2; color: #a04a00; } | |
| 2974 | +.mxch-status-pill-disabled .mxch-status-dot { background: #a04a00; } | |