/* ==========================================================================
   Playground & Page Frame Theme Styles
   ========================================================================== */

:root {
  /* Playground UI Variables (Premium Dark Mode Dashboard Frame) */
  --pg-bg: #f3f4f6;
  --pg-panel-bg: rgba(20, 26, 42, 0.7);
  --pg-border: rgba(255, 255, 255, 0.08);
  --pg-text-primary: #f3f4f6;
  --pg-text-secondary: #9ca3af;
  --pg-glow: rgba(16, 104, 235, 0.15);
}


body {
  font-family: var(--font-family);
  background-color: var(--pg-bg);
  color: var(--pg-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Top Header Portal
   ========================================================================== */
.pg-header {
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pg-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pg-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pg-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-logo-icon {
  background: linear-gradient(135deg, var(--color-primary), #3b82f6);
  color: var(--color-neutral-0);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--pg-glow);
}

.pg-logo-icon svg {
  width: 18px;
  height: 18px;
}

.pg-logo-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pg-tag {
  background-color: var(--color-primary-selected);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pg-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pg-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pg-select-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--pg-text-secondary);
  pointer-events: none;
}

.pg-select {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--pg-border);
  color: var(--pg-text-primary);
  border-radius: var(--border-radius-soft);
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  padding-right: 32px;
}

.pg-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.pg-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--pg-glow);
}

.pg-select-arrow {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  color: var(--pg-text-secondary);
  pointer-events: none;
}

.pg-btn {
  background: var(--color-primary);
  color: var(--color-neutral-0);
  border: none;
  border-radius: var(--border-radius-soft);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
}

.pg-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.pg-btn:active {
  transform: translateY(0);
}

.pg-btn-secondary {
  background: var(--color-secondary);
  border: 1px solid var(--pg-border);
  color: var(--pg-text-primary);
}

.pg-btn-secondary:hover {
  /* background: rgba(255, 255, 255, 0.1); */
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Playground Split Layout Setup
   ========================================================================== */
.pg-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  height: calc(100vh - 61px);
}

/* Panel Sections */
.pg-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.pg-panel-left {
  border-right: 1px solid var(--pg-border);
  background-color: #f0f2f5;
  /* Service Studio background canvas shade */
}

.pg-panel-right {
  background-color: var(--pg-bg);
}

.pg-panel-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--pg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(15, 23, 42, 0.9);
  height: 48px;
}

.pg-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pg-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pg-panel-title svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}

/* Tabs for Right Panel */
.pg-tabs {
  display: flex;
  gap: 8px;
}

