@import "./sticker-motion.css";

.sticker-chip {
  gap:4px;
}
.sticker-chip[data-sticker-color][aria-expanded="true"] {
  border-color:light-dark(#397bdd,#84b7ff);
}
.sticker-chip.sticker-add {
  width:22px;
  min-width:22px;
  height:22px;
  padding:0;
  border:1px dashed currentColor;
  border-radius:50%;
  background:transparent;
  color:light-dark(#397bdd,#84b7ff);
}
.sticker-chip.sticker-add svg {width:14px;height:14px}
.sticker-chip.sticker-add:hover,.sticker-chip.sticker-add[aria-expanded="true"] {
  background:color-mix(in srgb,currentColor 12%,transparent);
}

.sticker-picker {
  position:fixed;
  inset:auto;
  z-index:1000;
  box-sizing:border-box;
  width:242px;
  max-height:420px;
  margin:0;
  padding:0;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
  color:var(--text);
  box-shadow:0 6px 18px #080e182b;
  font-size:13px;
  line-height:1.35;
}
.sticker-picker:not([popover]) {display:flex}
.sticker-picker:popover-open {display:flex}
.sticker-picker[data-picker-exiting] {pointer-events:none;user-select:none}
.sticker-picker-save {margin:0;padding:5px 8px;border-top:1px solid var(--line);font-size:11px}
.sticker-picker [hidden] {display:none}

.sticker-picker-heading,.sticker-picker-footer {
  display:flex;
  align-items:center;
  flex:none;
  gap:5px;
  min-height:32px;
  padding:3px 7px;
}
.sticker-picker-heading {
  border-bottom:1px solid var(--line);
}
.sticker-picker-heading > strong {
  flex:1;
  min-width:0;
  overflow-wrap:anywhere;
}
.sticker-picker-actions {
  display:flex;
  align-items:center;
  gap:2px;
}
.sticker-picker-heading button,.sticker-picker-footer button {
  min-height:25px;
  padding:2px 6px;
  border:1px solid transparent;
  border-radius:4px;
  background:none;
  color:var(--muted);
}
.sticker-picker-heading button {
  display:grid;
  min-width:25px;
  place-items:center;
  padding:2px;
  font-size:17px;
  line-height:1;
}
.sticker-picker-heading button > svg,.sticker-picker-check > svg,.sticker-picker-search > svg,.sticker-picker-value-form button > svg {
  width:15px;
  height:15px;
  flex:none;
}
.sticker-picker-heading button:hover,.sticker-picker-footer button:hover {
  background:var(--panel-hover);
  color:var(--text);
}
.sticker-picker-search {
  display:flex;
  align-items:center;
  flex:none;
  gap:6px;
  min-height:32px;
  margin:5px 6px 0;
  padding:0 7px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--field);
  color:var(--muted);
}
.sticker-picker-search:focus-within {border-color:var(--orange)}
.sticker-picker-search input {
  min-width:0;
  min-height:0;
  width:100%;
  padding:5px 0;
  border:0;
  outline:none;
  background:none;
  font-size:inherit;
}
.sticker-picker-search input:focus-visible {outline:none}
.sticker-picker-content {
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.sticker-picker-list {
  display:grid;
  gap:1px;
  padding:4px;
}
.sticker-picker-footer {
  justify-content:flex-end;
  min-height:26px;
  padding-block:0;
  border-top:1px solid var(--line);
  font-size:11px;
}
.sticker-picker-attach-item,.sticker-picker-state-option {
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
  min-width:0;
  min-height:29px;
  padding:3px 6px;
  border:0;
  border-radius:5px;
  background:none;
  color:inherit;
  text-align:start;
  line-height:inherit;
}
.sticker-picker-attach-item:hover,.sticker-picker-state-option:hover {background:var(--panel-hover)}
.sticker-picker-attach-item:focus-visible,.sticker-picker-state-option:focus-visible {outline-offset:-2px}
.sticker-picker-attach-item > svg {
  width:15px;
  height:15px;
  flex:none;
  color:var(--muted);
}
.sticker-picker-attach-item > span,.sticker-picker-state-option .sticker-chip > span:last-child {
  min-width:0;
  overflow-wrap:anywhere;
}
.sticker-picker-options {
  display:grid;
  gap:1px;
}
.sticker-picker-state-option {
  justify-content:space-between;
  min-height:31px;
  gap:8px;
}
.sticker-picker-state-option .sticker-chip[data-sticker-color] {
  min-width:0;
  padding:2px 6px 2px 2px;
  border-color:transparent;
  border-radius:7px;
  font-size:12px;
}
.sticker-picker-check {
  display:flex;
  width:15px;
  flex:none;
  color:light-dark(#397bdd,#84b7ff);
}
.sticker-picker-value-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:5px;
  padding:3px;
}
.sticker-picker-value-form input {min-width:0;min-height:30px;padding:4px 6px;font-size:inherit}
.sticker-picker-value-form .button {min-height:30px;padding:3px 7px}
.sticker-picker-empty,.sticker-picker-error {margin:0;padding:6px;color:var(--muted)}
.sticker-picker-error {
  flex:none;
  border-top:1px solid var(--line);
  color:var(--orders-theme-danger,var(--text));
  overflow-wrap:anywhere;
}
@media(pointer:coarse) {
  .sticker-picker-attach-item,.sticker-picker-state-option,
  .sticker-picker-heading button,.sticker-picker-footer button,.sticker-picker-value-form .button {
    min-height:44px;
  }
  .sticker-picker-search input,.sticker-picker-value-form input {font-size:16px}
}
@media print {
  .sticker-picker {display:none!important}
}
