/* Digivite Subdomain Template Tester Custom Overlay Styles */

:root {
  --tester-bg: #090d16;
  --tester-surface: #121824;
  --tester-surface-variant: #1a2234;
  --tester-border: rgba(255, 255, 255, 0.12);
  --tester-primary: #d4af37; /* Digivite Gold Accent */
  --tester-primary-hover: #e5be48;
  --tester-text: #f3f4f6;
  --tester-muted: #9ca3af;
}

body.tester-body {
  background-color: var(--tester-bg);
  color: var(--tester-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
}

/* Device Viewport Frames */
.viewport-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 70px);
  padding: 24px;
  box-sizing: border-box;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.5) 0%, rgba(9, 13, 22, 0.95) 100%);
  transition: all 0.4s ease;
}

/* Viewport Frame Styles */
.viewport-frame {
  position: relative;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.35s ease;
  overflow: hidden;
}

/* Desktop Viewport */
.viewport-frame.mode-desktop {
  width: 100%;
  max-width: 1920px;
  height: 85vh;
  border-radius: 12px;
}

/* Tablet Viewport */
.viewport-frame.mode-tablet {
  width: 768px;
  height: 1024px;
  max-height: 85vh;
  border-radius: 36px;
  border: 12px solid #1e293b;
}

/* Mobile Viewport */
.viewport-frame.mode-mobile {
  width: 375px;
  height: 812px;
  max-height: 85vh;
  border-radius: 44px;
  border: 14px solid #1e293b;
}

/* Orientation Landscape Modifier */
.viewport-frame.landscape.mode-tablet {
  width: 1024px;
  height: 768px;
}

.viewport-frame.landscape.mode-mobile {
  width: 812px;
  height: 375px;
}

/* Mobile Notch & Status Header Overlay */
.mobile-chassis-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #1e293b;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-notch {
  width: 110px;
  height: 18px;
  background: #090d16;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Preview Target Iframe */
.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

/* Floating Control Toolbar */
.tester-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 24, 36, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tester-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Slide-Over Drawer for JSON Editor & Diagnostic Panel */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--tester-surface);
  border-left: 1px solid var(--tester-border);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer-panel.active {
  transform: translateX(0);
}

.code-editor-textarea {
  width: 100%;
  height: 100%;
  background: #090d16;
  color: #38bdf8;
  font-family: 'Fira Code', Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--tester-border);
  border-radius: 8px;
  padding: 14px;
  box-sizing: border-box;
  resize: none;
  outline: none;
}

.code-editor-textarea:focus {
  border-color: var(--tester-primary);
}
