/**
 * Unified prompt view.
 *
 * Loaded after frontend.css and scoped to the relocated variable block, the
 * live preview and the modal footer. Kept separate so the new prompt view can
 * be reviewed (and rolled back) without touching the 400+ line base sheet.
 */

/* --- Variables: first thing in the prompt panel, before the preview --- */
.ux360-pl-modal__vars {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ux360-pl-border, #e5e7eb);
  border-radius: 12px;
  background: var(--ux360-pl-primary-soft, #f5f8ff);
}

.ux360-pl-modal__varsHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.ux360-pl-modal__varsTitle {
  font-weight: 600;
  font-size: 13px;
  color: var(--ux360-pl-text, #192335);
}

.ux360-pl-modal__varsHint {
  font-size: 12px;
  color: var(--ux360-pl-text-soft, #62718e);
}

/* Nudges the user when placeholders are still unfilled. */
.ux360-pl-modal__varsHint.is-missing {
  color: var(--ux360-pl-warning, #9a6700);
  font-weight: 600;
}

.ux360-pl-modal__varRow {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.ux360-pl-modal__varRow label {
  font-size: 12px;
  color: var(--ux360-pl-text, #374151);
  text-transform: capitalize;
}

.ux360-pl-modal__varRow input {
  width: 100%;
  min-height: 40px; /* comfortable touch target */
  border: 1px solid var(--ux360-pl-border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--ux360-pl-surface, #fff);
  color: var(--ux360-pl-text, #192335);
}

.ux360-pl-modal__varRow input:focus-visible {
  outline: 2px solid var(--ux360-pl-primary, #2563eb);
  outline-offset: 1px;
}

/* --- Preview --- */
.ux360-pl-modal__previewHead {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ux360-pl-text-soft, #62718e);
  margin: 0 0 6px;
}

.ux360-pl-modal__varToken {
  background: var(--ux360-pl-warning-soft, #fff8d9);
  color: var(--ux360-pl-warning, #9a6700);
  border-radius: 4px;
  padding: 0 3px;
}

/* --- Footer: copy is the primary action, with or without AI --- */
.ux360-pl-modal__footer .ux360-copy-prompt {
  font-weight: 600;
}

@media (max-width: 640px) {
  .ux360-pl-modal__varRow {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ux360-pl-modal__footer {
    justify-content: stretch;
  }

  .ux360-pl-modal__footer .button {
    flex: 1 1 auto;
    min-height: 44px;
  }
}

/* --- AI master switch off: nothing AI-related may remain visible --- */
body.mi-ai-off .ux360-pl-tab[data-tab="chat"],
body.mi-ai-off .ux360-pl-panel--chat,
body.mi-ai-off .ux360-use-prompt-modal,
body.mi-ai-off .ux360-pl-drawer-chat,
body.mi-ai-off .ux360-pl-chat,
body.mi-ai-off .ux360-pl-card__chat {
  display: none !important;
}

/* --- Guest teaser cards --------------------------------------------------
 * The title leads; activity numbers follow the text and only appear when
 * there is activity to report.
 */
.ux360-pl-guest-teaser__card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.ux360-pl-guest-teaser__meta {
  margin-bottom: 8px;
}

.ux360-pl-guest-teaser__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ux360-pl-text-soft, #62718e);
}

.ux360-pl-guest-teaser__notice {
  font-size: 13px;
}
