/* ==========================================================================
   iDominiqe AI Web Prompts — Live Demo Showcase & Prompt Studio Styles
   ========================================================================== */

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.prompt-card {
  border-radius: 26px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transform-style: preserve-3d;
}

.prompt-card:hover {
  background: var(--glass-card-hover);
  border-color: var(--glass-highlight);
}

.prompt-viewport {
  position: relative;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #070a14;
  cursor: pointer;
}

.prompt-viewport iframe {
  width: 145%;
  height: 145%;
  border: none;
  transform: scale(0.689);
  transform-origin: top left;
  pointer-events: none;
}

.prompt-viewport video.prompt-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  pointer-events: none;
}

.video-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.prompt-viewport-overlay {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 45%);
  pointer-events: none;
}

.swatch-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.swatch-mini {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.prompt-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.prompt-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.prompt-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border-soft);
}

.copy-prompt-btn.is-copied {
  background: #22c55e;
  color: #ffffff;
}

/* Modal Live Preview & Prompt Inspector */
.prompt-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-stage-wrap {
  width: 100%;
  height: 410px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(6, 9, 20, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.modal-device-frame {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-device-frame.is-tablet {
  width: min(768px, 100%);
}

.modal-device-frame.is-mobile {
  width: min(390px, 100%);
}

.modal-device-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-device-frame video.modal-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none;
  background: #070a14;
}

.prompt-code-box {
  width: 100%;
  min-height: 280px;
  max-height: 410px;
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(8, 12, 26, 0.78);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
}

html[data-lighting="light"] .prompt-code-box {
  background: rgba(15, 23, 42, 0.92);
  color: #f1f5f9;
}

@media (max-width: 920px) {
  .prompts-grid {
    grid-template-columns: 1fr;
  }
  .modal-stage-wrap {
    height: 300px;
  }
}
