/* Color samples are artwork data; controls follow the shared neutral theme. */
#colorMatchingDetails { min-width: 0; }
#colorMatchingDetails .palette-recommendations { --control-focus-color: var(--text); min-width: 0; margin: 0; }
#colorMatchingDetails .palette-recommendation-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#colorMatchingDetails .palette-recommendation-heading h3 { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
#colorMatchingDetails .palette-batch-controls { display: flex; align-items: center; gap: 4px; }
#paletteBatchStatus { color: var(--muted-strong); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#colorMatchingDetails #paletteRefreshBtn { min-width: 64px; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--muted-strong); font-size: 12px; font-weight: 500; box-shadow: none; cursor: pointer; }
#colorMatchingDetails #paletteRefreshBtn:hover { background: var(--field); color: var(--text); transform: none; }
#paletteRecommendationList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#paletteRecommendationList .palette-card { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: center; min-width: 0; width: 100%; height: auto; min-height: 66px; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--card); color: var(--text); text-align: left; white-space: normal; box-shadow: none; overflow: visible; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
#paletteRecommendationList .palette-card:hover { border-color: var(--text); background: var(--card-soft); transform: none; box-shadow: none; }
#paletteRecommendationList .palette-card[aria-pressed="true"] { border-color: var(--text); background: var(--field); box-shadow: inset 0 0 0 1px var(--text); }
#colorMatchingDetails .palette-card-strip { display: flex; flex: none; width: 100%; min-width: 0; height: 44px; overflow: hidden; border-radius: 7px; outline: 1px solid var(--border); outline-offset: -1px; }
#colorMatchingDetails .palette-card-color { display: block; flex-basis: 0; min-width: 5px; height: 100%; }
#paletteRecommendationList .palette-card-name { position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); width: max-content; max-width: calc(100% - 4px); padding: 5px 8px; border-radius: 8px; background: var(--text); color: var(--card); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; overflow-wrap: anywhere; visibility: hidden; opacity: 0; transform: translateX(-50%); pointer-events: none; }
#paletteRecommendationList .palette-card-name::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
#paletteRecommendationList .palette-card:focus-visible:not([data-tooltip-dismissed]) .palette-card-name { visibility: visible; opacity: 1; pointer-events: auto; }
#paletteRecommendationList .palette-card-check { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--border); border-radius: 50%; visibility: hidden; background: var(--card); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1; text-align: center; pointer-events: none; }
#paletteRecommendationList .palette-card[aria-pressed="true"] .palette-card-check { visibility: visible; }
@media (hover: hover) {
  #paletteRecommendationList .palette-card:hover:not([data-tooltip-dismissed]) .palette-card-name { visibility: visible; opacity: 1; pointer-events: auto; }
}
#colorMatchingDetails .palette-recommendation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
#colorMatchingDetails .palette-selection-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#colorMatchingDetails .palette-recommendation-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--field); color: var(--text); box-shadow: none; font-size: 12px; line-height: 1.5; font-weight: 500; white-space: normal; cursor: pointer; transition: background-color 160ms var(--ease); }
#colorMatchingDetails .palette-recommendation-actions button:hover, #colorMatchingDetails .palette-selection-actions button:hover { background: var(--card-soft); border-color: var(--border-strong); transform: none; box-shadow: none; }
#colorMatchingDetails .palette-recommendation-actions .ri-icon { flex: none; width: 16px; height: 16px; }
#colorMatchingDetails .palette-selection-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 8px; color: var(--muted-strong); font-size: 11px; line-height: 1.6; }
#paletteSelectedName { min-width: 0; overflow-wrap: anywhere; }
#colorMatchingDetails .palette-application-note { margin-left: auto; white-space: nowrap; }
#colorMatchingDetails .palette-selection-actions button { background: transparent; }
#colorMatchingDetails .palette-selection-actions button:disabled { opacity: .5; cursor: default; border-color: var(--border); background: transparent; }
#colorMatchingDetails .palette-recommendation-note { margin: 10px 0 0; color: var(--muted-strong); font-size: 11px; line-height: 1.6; }
#colorMatchingDetails .color-custom { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
#colorMatchingDetails .color-custom-item { grid-template-columns: minmax(60px, auto) 44px minmax(0, 1fr); }
#colorMatchingDetails .color-custom-item label { margin: 0; color: var(--text); font-size: 13px; font-weight: 500; }
#colorMatchingDetails .color-custom-item label small { display: block; margin-top: 2px; color: var(--muted-strong); font-size: 11px; font-weight: 400; }
#colorMatchingDetails .color-custom input[type="color"] { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 3px; border: 1px solid var(--border); border-radius: 50%; overflow: hidden; background: var(--card); }
#colorMatchingDetails .color-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
#colorMatchingDetails .color-custom input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
#colorMatchingDetails .color-custom input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
#colorMatchingDetails .color-custom input[type="text"] { min-width: 0; width: 100%; min-height: 44px; }
#colorMatchingDetails .palette-recommendations button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
#paletteSelectionActions[hidden], #paletteSelectedName[hidden], #paletteLegacyNote[hidden] { display: none; }
#colorMatchingDetails .palette-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  #colorMatchingDetails .palette-recommendations button { transition: none; }
}
