/* PromptAll - Prompt Card widget */

.promptall-pc-wrapper{position:relative; width:100%; max-width:100%;}

/* Stage / Carousel */
.promptall-pc-stage{
  --promptall-pc-perspective: 1200px;
  --promptall-pc-gap: 10px;
  perspective: var(--promptall-pc-perspective);
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px 0;
  overflow:hidden; /* prevent breaking out of the column */
}

.promptall-pc-carousel{
  position: relative;
  transform-style: preserve-3d;
  width: 100%;
  height: 520px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Non-carousel grid fallback */
.promptall-pc-wrapper.is-grid .promptall-pc-stage{perspective:none;}
.promptall-pc-wrapper.is-grid .promptall-pc-carousel{height:auto; flex-wrap:wrap; gap:16px; transform:none;}
.promptall-pc-wrapper.is-grid .promptall-pc-card{position:relative; transform:none !important; margin:0;}

/* Card */
.promptall-pc-card{
  position:absolute;
  transform-style:preserve-3d;
  margin: calc(var(--promptall-pc-gap) / 2);
  will-change: transform;
}

.promptall-pc-card::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius: inherit;
  z-index:0;
  opacity: 0.85;
  filter: blur(35px);
  pointer-events:none;
}

.promptall-pc-inner{
  position:relative;
  width:100%;
  height:100%;
  transform-style:preserve-3d;
  transition: transform 700ms cubic-bezier(.2,.8,.2,1);
  outline:none;
}

.promptall-pc-face{
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  overflow:hidden;
  border-radius:18px;
}

.promptall-pc-front{
  background-size:cover;
  background-position:center;
}

.promptall-pc-front::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:0.25;
  background: linear-gradient(120deg, rgba(0,180,255,.35), rgba(140,0,255,.25));
}

.promptall-pc-front-meta{
  position:absolute;
  inset:auto 14px 14px 14px;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.promptall-pc-title{
  font-weight:700;
  font-size:18px;
  line-height:1.2;
  color:#EAF2FF;
  text-shadow: 0 0 14px rgba(90, 180, 255, 0.45);
}

.promptall-pc-hint{
  font-size:12px;
  opacity:.9;
  color: rgba(234,242,255,.9);
}

.promptall-pc-back{
  background: linear-gradient(135deg, rgba(15, 18, 35, .96), rgba(18, 10, 42, .96));
}

.promptall-pc-back-inner{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.promptall-pc-prompt-wrap{
  overflow:auto;
  flex: 1 1 auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}

.promptall-pc-prompt-wrap.is-dragging{ cursor: grabbing; }

.promptall-pc-prompt{
  margin:0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  color:#EAF2FF;
  direction:ltr;
  unicode-bidi: plaintext;
}

.promptall-pc-copy{
  border: 0;
  cursor:pointer;
  user-select:none;
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
  background: linear-gradient(90deg, rgba(0,180,255,.35), rgba(140,0,255,.25));
  color:#D9F0FF;
  border-radius: 12px;
  transition: transform 120ms ease, filter 180ms ease, opacity 180ms ease;
}

.promptall-pc-copy:hover{ filter: brightness(1.08); }
.promptall-pc-copy:active{ transform: scale(.98); }

.promptall-pc-copy.is-copied{ filter: brightness(1.12); }

/* Flip behavior */
.promptall-pc-wrapper.flip-y .promptall-pc-back{ transform: rotateY(180deg); }
.promptall-pc-wrapper.flip-x .promptall-pc-back{ transform: rotateX(180deg); }

.promptall-pc-wrapper.flip-hover.flip-y .promptall-pc-card:hover .promptall-pc-inner,
.promptall-pc-wrapper.flip-hover.flip-y .promptall-pc-card:focus-within .promptall-pc-inner{
  transform: rotateY(180deg);
}
.promptall-pc-wrapper.flip-hover.flip-x .promptall-pc-card:hover .promptall-pc-inner,
.promptall-pc-wrapper.flip-hover.flip-x .promptall-pc-card:focus-within .promptall-pc-inner{
  transform: rotateX(180deg);
}

.promptall-pc-wrapper.flip-click.flip-y .promptall-pc-card.is-flipped .promptall-pc-inner{ transform: rotateY(180deg); }
.promptall-pc-wrapper.flip-click.flip-x .promptall-pc-card.is-flipped .promptall-pc-inner{ transform: rotateX(180deg); }

/* Scrollbar styling */
.promptall-pc-prompt-wrap{scrollbar-width: thin; scrollbar-color: rgba(90, 180, 255, 0.6) rgba(255,255,255,0.08);} /* Firefox */
.promptall-pc-prompt-wrap::-webkit-scrollbar{width:6px;}
.promptall-pc-prompt-wrap::-webkit-scrollbar-thumb{
  background: rgba(90, 180, 255, 0.6);
  border-radius: 999px;
}
.promptall-pc-prompt-wrap::-webkit-scrollbar-track{background: rgba(255,255,255,0.08); border-radius: 999px;}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .promptall-pc-inner{ transition:none; }
}

/* Mobile tweaks */
@media (max-width: 767px){
  .promptall-pc-stage{ padding: 10px 0; }
  .promptall-pc-carousel{ height: 420px; }
}


/* Safety: never show front hint on back face */
.promptall-pc-back .promptall-pc-hint{ display:none !important; }
