/* Style library window and its entry in the editors. */
.sgg-st {
  width: min(1080px, 94vw);
  max-width: none;
  height: min(820px, 90vh);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #3b4b5c;
  box-shadow: 0 30px 80px -24px rgba(15, 23, 42, 0.55);
}
.sgg-st[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.sgg-st::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.sgg-st *,
.sgg-st *:before,
.sgg-st *:after {
  box-sizing: border-box;
}
.sgg-st p {
  white-space: normal;
}
.sgg-st-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 12px;
  background: linear-gradient(160deg, #26384c 0%, #1d2b3c 100%);
  color: #c9d5e2;
}
.sgg-st-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 0;
  color: #fff;
  font-size: 19px;
}
.sgg-st-head h2 .fa {
  color: #7ff8ef;
}
.sgg-st-head p {
  margin: 0;
  color: #fff;
  font-size: 13px;
}
.sgg-st-close {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 30px;
  cursor: pointer;
}
.sgg-st-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 22px;
  border-bottom: 1px solid #e3e9f0;
}
.sgg-st-search {
  flex: 1 1 220px;
  min-width: 160px;
}
.sgg-st-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: #f1f5f9;
}
.sgg-st-seg button {
  padding: 4px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
}
.sgg-st-seg button[aria-pressed='true'] {
  background: #fff;
  color: #0e8a93;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.sgg-st-pro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 600;
  cursor: pointer;
}
.sgg-st-pro span {
  padding: 0 5px;
  border-radius: 4px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
}
.sgg-st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  align-content: start;
  gap: 14px;
  padding: 16px 22px 22px;
  overflow-y: auto;
}
.sgg-st-empty {
  padding: 30px;
  color: #64748b;
  text-align: center;
}

/* Card */
.sgg-st-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.sgg-st-card:hover,
.sgg-st-card:focus-visible {
  border-color: #0e8a93;
  box-shadow: 0 10px 24px -16px rgba(14, 138, 147, 0.8);
  transform: translateY(-1px);
}
.sgg-st-card.is-current {
  border-color: #0e8a93;
  box-shadow: 0 0 0 2px #0e8a93;
}
.sgg-st-card.is-locked .sgg-mk {
  filter: saturate(0.85);
}
.sgg-st-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sgg-st-label strong {
  overflow: hidden;
  color: #13202e;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sgg-st-label em {
  flex: none;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
}
.sgg-st-label .is-free {
  background: #e6f6f7;
  color: #0b6e75;
}
.sgg-st-label .is-pro {
  background: #f59e0b;
  color: #fff;
}
.sgg-st-card small {
  color: #94a3b8;
  font-size: 11px;
}

/* Small pictures: SggStyleMock (mock.css) in the layout of this gallery */
.sgg-st-card .sgg-mk {
  --mk-h: 96px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* ---------- Entry in the editors ---------- */
.sgg-st-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.sgg-st-entry .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sgg-st-entry [data-sgg-st-current] {
  color: #13202e;
  font-weight: 600;
}
.sgg-st-entry [data-sgg-st-status] {
  flex-basis: 100%;
  color: #0b6e75;
  font-size: 12px;
}
.sgg-st-entry [data-sgg-st-status]:empty {
  display: none;
}
.sgg-st-undo[hidden] {
  display: none;
}
