.cch-material-picker-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.cch-material-picker-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--cch-v3-line-strong, #23546d);
  border-radius: 13px;
  background: var(--cch-v3-surface-raised, #112334);
  color: var(--cch-v3-text, #f5f9fc);
  text-align: left;
  cursor: pointer;
}

.cch-material-picker-trigger > span:first-child { display: grid; gap: 2px; min-width: 0; }
.cch-material-picker-trigger strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cch-material-picker-trigger small { color: var(--cch-v3-muted, #8296a9); }
.cch-material-picker-trigger b { flex: 0 0 auto; min-width: 32px; padding: 5px 8px; border-radius: 999px; background: rgba(37,189,243,.13); color: var(--cch-v3-accent, #25bdf3); text-align: center; }

.cch-material-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(2, 9, 15, .76);
  backdrop-filter: blur(8px);
}
.cch-material-picker-backdrop.is-open { display: grid; }
.cch-material-picker-dialog {
  width: min(1240px, calc(100vw - 48px));
  max-height: min(90vh, 920px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(37,189,243,.42);
  border-radius: 22px;
  background: #071927;
  color: #f5f9fc;
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}
.cch-material-picker-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 20px 22px 17px; border-bottom: 1px solid #1a3a50; background: linear-gradient(180deg, rgba(28,68,91,.56), rgba(12,39,56,.18)); }
.cch-material-picker-head h2 { margin: 3px 0; font-size: 22px; }
.cch-material-picker-head p { margin: 0; color: #9eb2c3; }
.cch-material-picker-kicker { color: #b5c8d7; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.cch-material-picker-close { align-self: flex-start; width: 38px; min-width: 38px; min-height: 38px; border: 1px solid #26475e; border-radius: 12px; background: #0d2638; color: #fff; cursor: pointer; }
.cch-material-picker-tools { display: grid; grid-template-columns: minmax(320px, 1.6fr) minmax(230px, .9fr) auto; align-items: end; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #17374b; background: rgba(7,25,39,.94); }
.cch-material-picker-tools label { display: grid; gap: 5px; color: #9eb2c3; font-size: 11px; font-weight: 800; }
.cch-material-picker-tools :is(input,select) { width: 100%; min-height: 42px; }
.cch-material-picker-count { display: grid; place-items: center; align-content: center; min-width: 100px; padding: 5px 10px; border: 1px solid #25475d; border-radius: 12px; background: #0d2638; }
.cch-material-picker-count strong { font-size: 14px; }
.cch-material-picker-count small { color: #8da5b7; text-transform: uppercase; font-size: 9px; }
.cch-material-picker-grid { min-height: 260px; overflow: auto; overflow-x: hidden; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(82px,auto); align-content: start; gap: 12px; padding: 18px 22px; scrollbar-gutter: stable; }
.cch-material-picker-grid > .cch-material-picker-item { min-width: 0; min-height: 82px !important; height: auto !important; display: grid !important; grid-template-columns: 56px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px 14px !important; border: 1px solid #24475e; border-radius: 14px; background: #10283a; color: #f5f9fc; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.cch-material-picker-item:hover,.cch-material-picker-item.is-selected { border-color: #25bdf3; background: #13344a; transform: translateY(-1px); }
.cch-material-picker-media { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: #eef3f6; color: #315267; font-size: 19px; font-weight: 900; }
.cch-material-picker-media img { width: 100%; height: 100%; object-fit: contain; }
.cch-material-picker-copy { min-width: 0; display: grid; gap: 5px; }
.cch-material-picker-copy strong,.cch-material-picker-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cch-material-picker-copy strong { font-size: 14px; line-height: 1.25; }
.cch-material-picker-copy small { color: #9eb2c3; font-size: 12px; line-height: 1.35; }
.cch-material-picker-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #365b72; border-radius: 8px; color: transparent; }
.cch-material-picker-item.is-selected .cch-material-picker-check { border-color: #25bdf3; background: #25bdf3; color: #04131d; }
.cch-material-picker-empty { grid-column: 1/-1; min-height: 220px; display: grid; place-content: center; gap: 7px; padding: 60px 20px; color: #9eb2c3; text-align: center; }
.cch-material-picker-empty strong { color: #f5f9fc; font-size: 16px; }
.cch-material-picker-pagination { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 22px; border-top: 1px solid #17374b; background: #091e2d; }
.cch-material-picker-pagination[hidden] { display: none; }
.cch-material-picker-pagination button { min-width: 34px; min-height: 34px; padding: 5px 9px; border: 1px solid #31566d; border-radius: 9px; background: #10283a; color: #dcebf4; font: inherit; font-weight: 800; cursor: pointer; }
.cch-material-picker-pagination button:hover,.cch-material-picker-pagination button.is-active { border-color: #25bdf3; background: rgba(37,189,243,.16); color: #fff; }
.cch-material-picker-pagination button:disabled { opacity: .38; cursor: not-allowed; }
.cch-material-picker-pagination span { margin: 0 5px; color: #8da5b7; font-size: 11px; }
.cch-material-picker-foot { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid #17374b; background: rgba(7,25,39,.97); color: #8da5b7; font-size: 12px; }
.cch-material-picker-selection { color: #bcecff; font-weight: 800; }
.cch-material-picker-quantity { display: grid; grid-template-columns: auto 72px; align-items: center; gap: 8px; color: #b7cad8; font-weight: 800; }
.cch-material-picker-quantity input { width: 72px; min-height: 40px; padding: 7px 9px; border: 1px solid #31566d; border-radius: 10px; background: #081d2b; color: #fff; font: inherit; font-weight: 900; text-align: center; }
.cch-material-picker-quantity input:focus { outline: 2px solid #25bdf3; outline-offset: 1px; }
.cch-material-picker-done { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 11px; background: #25bdf3; color: #04131d; font-weight: 900; cursor: pointer; }

@media (max-width: 920px) {
  .cch-material-picker-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cch-material-picker-count { grid-column: 1 / -1; min-height: 42px; }
  .cch-material-picker-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cch-material-picker-backdrop { padding: 10px; }
  .cch-material-picker-dialog { width: 100%; max-height: calc(100dvh - 20px); border-radius: 17px; }
  .cch-material-picker-head,.cch-material-picker-tools,.cch-material-picker-grid,.cch-material-picker-foot { padding-left: 14px; padding-right: 14px; }
  .cch-material-picker-tools { grid-template-columns: 1fr; }
  .cch-material-picker-count { grid-column: auto; }
  .cch-material-picker-grid { grid-template-columns: 1fr; }
  .cch-material-picker-grid > .cch-material-picker-item { min-height: 72px !important; grid-template-columns: 48px minmax(0,1fr) auto; gap: 10px; padding: 10px !important; }
  .cch-material-picker-media { width: 48px; height: 48px; }
  .cch-material-picker-pagination { padding-inline: 10px; }
  .cch-material-picker-pagination span { display: none; }
  .cch-material-picker-foot { grid-template-columns: 1fr; }
  .cch-material-picker-foot > span:not(.cch-material-picker-selection) { display: none; }
  .cch-material-picker-quantity { grid-template-columns: minmax(0,1fr) 88px; }
  .cch-material-picker-quantity input { width: 88px; }
  .cch-material-picker-done { width: 100%; }
}
