attr-extraction.css 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. :root {
  2. --text: #0b1220; /* primary text on white */
  3. --muted: #5b6b80; /* secondary text */
  4. --brand: #2563eb; /* blue */
  5. --brand-2: #27B7C1; /* teal */
  6. --accent: #7c3aed; /* violet */
  7. --danger: #ef4444; /* red */
  8. --success: #16a34a; /* green */
  9. --chip: #f5f7fb; /* chip bg */
  10. --border: #e5eaf2; /* light border */
  11. --shadow: 0 8px 24px rgba(17, 24, 39, .08);
  12. --radius: 14px;
  13. --card: #ffffff; /* card bg on white */
  14. --row-hover: #e6effd; /* subtle hover border tint */
  15. --zebra: #fafbfc;
  16. }
  17. .form-check-input:checked{
  18. background-color: #49B5E0;
  19. border-color: #49B5E0
  20. ;
  21. }
  22. /* * { box-sizing: border-box; } */
  23. html, body { height: 100%; }
  24. body {
  25. margin: 0;
  26. /* font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji"; */
  27. color: var(--text);
  28. background: #ffffff; /* White background */
  29. letter-spacing: .2px;
  30. }
  31. .container { max-width: 1200px; margin: 24px auto 80px; padding: 0 20px; font-size: 12px; }
  32. header.hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-bottom: 20px; }
  33. .title { display: flex; align-items: center; gap: 14px; }
  34. .title-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; box-shadow: var(--shadow); }
  35. .title-logo svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
  36. h1 { font-size: 1.6rem; margin: 0; letter-spacing: .3px; }
  37. .sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
  38. .actions { display: flex; gap: 10px; flex-wrap: wrap; }
  39. /* button, .btn {
  40. appearance: none; border: 1px solid var(--border); cursor: pointer;
  41. padding: 10px 14px; border-radius: 10px; font-weight: 600;
  42. color: var(--text); background: #ffffff; transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
  43. box-shadow: var(--shadow);
  44. } */
  45. /* .btn:hover{
  46. color: black !important;
  47. } */
  48. /* button:hover { transform: translateY(-1px); border-color: #cbd5e1; } */
  49. /* .btn-secondary { background: #f7fafc; } */
  50. /* .btn-ghost { background: transparent; color: var(--muted); border-style: dashed; } */
  51. /* .btn-success { background: linear-gradient(135deg, #eef2ff, #e6fffa); color: var(--text); } */
  52. /* Single-column layout */
  53. .grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
  54. .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  55. .card h2 { margin: 0; font-size: 1.1rem; }
  56. .card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; }
  57. .card-body { padding: 14px 16px; }
  58. .toolbar { display:flex; align-items:center; gap:10px; flex-wrap: wrap; }
  59. .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--chip); color: #2e3a49; border: 1px solid var(--border); font-size: .85rem; }
  60. /* Segmented Toggle */
  61. .seg { display:inline-flex; border:1px solid var(--border); border-radius: 999px; overflow:hidden; background: #fff; box-shadow: var(--shadow); }
  62. .seg button { border:none; background:#fff; padding:8px 12px; font-weight:700; color:#334155; cursor:pointer; }
  63. .seg button + button { border-left:1px solid var(--border); }
  64. .seg button.active { background: #eff6ff; color:#1e3a8a; }
  65. /* Cards layout */
  66. .list { display: grid; gap: 12px; }
  67. .product { display: grid; grid-template-columns: 64px 1fr 1fr auto; gap: 12px; align-items: start; padding: 10px; border-radius: 12px; background: #ffffff; border: 1px solid var(--border); cursor: pointer; }
  68. .product:hover { border-color: var(--row-hover); }
  69. .product.selected { outline: 2px solid var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
  70. .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; position: relative; background: #f3f4f6; border:1px solid var(--border); }
  71. .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  72. .thumb .fallback { position:absolute; inset:0; display:grid; place-items:center; color:#64748b; font-weight:700; font-size: .8rem; background: #f8fafc; }
  73. .meta { display: grid; gap: 4px; }
  74. .meta .name { font-weight: 700; }
  75. .meta .desc { color: var(--muted); font-size: .92rem; }
  76. .badges { display:flex; gap:6px; flex-wrap: wrap; }
  77. .select { display:flex; align-items:center; gap:8px; }
  78. input[type="checkbox"] { width: 18px; height: 18px; }
  79. .divider { height:1px; background: var(--border); margin: 14px 0; }
  80. /* Inline attributes in cards */
  81. .attr-inline { grid-column: 1 / -1; margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
  82. .attr-inline .section-title { display:flex; align-items:center; gap:10px; margin: 6px 0 8px; color: var(--muted); }
  83. .chips { display:flex; flex-wrap:wrap; gap:8px; }
  84. .chip { background: var(--chip); border: 1px solid var(--border); border-radius: 999px; padding: 6px 9px; font-size: .86rem; display: inline-flex; gap: 8px; align-items: center; color: #1f2937; }
  85. .chip .k { color:#475569; }
  86. .chip .v { color:#111827; font-weight:600; }
  87. .chip.new { outline: 2px solid var(--brand-2); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
  88. /* .chip.new::after { content: 'NEW'; margin-left: 6px; font-size: .68rem; background: var(--text); color: #07221f; padding: 3px 6px; border-radius: 999px; font-weight: 900; letter-spacing:.4px; } */
  89. /* Table layout */
  90. .table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
  91. table { width: 100%; border-collapse: collapse; background:#fff; }
  92. thead { background:#f8fafc; border-bottom:1px solid var(--border); }
  93. th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: .93rem; vertical-align: top; }
  94. tbody tr:nth-child(odd) { background: var(--zebra); }
  95. tbody tr:hover { background: #f0f7ff; }
  96. td.select-cell { width: 60px; }
  97. td.thumb-cell { width: 60px; }
  98. .mini-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border:1px solid var(--border); background:#f3f4f6; display:grid; place-items:center; }
  99. .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
  100. .mini-thumb .fallback { color:#64748b; font-weight:700; font-size:.8rem; }
  101. .badge { display:inline-block; padding: 4px 8px; border-radius:999px; background:#eef2ff; color:#01445E; font-size:.8rem; border:1px solid #e5e7eb; }
  102. /* Detail rows for table */
  103. .detail-row td { background:#ffffff; }
  104. .detail-content { padding: 10px 6px; border-left: 4px solid var(--brand-2); border-radius: 8px; background:#f8fafc; }
  105. .detail-content .section-title { display:flex; align-items:center; gap:10px; margin: 6px 0 8px; color: var(--muted); }
  106. .summary {
  107. display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px;
  108. }
  109. .summary .stat { border:1px solid var(--border); padding: 12px; border-radius: 12px; text-align:center; }
  110. .stat .label { color: var(--muted); font-size:.85rem; }
  111. .stat .value { font-size: 1.25rem; font-weight: 800; }
  112. .empty { color: var(--muted); padding: 6px 0; }
  113. /* Upload: dropzone + status */
  114. .dropzone { border: 2px dashed var(--border); padding: 18px; text-align:center; background:#fafbfc; color:#475569; }
  115. .dropzone.drag { background:#eef6ff; border-color:#93c5fd; }
  116. .file-info { color: var(--muted); font-size:.9rem; }
  117. /* Optional success/error coloring */
  118. #uploadStatus.success { color: #16a34a; }
  119. #uploadStatus.error { color: #ef4444; }
  120. /* Pagination bar */
  121. .pagination-bar {
  122. margin-top: 12px;
  123. padding-top: 10px;
  124. border-top: 1px solid var(--border);
  125. display: flex;
  126. flex-wrap: wrap;
  127. gap: 10px;
  128. align-items: center;
  129. justify-content: space-between;
  130. }
  131. .page-size {
  132. display: inline-flex;
  133. gap: 8px;
  134. align-items: center;
  135. color: var(--muted);
  136. font-size: .92rem;
  137. }
  138. .page-size select {
  139. border: 1px solid var(--border);
  140. background: #fff;
  141. padding: 6px 10px;
  142. border-radius: 8px;
  143. font-weight: 600;
  144. }
  145. .pager {
  146. display: inline-flex;
  147. gap: 8px;
  148. align-items: center;
  149. }
  150. .pager-btn {
  151. border: 1px solid var(--border);
  152. background: #fff;
  153. padding: 6px 10px;
  154. border-radius: 8px;
  155. cursor: pointer;
  156. box-shadow: var(--shadow);
  157. font-weight: 600;
  158. color: var(--text);
  159. }
  160. .pager-btn[disabled] {
  161. opacity: .5;
  162. cursor: not-allowed;
  163. }
  164. .page-info {
  165. color: var(--muted);
  166. font-weight: 600;
  167. }
  168. /* loader */
  169. #full-page-loader {
  170. position: fixed;
  171. top: 0;
  172. left: 0;
  173. width: 100%;
  174. height: 100%;
  175. background-color: rgba(0, 0, 0, 0.6); /* semi-transparent black */
  176. z-index: 9999;
  177. display: flex;
  178. justify-content: center;
  179. align-items: center;
  180. }
  181. .loader-overlay .spinner-border {
  182. width: 3rem;
  183. height: 3rem;
  184. }
  185. .select-attr {
  186. margin-left: 10px;
  187. font-size: 0.9em;
  188. color: #666;
  189. }
  190. /* Make attribute groups display in two columns */
  191. .attribute-selectors {
  192. display: grid;
  193. grid-template-columns: repeat(2, 1fr); /* Two equal columns */
  194. gap: 10px; /* Space between columns */
  195. max-width: 800px; /* Optional: Limit max width */
  196. }
  197. /* Make section headers span full width */
  198. .mandatory-title,
  199. .optional-title {
  200. grid-column: span 2; /* Make them stretch across both columns */
  201. }
  202. /* Make each attribute group fill one column */
  203. .attribute-chip-group {
  204. width: 100%; /* Ensure full use of column space */
  205. }
  206. /*
  207. /* General layout */
  208. .attribute-selectors {
  209. /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
  210. max-width: none;
  211. margin: 5px auto;
  212. padding: 10px;
  213. background-color: #fff;
  214. border: 1px solid #ddd;
  215. border-radius: 10px;
  216. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  217. width: max-content;
  218. }
  219. /* Section titles */
  220. .mandatory-title,
  221. .optional-title {
  222. font-size: 1.2em;
  223. font-weight: 600;
  224. color: #333;
  225. margin-bottom: 0px;
  226. padding-left: 5px;
  227. border-left: 4px solid #007BFF;
  228. }
  229. /* Attribute group block */
  230. .attribute-chip-group {
  231. margin-bottom: 15px;
  232. }
  233. /* Attribute headers */
  234. .attribute-header {
  235. font-size: 1em;
  236. font-weight: 500;
  237. color: #555;
  238. margin-bottom: 5px;
  239. }
  240. /* Chips container layout */
  241. .chips-container {
  242. display: flex;
  243. flex-wrap: wrap;
  244. gap: 10px;
  245. }
  246. /* Individual chip */
  247. .attribute-chip {
  248. display: inline-flex;
  249. align-items: center;
  250. background-color: #f0f4f8;
  251. border: 1px solid #ccc;
  252. border-radius: 20px;
  253. padding: 2px 10px;
  254. cursor: pointer;
  255. transition: background-color 0.2s, box-shadow 0.2s;
  256. user-select: none;
  257. font-size: 0.95em;
  258. }
  259. /* Hide the native checkbox */
  260. .attribute-chip input[type="checkbox"] {
  261. display: none;
  262. }
  263. /* Style span inside chip */
  264. .attribute-chip span {
  265. color: #333;
  266. }
  267. /* Highlight chip when selected */
  268. .attribute-chip input[type="checkbox"]:checked + span {
  269. font-weight: 600;
  270. color: #007BFF;
  271. }
  272. /* Add visual feedback for selected chips */
  273. .attribute-chip input[type="checkbox"]:checked + span::before {
  274. content: "✔ ";
  275. color: #007BFF;
  276. margin-right: 4px;
  277. }
  278. /* Hover effect */
  279. .attribute-chip:hover {
  280. background-color: #e6f0ff;
  281. border-color: #007BFF;
  282. box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
  283. }
  284. /* Responsive */
  285. @media (max-width: 600px) {
  286. .chips-container {
  287. flex-direction: column;
  288. gap: 8px;
  289. }
  290. .attribute-chip {
  291. width: 100%;
  292. justify-content: center;
  293. }
  294. }
  295. /* MOBILE STYLING */
  296. @media (max-width: 600px) {
  297. .product {
  298. grid-template-columns: 48px auto;
  299. grid-template-rows: auto auto;
  300. gap: 8px;
  301. align-items: center;
  302. padding: 12px;
  303. }
  304. .product > :nth-child(2),
  305. .product > :nth-child(3) {
  306. grid-column: 2 / span 1;
  307. }
  308. .product > :nth-child(4) {
  309. grid-column: 1 / -1;
  310. justify-self: end;
  311. margin-top: 8px;
  312. }
  313. }
  314. /* @media (max-width: 600px) {
  315. .attribute-selectors {
  316. grid-template-columns: 1fr;
  317. }
  318. .chips-container {
  319. flex-direction: column;
  320. gap: 8px;
  321. }
  322. .attribute-chip {
  323. width: 100%;
  324. justify-content: center;
  325. }
  326. } */
  327. td{
  328. font-size: 12px;
  329. }
  330. .toolbar {
  331. display: flex;
  332. align-items: center;
  333. gap: 10px;
  334. flex-wrap: wrap;
  335. }
  336. #thresholdRange {
  337. width: 150px;
  338. }
  339. /* Optional: style tweaks */
  340. #mandatory-attributes {
  341. min-width: 200px;
  342. width: auto !important; /* Override inline style */
  343. }
  344. .select2-container--default .select2-selection--multiple .select2-selection__clear{
  345. color: red;
  346. }
  347. /* inline table css for inside table */
  348. /* Container for the inline detail content */
  349. .detail-content-tables {
  350. padding: 15px;
  351. background-color: #f7f7f7;
  352. border-top: 3px solid #007bff; /* Primary color separator */
  353. border-bottom: 1px solid #ddd;
  354. }
  355. /* Titles and Separators */
  356. .section-title h2 {
  357. color: #333;
  358. font-size: 1.2em;
  359. margin-top: 20px;
  360. margin-bottom: 10px;
  361. border-bottom: 2px solid #ccc;
  362. padding-bottom: 5px;
  363. }
  364. .section-title h3 {
  365. color: #555;
  366. font-size: 1em;
  367. font-weight: 600;
  368. margin: 15px 0 8px;
  369. }
  370. .section-separator {
  371. border: 0;
  372. height: 1px;
  373. background-color: #ddd;
  374. margin: 20px 0;
  375. }
  376. /* Table Styling for Attribute Details */
  377. .attribute-detail-table {
  378. width: 100%;
  379. border-collapse: collapse;
  380. margin-bottom: 2px;
  381. background-color: #fff;
  382. box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  383. }
  384. .attribute-detail-table th,
  385. .attribute-detail-table td {
  386. padding: 10px 15px;
  387. text-align: left;
  388. border-bottom: 1px solid #eee;
  389. }
  390. .attribute-detail-table thead th {
  391. background-color: #e9ecef;
  392. color: #333;
  393. font-weight: bold;
  394. text-transform: uppercase;
  395. font-size: 0.85em;
  396. }
  397. /* Row Styling */
  398. .attribute-detail-table tbody tr:hover {
  399. background-color: #f0f8ff; /* Light hover effect */
  400. }
  401. /* Combined Table Layout */
  402. .combined-attributes-container {
  403. display: grid;
  404. /* 3 sections in a row, with slight gap */
  405. grid-template-columns: repeat(3, 1fr);
  406. gap: 20px;
  407. margin-bottom: 20px;
  408. }
  409. /* Ensure tables inside the combined container fit */
  410. .combined-attributes-container .attribute-section {
  411. width: 100%;
  412. }
  413. /* Pills (Badges) for Status and Summary */
  414. .pill {
  415. display: inline-block;
  416. padding: 4px 10px;
  417. border-radius: 12px;
  418. font-size: 0.8em;
  419. font-weight: bold;
  420. text-transform: uppercase;
  421. margin: 0 4px 4px 0;
  422. }
  423. /* Status-specific pills */
  424. .status-pill.status-ok {
  425. background-color: #d4edda;
  426. color: #155724;
  427. }
  428. .status-pill.status-ko {
  429. background-color: #f8d7da;
  430. color: #721c24;
  431. }
  432. .status-pill.status-missing {
  433. background-color: #fff3cd;
  434. color: #856404;
  435. }
  436. .status-pill.status-unknown {
  437. background-color: #e2e3e5;
  438. color: #383d41;
  439. }
  440. /* Row color based on main status (optional) */
  441. .attribute-detail-table tr.status-ko {
  442. background-color: #fff0f0;
  443. }
  444. /* Attribute Summary Pills */
  445. .attribute-summary-pills {
  446. display: flex;
  447. gap: 10px;
  448. margin: 20px 0;
  449. padding-top: 10px;
  450. border-top: 1px dashed #ccc;
  451. }
  452. .attribute-summary-pills .pill.primary {
  453. background-color: #007bff;
  454. color: white;
  455. }
  456. .attribute-summary-pills .pill.secondary {
  457. background-color: #6c757d;
  458. color: white;
  459. }
  460. /* --- Styles for Mandatory Comparison Table --- */
  461. /* Highlight the entire row for a mismatch */
  462. .comparison-table .mismatch-row {
  463. background-color: #fcebeb; /* Very light red background for the whole row */
  464. border-left: 5px solid #dc3545; /* Red border on the left */
  465. }
  466. /* Highlight the AI Value cell when there is a mismatch */
  467. .comparison-table .mismatch-value {
  468. font-weight: bold;
  469. color: #dc3545; /* Darker red text */
  470. }
  471. /* --- MATCH STYLES (NEW) --- */
  472. .comparison-table .match-row {
  473. background-color: #f1fff4; /* Light green background for the whole row */
  474. border-left: 5px solid #28a745; /* Green border on the left */
  475. }
  476. .comparison-table .found-value {
  477. font-weight: bold;
  478. color: green; /* Darker red text */
  479. }
  480. /* Pill for match/mismatch status */
  481. .status-pill.status-mismatch {
  482. background-color: #dc3545; /* Red background */
  483. color: white;
  484. }
  485. .status-pill.status-match {
  486. background-color: #28a745; /* Green background */
  487. color: white;
  488. }
  489. /* --- Required Styles for Scrolling, Highlighting, and Layout --- */
  490. /* General Scroll Wrapper for all tables */
  491. .attribute-scroll-wrapper {
  492. max-height: 300px; /* Adjust height as needed */
  493. overflow-y: auto;
  494. overflow-x: hidden;
  495. position: relative;
  496. border: 1px solid #ddd;
  497. margin-top: 5px;
  498. }
  499. /* Fix table headers when scrolling */
  500. .attribute-scroll-wrapper .attribute-detail-table th {
  501. position: sticky;
  502. top: 0;
  503. z-index: 10;
  504. background-color: #e9ecef;
  505. }
  506. /* Mandatory Comparison Table Highlighting */
  507. .comparison-table .mismatch-row {
  508. background-color: #fcebeb; /* Light red background for the whole row */
  509. border-left: 5px solid #dc3545; /* Red border on the left */
  510. }
  511. .comparison-table .mismatch-value {
  512. font-weight: bold;
  513. color: #dc3545; /* Darker red text for the AI value cell */
  514. }
  515. /* Status Pills for Match/Mismatch */
  516. .status-pill.status-mismatch {
  517. background-color: #dc3545;
  518. color: white;
  519. }
  520. .status-pill.status-match {
  521. background-color: #28a745;
  522. color: white;
  523. }
  524. /* General Table Styling (from previous responses, ensure these are present too) */
  525. .attribute-detail-table {
  526. width: 100%;
  527. border-collapse: collapse;
  528. background-color: #fff;
  529. }
  530. .attribute-detail-table th, .attribute-detail-table td {
  531. padding: 10px 15px;
  532. text-align: left;
  533. border-bottom: 1px solid #eee;
  534. }
  535. .combined-attributes-container {
  536. display: grid;
  537. grid-template-columns: repeat(3, 1fr);
  538. gap: 20px;
  539. margin-bottom: 20px;
  540. }
  541. /* Ensure the general table styles still apply */
  542. /* .comparison-table th, .comparison-table td { */
  543. /* Adjust padding if needed, but inherit from .attribute-detail-table */
  544. /* } */
  545. /* --- Mandatory Comparison Card Styles --- */
  546. .comparison-cards-container {
  547. display: flex;
  548. flex-wrap: wrap;
  549. gap: 20px;
  550. padding: 10px 0;
  551. }
  552. .comparison-card {
  553. flex: 0 0 calc(33.333% - 14px); /* Three cards per row on wider screens */
  554. min-width: 300px;
  555. border: 1px solid #e0e0e0;
  556. border-radius: 8px;
  557. overflow: hidden;
  558. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  559. transition: transform 0.2s;
  560. position: relative;
  561. background-color: #fff;
  562. }
  563. .comparison-card:hover {
  564. transform: translateY(-2px);
  565. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  566. }
  567. .card-header {
  568. background-color: #f8f9fa;
  569. padding: 12px 15px;
  570. font-weight: bold;
  571. font-size: 1.1em;
  572. color: #333;
  573. border-bottom: 1px solid #e0e0e0;
  574. }
  575. .card-content {
  576. display: flex;
  577. }
  578. .value-box {
  579. flex: 1;
  580. padding: 15px;
  581. min-height: 80px;
  582. position: relative;
  583. }
  584. .original-box {
  585. border-right: 1px solid #e0e0e0;
  586. background-color: #fcfcfc;
  587. }
  588. .value-label {
  589. font-size: 0.8em;
  590. color: #6c757d;
  591. text-transform: uppercase;
  592. margin-bottom: 5px;
  593. }
  594. .value-text {
  595. font-size: 1em;
  596. font-weight: 500;
  597. color: #212529;
  598. }
  599. .value-source {
  600. font-size: 0.8em;
  601. font-weight: normal;
  602. color: #adb5bd;
  603. margin-left: 5px;
  604. }
  605. /* --- MISMATCH STYLES --- */
  606. .mismatch-card {
  607. border: 2px solid #dc3545; /* Prominent red border on the card */
  608. background-color: #fff8f8; /* Light red background tint */
  609. }
  610. .mismatch-value {
  611. background-color: #fff0f0; /* Very light red background for the AI value box */
  612. }
  613. .mismatch-indicator {
  614. position: absolute;
  615. top: 0;
  616. right: 0;
  617. background-color: #dc3545;
  618. color: white;
  619. padding: 2px 8px;
  620. border-bottom-left-radius: 8px;
  621. font-size: 0.85em;
  622. font-weight: bold;
  623. transform: translateY(-1px); /* Just adjust alignment */
  624. }
  625. /* Custom CSS to align the button to the right of the header text */
  626. .api-header-flex {
  627. /* Ensures H2 and button are spaced out */
  628. display: flex;
  629. justify-content: space-between;
  630. align-items: center;
  631. /* Standard Bootstrap card header usually has padding (e.g., 1rem or 16px) */
  632. /* If your .card-header has padding-right: 16px, using -6px below gives you 10px (16 - 6 = 10) */
  633. }
  634. .download-section {
  635. /* Adjust this value based on your card-header's existing padding to get exactly 10px spacing. */
  636. /* For standard Bootstrap padding (usually around 1rem or 16px), a negative margin is needed */
  637. margin-right: -6px; /* Example: If card-header padding is 16px, this results in 10px visible space */
  638. }
  639. /* Ensure the h2 doesn't take up the full width */
  640. .api-header-flex h2 {
  641. margin-bottom: 0;
  642. line-height: 1.2;
  643. }
  644. .card-header.api-header-flex {
  645. /* Example: Override default padding to 0 on the right */
  646. padding-right: 0;
  647. }
  648. .download-section {
  649. /* Now, this padding controls the 10px spacing from the card's edge */
  650. padding-right: 10px;
  651. right: 0px;
  652. position: absolute;
  653. }
  654. /* Small button size for card toolbar */
  655. .btn-sm { padding: 4px 8px; border-radius: 8px; font-size: .85rem; }
  656. /* Slight spacing when the button is beside the Select checkbox */
  657. .card-config-btn { margin-left: 8px; }
  658. /* Optional: when the attribute chip UI is hidden, keep layout neat */
  659. .attribute-selectors { transition: opacity .15s ease; }
  660. .attribute-selectors.hidden { display: none; } /* in case you prefer class toggle */
  661. .card-config-btn:hover { filter: brightness(0.98); }
  662. #cardsContainer .attribute-selectors{
  663. display: inline-block;
  664. }
  665. /* Card Background and Border (for MATCH) */
  666. .comparison-card.match-card {
  667. border: 2px solid #28a745; /* Green border */
  668. background-color: #f6fff8; /* Very light green background */
  669. }
  670. /* Card Background and Border (for MISMATCH) */
  671. .comparison-card.mismatch-card {
  672. border: 2px solid #dc3545; /* Red border */
  673. background-color: #fff8f8; /* Very light red background */
  674. }
  675. /* Specific highlight for AI value box on mismatch */
  676. .mismatch-card .mismatch-value {
  677. background-color: #fff0f0; /* Light red background for the value box */
  678. color: #dc3545; /* Red text */
  679. font-weight: bold;
  680. }
  681. .match-status-indicator {
  682. position: absolute;
  683. top: 0;
  684. right: 0;
  685. padding: 2px 8px;
  686. border-bottom-left-radius: 8px;
  687. font-size: 0.85em;
  688. font-weight: bold;
  689. transform: translateY(-1px);
  690. }
  691. .match-card .match-status-indicator {
  692. background-color: #28a745; /* Dark Green */
  693. color: white;
  694. }
  695. .mismatch-card .match-status-indicator {
  696. background-color: #dc3545; /* Dark Red */
  697. color: white;
  698. }
  699. /* Container for the thumbnail and the full image */
  700. .mini-thumb-container {
  701. position: relative; /* Essential for positioning the full-image-hover absolutely within it */
  702. display: inline-block; /* Helps in keeping the container size tight to the thumbnail */
  703. }
  704. /* The small, visible thumbnail */
  705. .mini-thumb {
  706. /* Style your thumbnail here, e.g., width, height, border, etc. */
  707. width: 50px; /* Example size */
  708. height: 50px; /* Example size */
  709. overflow: hidden;
  710. cursor: pointer;
  711. }
  712. .mini-thumb img {
  713. width: 100%;
  714. height: 100%;
  715. object-fit: cover;
  716. display: block;
  717. }
  718. .full-image-hover {
  719. position: absolute;
  720. top: 0;
  721. left: 100%;
  722. display: none;
  723. z-index: 9999;
  724. border: 1px solid #ccc;
  725. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  726. background-color: white;
  727. padding: 10px;
  728. }
  729. .full-image-hover img {
  730. max-width: 400px;
  731. height: auto;
  732. display: block;
  733. }
  734. /* .full-image-hover {
  735. position: fixed;
  736. display: none;
  737. z-index: 9999;
  738. border: 1px solid #ccc;
  739. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  740. background-color: white;
  741. padding: 10px;
  742. }
  743. .full-image-hover img {
  744. max-width: 400px;
  745. height: auto;
  746. max-height: 400px;
  747. display: block;
  748. } */
  749. /* THE MAGIC: Show the full-image-hover when the parent container is hovered */
  750. .mini-thumb-container:hover .full-image-hover {
  751. display: block;
  752. }