| @@ -266,8 +266,14 @@ | ||
| 266 | 266 | border: 1px solid #e5e5e5; |
| 267 | 267 | text-align: center; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | +/* YouTube import: multi-line radio/description stack reads left-aligned, | |
| 271 | + unlike the single-row URL forms the centered default was made for. */ | |
| 272 | +#mxchat-youtube-input-area { | |
| 273 | + text-align: left; | |
| 274 | +} | |
| 275 | + | |
| 270 | 276 | /* PDF Upload Area */ |
| 271 | 277 | #mxchat-pdf-upload-area input[type="file"] { |
| 272 | 278 | margin-bottom: 12px; |
| 273 | 279 | } |
| @@ -604,8 +610,19 @@ | ||
| 604 | 610 | input:checked + .mxchat-toggle-slider:before { |
| 605 | 611 | transform: translateX(26px); |
| 606 | 612 | } |
| 607 | 613 | |
| 614 | +/* Group-level ACF toggle, mixed state: some fields in the group are excluded. | |
| 615 | + Knob parks mid-track on a washed-out tint of the brand gradient until the | |
| 616 | + owner picks a side (plan bf57e0). */ | |
| 617 | +input:indeterminate + .mxchat-toggle-slider { | |
| 618 | + background: linear-gradient(135deg, #e3b8dd, #b9b6e8); | |
| 619 | +} | |
| 620 | + | |
| 621 | +input:indeterminate + .mxchat-toggle-slider:before { | |
| 622 | + transform: translateX(13px); | |
| 623 | +} | |
| 624 | + | |
| 608 | 625 | .mxchat-toggle-label { |
| 609 | 626 | font-size: 14px; |
| 610 | 627 | color: #333; |
| 611 | 628 | } |
| @@ -1205,8 +1222,12 @@ | ||
| 1205 | 1222 | .rtl input:checked + .mxchat-toggle-slider:before { |
| 1206 | 1223 | transform: translateX(-26px); |
| 1207 | 1224 | } |
| 1208 | 1225 | |
| 1226 | +.rtl input:indeterminate + .mxchat-toggle-slider:before { | |
| 1227 | + transform: translateX(-13px); | |
| 1228 | +} | |
| 1229 | + | |
| 1209 | 1230 | .rtl .mxchat-error-notice { |
| 1210 | 1231 | border-left: none; |
| 1211 | 1232 | border-right: 3px solid #f44336; |
| 1212 | 1233 | } |
| @@ -1274,20 +1295,36 @@ | ||
| 1274 | 1295 | |
| 1275 | 1296 | .mxchat-kb-modal-content { |
| 1276 | 1297 | position: relative; |
| 1277 | 1298 | background-color: #fff; |
| 1278 | - margin: 50px auto; | |
| 1299 | + margin: 24px auto; | |
| 1279 | 1300 | padding: 0; |
| 1280 | 1301 | border-radius: 8px; |
| 1281 | 1302 | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); |
| 1282 | 1303 | width: 90%; |
| 1283 | 1304 | max-width: 1000px; |
| 1305 | + /* The box is the ONLY place height is constrained; children flex within it. | |
| 1306 | + dvh tracks the real visible viewport on mobile (vh line = older-browser fallback). */ | |
| 1284 | 1307 | max-height: 85vh; |
| 1308 | + max-height: min(85vh, calc(100dvh - 48px)); | |
| 1285 | 1309 | display: flex; |
| 1286 | 1310 | flex-direction: column; |
| 1287 | 1311 | animation: mxchat-kb-modal-appear 0.3s ease-out; |
| 1288 | 1312 | } |
| 1289 | 1313 | |
| 1314 | +/* Fixed chrome rows never grow or shrink — the results list is the only scroller. */ | |
| 1315 | +.mxchat-kb-modal-header, | |
| 1316 | +.mxchat-kb-modal-filters, | |
| 1317 | +.mxchat-kb-selection-header, | |
| 1318 | +.mxchat-kb-modal-footer { | |
| 1319 | + flex: 0 0 auto; | |
| 1320 | +} | |
| 1321 | + | |
| 1322 | +/* The footer holds the primary actions — it can never be squeezed out of the box. */ | |
| 1323 | +.mxchat-kb-modal-footer { | |
| 1324 | + flex-shrink: 0; | |
| 1325 | +} | |
| 1326 | + | |
| 1290 | 1327 | @keyframes mxchat-kb-modal-appear { |
| 1291 | 1328 | from { |
| 1292 | 1329 | opacity: 0; |
| 1293 | 1330 | transform: translateY(-30px); |
| @@ -1401,12 +1438,15 @@ | ||
| 1401 | 1438 | border-left: 3px solid #1e88e5; |
| 1402 | 1439 | } |
| 1403 | 1440 | |
| 1404 | 1441 | .mxchat-kb-content-selection { |
| 1405 | - overflow-y: auto; | |
| 1406 | - flex: 1; | |
| 1407 | - min-height: 300px; | |
| 1408 | - max-height: calc(85vh - 200px); | |
| 1442 | + /* Flexible middle region: header row stays put, the list below scrolls. | |
| 1443 | + min-height: 0 is load-bearing — without it flex refuses to shrink this | |
| 1444 | + column and the footer gets pushed out of the box (the mobile bug). */ | |
| 1445 | + flex: 1 1 auto; | |
| 1446 | + min-height: 0; | |
| 1447 | + display: flex; | |
| 1448 | + flex-direction: column; | |
| 1409 | 1449 | } |
| 1410 | 1450 | |
| 1411 | 1451 | .mxchat-kb-selection-header { |
| 1412 | 1452 | display: flex; |
| @@ -1434,8 +1474,12 @@ | ||
| 1434 | 1474 | } |
| 1435 | 1475 | |
| 1436 | 1476 | .mxchat-kb-content-list { |
| 1437 | 1477 | padding: 0; |
| 1478 | + /* The one and only scroller inside the modal. */ | |
| 1479 | + flex: 1 1 auto; | |
| 1480 | + min-height: 0; | |
| 1481 | + overflow-y: auto; | |
| 1438 | 1482 | } |
| 1439 | 1483 | |
| 1440 | 1484 | .mxchat-kb-content-item { |
| 1441 | 1485 | display: flex; |
| @@ -1464,19 +1508,23 @@ | ||
| 1464 | 1508 | align-items: flex-start; |
| 1465 | 1509 | padding-top: 3px; |
| 1466 | 1510 | } |
| 1467 | 1511 | |
| 1512 | +/* Native control, brand-tinted — identical to the "select all" checkbox above the | |
| 1513 | + list, which carries no custom styling at all and renders correctly. | |
| 1514 | + Do NOT re-add width / height / border / border-radius / background here. WP admin | |
| 1515 | + draws the tick as a 21px dashicon positioned with negative margins for its OWN | |
| 1516 | + default box, so forcing a custom box makes the tick overflow it. That mismatch | |
| 1517 | + shipped for a long time but was invisible while the tick was white-on-white. */ | |
| 1468 | 1518 | .mxchat-kb-content-checkbox input[type="checkbox"] { |
| 1469 | - width: 18px; | |
| 1470 | - height: 18px; | |
| 1471 | - border: 1px solid #8c8f94; | |
| 1472 | - border-radius: 3px; | |
| 1473 | - background: #fff; | |
| 1474 | 1519 | margin: 0; |
| 1520 | + cursor: pointer; | |
| 1521 | + accent-color: var(--mxch-primary, #7873f5); | |
| 1475 | 1522 | } |
| 1476 | 1523 | |
| 1477 | -.mxchat-kb-content-checkbox input[type="checkbox"]:checked { | |
| 1478 | - border-color: #7873f5; | |
| 1524 | +.mxchat-kb-content-checkbox input[type="checkbox"]:focus-visible { | |
| 1525 | + outline: 2px solid var(--mxch-primary, #7873f5); | |
| 1526 | + outline-offset: 2px; | |
| 1479 | 1527 | } |
| 1480 | 1528 | |
| 1481 | 1529 | .mxchat-kb-content-details { |
| 1482 | 1530 | flex: 1; |
| @@ -1848,38 +1896,70 @@ | ||
| 1848 | 1896 | |
| 1849 | 1897 | /* Modal responsive adjustments */ |
| 1850 | 1898 | .mxchat-kb-modal-content { |
| 1851 | 1899 | width: 95%; |
| 1852 | - max-height: 90vh; | |
| 1853 | - margin: 20px auto; | |
| 1900 | + /* dvh = real visible viewport (mobile vh includes the URL-bar region); | |
| 1901 | + vh line is the older-browser fallback. */ | |
| 1902 | + max-height: calc(100vh - 24px); | |
| 1903 | + max-height: calc(100dvh - 24px); | |
| 1904 | + margin: 12px auto; | |
| 1905 | + /* Last-resort scroll: on extreme-short viewports (landscape phones) | |
| 1906 | + the compacted chrome + the list's floor can still exceed the box — | |
| 1907 | + scroll inside the box rather than clipping the footer. */ | |
| 1908 | + overflow-y: auto; | |
| 1854 | 1909 | } |
| 1855 | - | |
| 1910 | + | |
| 1911 | + /* Compact the fixed chrome on mobile — stacked filters + a stacked footer | |
| 1912 | + are tall, and every saved pixel goes to the content list. */ | |
| 1913 | + .mxchat-kb-modal-header { | |
| 1914 | + padding: 12px 16px; | |
| 1915 | + } | |
| 1916 | + | |
| 1917 | + .mxchat-kb-modal-header h3 { | |
| 1918 | + font-size: 16px; | |
| 1919 | + } | |
| 1920 | + | |
| 1856 | 1921 | .mxchat-kb-modal-filters { |
| 1857 | 1922 | flex-direction: column; |
| 1858 | 1923 | align-items: stretch; |
| 1924 | + padding: 10px 16px; | |
| 1925 | + gap: 8px; | |
| 1859 | 1926 | } |
| 1860 | - | |
| 1927 | + | |
| 1861 | 1928 | .mxchat-kb-search-group { |
| 1862 | 1929 | max-width: none; |
| 1863 | 1930 | } |
| 1864 | - | |
| 1931 | + | |
| 1865 | 1932 | .mxchat-kb-filter-group { |
| 1866 | 1933 | flex-direction: column; |
| 1934 | + gap: 8px; | |
| 1867 | 1935 | } |
| 1868 | - | |
| 1869 | - .mxchat-kb-content-selection { | |
| 1870 | - max-height: calc(90vh - 250px); | |
| 1936 | + | |
| 1937 | + .mxchat-kb-filter-group select { | |
| 1938 | + padding: 6px 30px 6px 10px; | |
| 1871 | 1939 | } |
| 1872 | - | |
| 1940 | + | |
| 1873 | 1941 | .mxchat-kb-selection-header { |
| 1874 | 1942 | flex-direction: column; |
| 1875 | 1943 | align-items: flex-start; |
| 1876 | - gap: 10px; | |
| 1944 | + gap: 6px; | |
| 1945 | + padding: 10px 16px; | |
| 1877 | 1946 | } |
| 1878 | - | |
| 1947 | + | |
| 1948 | + /* Guarantee a usable slice of visible rows — reachable buttons are no | |
| 1949 | + help if there is nothing to select above them. */ | |
| 1950 | + .mxchat-kb-content-list { | |
| 1951 | + min-height: 96px; | |
| 1952 | + } | |
| 1953 | + | |
| 1954 | + .mxchat-kb-content-item { | |
| 1955 | + padding: 10px 16px; | |
| 1956 | + } | |
| 1957 | + | |
| 1879 | 1958 | .mxchat-kb-modal-footer { |
| 1880 | 1959 | flex-direction: column; |
| 1881 | - gap: 10px; | |
| 1960 | + gap: 8px; | |
| 1961 | + padding: 10px 16px; | |
| 1882 | 1962 | } |
| 1883 | 1963 | |
| 1884 | 1964 | .mxchat-kb-modal-footer .mxchat-kb-pagination { |
| 1885 | 1965 | width: 100%; |
| @@ -3749,13 +3829,18 @@ | ||
| 3749 | 3829 | } |
| 3750 | 3830 | |
| 3751 | 3831 | .mxchat-kb-edit-modal-content { |
| 3752 | 3832 | max-width: 760px; |
| 3833 | + /* Same viewport-safe cap as the content-selector modal (vh = fallback). */ | |
| 3753 | 3834 | max-height: 90vh; |
| 3835 | + max-height: min(90vh, calc(100dvh - 24px)); | |
| 3754 | 3836 | } |
| 3755 | 3837 | |
| 3756 | 3838 | .mxchat-kb-edit-body { |
| 3757 | - flex: 1; | |
| 3839 | + flex: 1 1 auto; | |
| 3840 | + /* min-height: 0 lets the body shrink inside the capped modal box so the | |
| 3841 | + footer (Save/Cancel) can never be pushed below the viewport. */ | |
| 3842 | + min-height: 0; | |
| 3758 | 3843 | display: flex; |
| 3759 | 3844 | flex-direction: column; |
| 3760 | 3845 | padding: 20px; |
| 3761 | 3846 | overflow: hidden; |
| @@ -3808,8 +3893,10 @@ | ||
| 3808 | 3893 | justify-content: space-between; |
| 3809 | 3894 | padding: 14px 20px; |
| 3810 | 3895 | border-top: 1px solid #e5e5e5; |
| 3811 | 3896 | gap: 12px; |
| 3897 | + /* Action row can never be squeezed out of the box. */ | |
| 3898 | + flex-shrink: 0; | |
| 3812 | 3899 | } |
| 3813 | 3900 | |
| 3814 | 3901 | .mxchat-kb-edit-notice { |
| 3815 | 3902 | flex: 1; |
| @@ -3823,8 +3910,45 @@ | ||
| 3823 | 3910 | gap: 8px; |
| 3824 | 3911 | flex-shrink: 0; |
| 3825 | 3912 | } |
| 3826 | 3913 | |
| 3914 | +/* ── Knowledge Inspector modal (plan-d8cb4b) ────────────────────────── | |
| 3915 | + Read-only "View indexed content" viewer. Reuses the Testing tab's | |
| 3916 | + match-card / chunk-detail components (admin-testing-tab.css, scoped under | |
| 3917 | + .mxch-testing-results) so it looks native; this block only adds the modal | |
| 3918 | + body scroll + the chunk-text container the Testing tab doesn't have. */ | |
| 3919 | +.mxchat-kb-inspect-body { | |
| 3920 | + flex: 1 1 auto; | |
| 3921 | + /* Same footer-pushout guard as the edit modal. */ | |
| 3922 | + min-height: 0; | |
| 3923 | + display: flex; | |
| 3924 | + flex-direction: column; | |
| 3925 | + padding: 20px; | |
| 3926 | + overflow-y: auto; | |
| 3927 | + gap: 12px; | |
| 3928 | +} | |
| 3929 | +/* The modal body is the scroll container — let the inner results grow naturally | |
| 3930 | + instead of the Testing tab's own 400px inner scroll (avoids a double scrollbar). */ | |
| 3931 | +.mxchat-kb-inspect-body .mxch-testing-results { | |
| 3932 | + max-height: none; | |
| 3933 | + overflow: visible; | |
| 3934 | +} | |
| 3935 | +.mxch-kb-inspect-chunk-text { | |
| 3936 | + margin: 8px 0 0; | |
| 3937 | + padding: 12px 14px; | |
| 3938 | + background: #f8fafc; | |
| 3939 | + border: 1px solid #e2e8f0; | |
| 3940 | + border-radius: 6px; | |
| 3941 | + max-height: 260px; | |
| 3942 | + overflow-y: auto; | |
| 3943 | + white-space: pre-wrap; | |
| 3944 | + word-break: break-word; | |
| 3945 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
| 3946 | + font-size: 13px; | |
| 3947 | + line-height: 1.6; | |
| 3948 | + color: var(--mxch-text-primary, #334155); | |
| 3949 | +} | |
| 3950 | + | |
| 3827 | 3951 | .mxchat-kb-edit-save-spinner { |
| 3828 | 3952 | display: inline-flex; |
| 3829 | 3953 | align-items: center; |
| 3830 | 3954 | gap: 6px; |
| @@ -3834,9 +3958,10 @@ | ||
| 3834 | 3958 | .mxchat-kb-edit-modal-content { |
| 3835 | 3959 | width: 96%; |
| 3836 | 3960 | max-width: 96%; |
| 3837 | 3961 | margin: 10px auto; |
| 3838 | - max-height: 95vh; | |
| 3962 | + max-height: calc(100vh - 20px); | |
| 3963 | + max-height: calc(100dvh - 20px); | |
| 3839 | 3964 | } |
| 3840 | 3965 | .mxchat-kb-edit-body { |
| 3841 | 3966 | padding: 14px; |
| 3842 | 3967 | } |
| @@ -3854,5 +3979,105 @@ | ||
| 3854 | 3979 | .mxchat-kb-edit-actions .mxch-btn { |
| 3855 | 3980 | flex: 1; |
| 3856 | 3981 | text-align: center; |
| 3857 | 3982 | } |
| 3858 | -} | |
| 3983 | +} | |
| 3984 | +/* ========================================================================== | |
| 3985 | + Custom Meta-key discovery picker (plan-mxchat-20260709-fe8e4e) | |
| 3986 | + Canon-token chip picker mirroring the ACF discovery UX for non-ACF meta. | |
| 3987 | + ========================================================================== */ | |
| 3988 | +.mxchat-meta-scan-controls { | |
| 3989 | + display: flex; | |
| 3990 | + align-items: center; | |
| 3991 | + flex-wrap: wrap; | |
| 3992 | + gap: 12px; | |
| 3993 | + margin-bottom: 12px; | |
| 3994 | +} | |
| 3995 | +#mxchat-scan-meta-btn { | |
| 3996 | + display: inline-flex; | |
| 3997 | + align-items: center; | |
| 3998 | + gap: 8px; | |
| 3999 | +} | |
| 4000 | +.mxchat-meta-scan-internal { | |
| 4001 | + display: inline-flex; | |
| 4002 | + align-items: center; | |
| 4003 | + gap: 6px; | |
| 4004 | + font-size: 13px; | |
| 4005 | + color: var(--mxch-text-secondary, #64748b); | |
| 4006 | + cursor: pointer; | |
| 4007 | +} | |
| 4008 | +.mxchat-meta-scan-loading, | |
| 4009 | +.mxchat-meta-scan-empty { | |
| 4010 | + font-size: 13px; | |
| 4011 | + color: var(--mxch-text-secondary, #64748b); | |
| 4012 | + margin: 8px 0 0; | |
| 4013 | +} | |
| 4014 | +.mxchat-meta-chip-grid { | |
| 4015 | + display: grid; | |
| 4016 | + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); | |
| 4017 | + gap: 10px; | |
| 4018 | + margin-top: 12px; | |
| 4019 | +} | |
| 4020 | +.mxchat-meta-chip { | |
| 4021 | + display: flex; | |
| 4022 | + flex-direction: column; | |
| 4023 | + align-items: flex-start; | |
| 4024 | + gap: 4px; | |
| 4025 | + text-align: left; | |
| 4026 | + width: 100%; | |
| 4027 | + padding: 10px 12px; | |
| 4028 | + background: var(--mxch-card-bg, #fff); | |
| 4029 | + border: 1px solid var(--mxch-card-border, #e2e8f0); | |
| 4030 | + border-radius: var(--mxch-radius-md, 8px); | |
| 4031 | + cursor: pointer; | |
| 4032 | + transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; | |
| 4033 | +} | |
| 4034 | +.mxchat-meta-chip:hover { | |
| 4035 | + border-color: var(--mxch-primary, #7873f5); | |
| 4036 | + box-shadow: 0 1px 4px rgba(120, 115, 245, 0.15); | |
| 4037 | +} | |
| 4038 | +.mxchat-meta-chip-main { | |
| 4039 | + display: flex; | |
| 4040 | + align-items: baseline; | |
| 4041 | + flex-wrap: wrap; | |
| 4042 | + gap: 8px; | |
| 4043 | +} | |
| 4044 | +.mxchat-meta-chip-name { | |
| 4045 | + font-weight: 600; | |
| 4046 | + color: var(--mxch-text-primary, #1a1a2e); | |
| 4047 | + font-size: 13px; | |
| 4048 | +} | |
| 4049 | +.mxchat-meta-chip-key { | |
| 4050 | + font-family: monospace; | |
| 4051 | + font-size: 11px; | |
| 4052 | + color: var(--mxch-text-muted, #94a3b8); | |
| 4053 | + background: #f1f5f9; | |
| 4054 | + padding: 1px 6px; | |
| 4055 | + border-radius: 4px; | |
| 4056 | +} | |
| 4057 | +.mxchat-meta-chip-meta { | |
| 4058 | + font-size: 11px; | |
| 4059 | + color: var(--mxch-text-muted, #94a3b8); | |
| 4060 | + white-space: nowrap; | |
| 4061 | + overflow: hidden; | |
| 4062 | + text-overflow: ellipsis; | |
| 4063 | + max-width: 100%; | |
| 4064 | +} | |
| 4065 | +.mxchat-meta-chip-tick { | |
| 4066 | + font-size: 11px; | |
| 4067 | + font-weight: 600; | |
| 4068 | + color: var(--mxch-primary, #7873f5); | |
| 4069 | + margin-top: 2px; | |
| 4070 | +} | |
| 4071 | +.mxchat-meta-chip.is-added { | |
| 4072 | + border-color: var(--mxch-success, #10b981); | |
| 4073 | + background: rgba(16, 185, 129, 0.06); | |
| 4074 | + cursor: default; | |
| 4075 | +} | |
| 4076 | +.mxchat-meta-chip.is-added .mxchat-meta-chip-tick { | |
| 4077 | + color: var(--mxch-success, #10b981); | |
| 4078 | +} | |
| 4079 | +@media (max-width: 782px) { | |
| 4080 | + .mxchat-meta-chip-grid { | |
| 4081 | + grid-template-columns: 1fr; | |
| 4082 | + } | |
| 4083 | +} | |