/*
 * This data is highly confidential and entirely the personal creation and property of
 * Vlad Tanasescu, born 5th of December 1996 in Bucharest, Romania. This document,
 * information, concepts, and all the code are confidential, proprietary IP, and may not
 * be copied, distributed, or used.
 */

.organic-sculpt-library {
  --sculpt-bg: var(--paper, #e8eae0);
  --sculpt-surface: var(--raised, #f2f4ec);
  --sculpt-line: rgba(22, 24, 28, 0.12);
  --sculpt-line-strong: rgba(22, 24, 28, 0.24);
  --sculpt-text: #16181c;
  --sculpt-muted: #565d65;
  --sculpt-blue: #1a7a9a;
  --sculpt-danger: #b23a42;
  position: relative;
  margin-top: 0;
  padding: 28px 0 48px;
  border-top: 1px solid var(--sculpt-line);
  overflow: clip;
  background: var(--sculpt-bg);
  color: var(--sculpt-text);
  color-scheme: light;
}

.organic-sculpt-library,
.organic-sculpt-library * {
  box-sizing: border-box;
}

.organic-sculpt-library .product-card button,
.organic-sculpt-library .product-card a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.organic-sculpt-library .product-card button:focus-visible,
.organic-sculpt-library .product-card a:focus-visible {
  outline: 2px solid var(--sculpt-blue);
  outline-offset: 3px;
}

.organic-sculpt-shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
}

.organic-sculpt-library .product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 22px;
}

.organic-sculpt-library.mixed-library-section {
  padding: 28px 0 72px;
  border-top: 0;
}

.mixed-library-shell {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
}

.mixed-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 22px;
}

.organic-sculpt-library .product-card {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sculpt-line);
  border-radius: 20px;
  background: var(--sculpt-surface);
  box-shadow: 0 8px 28px rgba(22, 24, 28, .055);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.organic-sculpt-library .product-card:hover {
  z-index: 2;
  border-color: var(--sculpt-line-strong);
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(22, 24, 28, .13);
}

.organic-sculpt-library .card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .28), transparent 44%),
    linear-gradient(180deg, #dce7f0, #cfd8de);
  touch-action: none;
  isolation: isolate;
}

.organic-sculpt-library .card-render,
.organic-sculpt-library .card-three {
  position: absolute;
  inset: 0;
}

.organic-sculpt-library .card-render {
  z-index: 1;
  display: block;
  background: #dce7f0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  transition: opacity .16s ease;
}

.organic-sculpt-library .card-render img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: scale(var(--poster-scale, 1));
  transform-origin: center;
}

.organic-sculpt-library .card-render img.is-retrying,
.organic-sculpt-library .card-render img.is-unavailable {
  opacity: 0;
}

.organic-sculpt-library .card-three {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .28), transparent 44%),
    linear-gradient(180deg, #dce7f0, #cfd8de);
  transition: opacity .16s ease;
}

.organic-sculpt-library .card-stage.is-ready.three-active .card-three {
  opacity: 1;
  pointer-events: auto;
}

.organic-sculpt-library .card-stage.is-ready.three-active .card-render {
  opacity: 0;
  pointer-events: none;
}

.organic-sculpt-library .card-three canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #dce7f0;
  cursor: grab;
}

.organic-sculpt-library .card-three canvas:active {
  cursor: grabbing;
}

.organic-sculpt-library .card-stage.render-active .card-three {
  display: none;
}

.organic-sculpt-library .card-stage.render-active .card-render {
  opacity: 1;
  pointer-events: auto;
}

.organic-sculpt-library .card-gate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 58px 24px 68px;
  background: rgba(18, 20, 23, .72);
  color: white;
  text-align: center;
  backdrop-filter: blur(8px);
}

.organic-sculpt-library .card-gate.visible {
  display: grid;
}

.organic-sculpt-library .card-stage.render-active .card-gate {
  display: none;
}

.organic-sculpt-library .card-gate strong {
  display: block;
  font-size: 13px;
}

.organic-sculpt-library .card-gate span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .68);
  font-size: 10px;
  line-height: 1.45;
}

.organic-sculpt-library .card-loading-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.organic-sculpt-library .card-gate button {
  min-height: 36px;
  margin-top: 14px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .23);
  border-radius: 9px;
  background: rgba(255, 255, 255, .10);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.organic-sculpt-library .card-view-switch,
.organic-sculpt-library .card-toolbar {
  position: absolute;
  bottom: 12px;
  z-index: 7;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 11px;
  background: rgba(15, 15, 17, .75);
  backdrop-filter: blur(12px);
}

.organic-sculpt-library .card-view-switch {
  left: 12px;
}

.organic-sculpt-library .card-toolbar {
  right: 12px;
}

.organic-sculpt-library .card-view-switch button,
.organic-sculpt-library .card-toolbar button {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .70);
  cursor: pointer;
  font-size: 10px;
  font-weight: 780;
}

.organic-sculpt-library .card-view-switch button {
  min-width: 58px;
  padding: 0 10px;
}

.organic-sculpt-library .card-view-switch button.active {
  background: rgba(255, 255, 255, .15);
  color: white;
}

.organic-sculpt-library .card-toolbar button {
  width: 32px;
  padding: 0;
  font-size: 15px;
}

.organic-sculpt-library .card-toolbar button[aria-pressed="true"] {
  background: rgba(84, 184, 220, .72);
  color: white;
}

.organic-sculpt-library .card-toolbar button:hover,
.organic-sculpt-library .card-view-switch button:hover {
  background: rgba(255, 255, 255, .12);
  color: white;
}

.organic-sculpt-library .card-stage.render-active .card-toolbar {
  display: none;
}

.organic-sculpt-library .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 23px 22px 20px;
}

.organic-sculpt-library .card-body h3 {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  margin: 0;
  color: var(--sculpt-text);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.organic-sculpt-library .card-body p {
  display: -webkit-box;
  height: 56px;
  min-height: 56px;
  overflow: hidden;
  margin: 9px 0 20px;
  color: var(--sculpt-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.organic-sculpt-library .card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: auto;
}

.organic-sculpt-library .card-actions button,
.organic-sculpt-library .card-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--sculpt-line);
  border-radius: 10px;
  background: transparent;
  color: var(--sculpt-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
}

.organic-sculpt-library .card-actions button:hover,
.organic-sculpt-library .card-actions a:hover {
  border-color: var(--sculpt-line-strong);
  background: rgba(255, 255, 255, .045);
  color: var(--sculpt-text);
}

.organic-sculpt-library .card-actions button {
  min-width: 0;
  padding: 0 12px;
}

.organic-sculpt-library .card-actions a {
  width: 100%;
  padding: 0 14px;
}

.organic-sculpt-library .sculpt-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  max-width: min(430px, calc(100% - 44px));
  padding: 13px 16px;
  border: 1px solid var(--sculpt-line-strong);
  border-radius: 12px;
  background: rgba(30, 30, 33, .94);
  color: var(--sculpt-text);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .35);
}

.organic-sculpt-library .sculpt-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.organic-sculpt-library .sculpt-toast.error {
  border-color: rgba(241, 132, 132, .42);
  color: #ffd0d0;
}

.organic-sculpt-library .hidden-input,
.organic-sculpt-library .hidden-control {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .mixed-library-grid,
  .organic-sculpt-library .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mixed-library-shell,
  .organic-sculpt-shell {
    width: min(100% - 28px, 1460px);
  }

  .mixed-library-grid,
  .organic-sculpt-library .product-grid {
    grid-template-columns: 1fr;
  }
}