.pg-tab,
.pg-tab-designer {
  background: transparent;
  border: none;
  color: var(--pg-text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-tab svg,
.pg-tab-designer svg {
  width: 14px;
  height: 14px;
}

.pg-tab:hover,
.pg-tab-designer:hover {
  color: var(--pg-text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.pg-tab.active,
.pg-tab-designer.active {
  color: var(--color-neutral-0);
  background-color: var(--color-primary);
}

/* Tab contents */
.pg-tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.pg-tab-content.active {
  display: flex;
  flex-direction: column;
}

#builder-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Code Inspection Views (Raw JSON Editor Panels)
   ========================================================================== */
.json-viewer-container {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.json-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.json-label {
  font-size: 12px;
  color: var(--pg-text-secondary);
  font-weight: 500;
}

.code-editor-wrapper {
  flex: 1;
  background-color: #0d1117;
  border: 1px solid var(--pg-border);
  border-radius: var(--border-radius-soft);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.code-editor-textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  color: #adbac7;
  border: none;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 16px;
  outline: none;
  resize: none;
  line-height: 1.5;
}

/* Empty JSON Answers state */
.json-empty-answers {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  color: var(--pg-text-secondary);
  text-align: center;
  padding: 48px;
}

.json-empty-answers svg {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.1);
}

.json-empty-answers h3 {
  font-size: 14px;
  color: var(--pg-text-primary);
  font-weight: 600;
}

.json-empty-answers p {
  font-size: 12px;
  max-width: 260px;
}

/* Toast Message Overlay */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: #1e293b;
  border-left: 4px solid var(--color-primary);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease-out;
  pointer-events: none;
}

.toast.toast-error {
  border-left-color: var(--color-error);
}

.toast.toast-success {
  border-left-color: var(--color-success);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes slideIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Playground Header Mode Switcher (Pill Tabs)
   ========================================================================== */
.pg-mode-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pg-border);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(8px);
}

.mode-tab {
  background: transparent;
  border: none;
  color: var(--pg-text-secondary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.mode-tab svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.mode-tab:hover {
  color: var(--pg-text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.mode-tab:hover svg {
  transform: scale(1.1);
}

.mode-tab.active {
  color: var(--color-neutral-0);
  background-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(16, 104, 235, 0.35);
}

/* ==========================================================================
   Workspace Viewport Toggle Rules (Designer vs Split vs Preview)
   ========================================================================== */
.pg-container.mode-designer {
  grid-template-columns: 1fr !important;
}

.pg-container.mode-designer .pg-panel-right {
  display: none !important;
}

.pg-container.mode-designer .pg-panel-left {
  display: flex !important;
  width: 100% !important;
}

.pg-container.mode-preview {
  grid-template-columns: 1fr !important;
}

.pg-container.mode-preview .pg-panel-left {
  display: none !important;
}

.pg-container.mode-preview .pg-panel-right {
  display: flex !important;
  width: 100% !important;
}

.pg-container.mode-split {
  grid-template-columns: 1fr 1fr !important;
}

.pg-container.mode-split .pg-panel-left,
.pg-container.mode-split .pg-panel-right {
  display: flex !important;
}

/* Responsive Viewport Grid Control */
@media (max-width: 1024px) {

  /* Hide the split view button on tablets/phones to protect layout aspect ratio */
  #btn-mode-split {
    display: none !important;
  }

  /* Fallback container columns to prevent crushing */
  .pg-container {
    grid-template-columns: 1fr !important;
  }

  .pg-container.mode-split .pg-panel-right {
    display: none !important;
  }
}

/* ==========================================================================
   Help Portal & AI Prompt Assistant Overlay Styles
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.25s ease-out forwards;
}

.modal-container {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--pg-border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2), 0 0 40px var(--pg-glow);
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--pg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 15, 25, 0.4);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--pg-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--pg-text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.modal-close-btn:hover {
  color: var(--pg-text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--pg-text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--pg-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-section ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-section strong {
  color: var(--pg-text-primary);
}

/* AI Prompt Layout Styles */
.prompt-box {
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
  background-color: rgba(11, 15, 25, 0.5);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prompt-header {
  padding: 10px 14px;
  background-color: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--pg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prompt-header span {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.8px;
}

.prompt-textarea {
  width: 100%;
  height: 180px;
  background: transparent;
  border: none;
  padding: 12px 14px;
  color: #cbd5e1;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  resize: none;
  outline: none;
  overflow-y: auto;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Submitted Responses Page / Sidebar Cards
   ========================================================================== */
.responses-list-container {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  gap: 15px;
  background: rgba(11, 15, 25, 0.2);
  height: 100%;
  box-sizing: border-box;
}

.response-card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--pg-border);
  border-radius: var(--border-radius-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.response-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  background: rgba(17, 24, 39, 0.85);
  box-shadow: 0 8px 16px rgba(16, 104, 235, 0.15), 0 0 1px var(--color-primary);
}

.response-card.active {
  border-color: var(--color-primary);
  background: rgba(16, 104, 235, 0.05);
  box-shadow: inset 0 0 0 1px var(--color-primary), 0 8px 20px rgba(16, 104, 235, 0.12);
}

.response-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.response-card.active::before,
.response-card:hover::before {
  opacity: 1;
}

.response-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.response-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pg-text-primary);
  line-height: 1.4;
}

.response-card-time {
  font-size: 11px;
  color: var(--pg-text-secondary);
  white-space: nowrap;
}

.response-card-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--pg-text-secondary);
  border-top: 1px solid var(--pg-border);
  border-bottom: 1px solid var(--pg-border);
  padding: 8px 0;
}

.response-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.response-summary-key {
  font-weight: 600;
  color: var(--color-neutral-7);
}

.response-summary-val {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  color: var(--color-neutral-9);
}

.response-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.response-card-actions .pg-btn {
  padding: 6px 12px;
  font-size: 12px;
  height: auto;
}

/* premium styles for read-only view elements in renderer */
.form-signature-box.is-readonly {
  background-color: var(--color-neutral-2) !important;
  border-color: var(--color-neutral-4) !important;
  cursor: not-allowed;
}

.form-file-uploader.is-readonly {
  background-color: var(--color-neutral-2) !important;
  border-color: var(--color-neutral-4) !important;
  border-style: solid !important;
  cursor: not-allowed;
}

/* ==========================================================================
   Image Lightbox / Attachment Preview Modal
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out forwards;
}

.lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: scaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  border: 1px solid var(--pg-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 104, 235, 0.15);
  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.4);
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--pg-text-primary);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.lightbox-close-btn:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  color: #fff;
  transform: rotate(90deg);
}

.lightbox-caption {
  color: var(--pg-text-secondary);
  font-size: 13px;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--pg-border);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Responsive Optimization for Lightbox Modal */
@media (max-width: 768px) {
  .lightbox-container {
    max-width: 95%;
    max-height: 90%;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
  }

  .lightbox-img {
    max-height: 70vh;
    border-radius: 6px;
  }

  /* Place close button inside the overlay space but easily clickable on mobile */
  .lightbox-close-btn {
    top: 15px;
    right: 15px;
    position: fixed;
    width: 44px;
    /* WCAG touch target */
    height: 44px;
    /* WCAG touch target */
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--pg-border);
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
  }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Discrete credit footer styling */
.pg-discrete-footer {
  position: fixed;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  color: var(--color-neutral-7);
  z-index: 9999;
  pointer-events: auto;
  opacity: 0.65;
  transition: opacity 0.2s ease, color 0.2s ease;
  font-family: var(--font-family);
  background: rgba(0, 0, 0, 0.02);
  padding: 2px 8px;
  border-radius: 4px;
}

.pg-discrete-footer:hover {
  opacity: 1;
  color: var(--color-neutral-10);
}

.pg-discrete-footer a.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.pg-discrete-footer a.footer-link:hover {
  text-decoration: underline;
}

/* Responsive adjustments for Top Header Portal */
@media (max-width: 1024px) {

  .mode-tab span,
  .pg-btn span {
    display: none;
  }

  .pg-header {
    padding: 10px 16px;
  }
}

@media (max-width: 768px) {
  .pg-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }

  .pg-header-left {
    justify-content: space-between;
  }

  .pg-mode-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .mode-tab {
    flex: 1;
    justify-content: center;
    padding: 6px 8px;
  }

  .pg-header-actions {
    justify-content: space-between;
    width: 100%;
  }

  .pg-select-wrapper {
    flex: 1;
  }

  .pg-select {
    width: 100% !important;
  }

  /* Playground Mobile Scrolling & Viewport Heights Optimization */
  .pg-panel-header {
    display: none !important;
  }

  body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
  }

  .pg-container {
    height: auto !important;
    min-height: calc(100vh - 61px);
    overflow: visible !important;
  }

  .pg-panel {
    height: auto !important;
    overflow: visible !important;
  }

  .pg-panel-left,
  .pg-panel-right {
    height: auto !important;
    overflow: visible !important;
  }

  .pg-tab-content {
    height: auto !important;
    overflow: visible !important;
  }

  #renderer-container,
  #builder-container,
  #response-viewer-container,
  #responses-list-container {
    height: auto !important;
    overflow: visible !important;
  }

  .json-viewer-container {
    height: 450px !important;
    flex: none !important;
  }

  /* Builder Mobile Column Stacking */
  .builder-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    overflow: visible !important;
  }

  .builder-palette,
  .builder-canvas,
  .builder-properties {
    height: auto !important;
    overflow: visible !important;
    border: none !important;
  }
}


/* ==========================================================================
   Playground UX/UI Overrides
   ========================================================================== */
/* 
.builder-layout {
  display: grid !important;
  grid-template-columns: 200px 1fr 300px !important;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.builder-layout.properties-collapsed {
  grid-template-columns: 200px 1fr 0px !important;
}

.builder-layout.properties-collapsed .builder-properties {
  width: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border-left: none !important;
  overflow: hidden !important;
}

.builder-properties {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease !important;
}

.palette-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}

.palette-item {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 8px 4px !important;
  font-size: 11px !important;
  gap: 6px !important;
  border-radius: 6px !important;
  height: 64px !important;
}

.palette-item svg {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.header-locale-selector select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
} */