/* 
  ========================================================================
  GLASSLAB STUDIO - SHOWCASE DASHBOARD STYLESHEET
  Styles for the outer theme wrapper and control panel.
  ========================================================================
*/

:root {
  --dash-bg: #050508;
  --dash-surface: rgba(15, 15, 23, 0.7);
  --dash-border: rgba(255, 255, 255, 0.08);
  --dash-text-primary: #ffffff;
  --dash-text-secondary: #9ea0b6;
  --dash-accent: #a855f7; /* Purple */
  --dash-accent-glow: rgba(168, 85, 247, 0.25);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--dash-bg);
  color: var(--dash-text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Ambient Kiln/Glass Glow Background Effects */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--dash-accent) 0%, transparent 80%);
  top: 10%;
  left: 5%;
  animation: float-slow 20s infinite alternate;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3df3a4 0%, transparent 80%);
  bottom: 10%;
  right: 5%;
  animation: float-slow 25s infinite alternate-reverse;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.1); }
  100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* Dashboard Layout */
.app-container {
  display: flex;
  height: 100vh;
  padding: 1.5rem;
  gap: 1.5rem;
  max-width: 1920px;
  margin: 0 auto;
}

.glass-panel {
  background: var(--dash-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--dash-border);
  border-radius: 20px;
}

/* Control Panel (Sidebar) */
.control-panel {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: 100%;
  overflow-y: auto;
}

/* Custom scrollbar for control panel to match theme */
.control-panel::-webkit-scrollbar {
  width: 6px;
}
.control-panel::-webkit-scrollbar-track {
  background: transparent;
}
.control-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.control-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Standalone View Button */
.standalone-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #3df3a4;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 15px;
  text-shadow: 0 0 10px rgba(61, 243, 164, 0.3);
  transition: var(--transition-smooth);
}

.standalone-btn:hover {
  background: rgba(61, 243, 164, 0.1);
  color: #ffffff;
  border-color: rgba(61, 243, 164, 0.4);
  box-shadow: 0 0 15px rgba(61, 243, 164, 0.2);
}

.standalone-btn.mobile-btn {
  margin-top: 8px;
  border-color: rgba(0, 229, 255, 0.3);
  color: #00e5ff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.standalone-btn.mobile-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: #ffffff;
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.panel-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--dash-accent);
  box-shadow: 0 0 15px var(--dash-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--dash-text-secondary);
}

.panel-section {
  margin-bottom: 2rem;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dash-text-secondary);
  margin-bottom: 1rem;
}

/* Sidebar Nav Buttons */
.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--dash-text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--dash-text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: rgba(168, 85, 247, 0.15);
  color: var(--dash-text-primary);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

.btn-icon {
  font-size: 1.1rem;
}

/* Accent Color Swatches */
.color-options {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.custom-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--dash-text-secondary);
}

.custom-color-picker input[type="color"] {
  border: none;
  background: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 4px;
}

/* Info Box */
.dashboard-info {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-top: auto;
}

.info-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.info-text {
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
  line-height: 1.5;
}

.panel-footer {
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1rem;
}

/* Main Preview Workspace */
.main-content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

/* Top Navigation Tabs Header */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  height: 60px;
  flex-shrink: 0;
}

.tab-triggers {
  display: flex;
  gap: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--dash-text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--dash-text-primary);
  background: rgba(255,255,255,0.03);
}

.tab-btn.active {
  color: var(--dash-text-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.viewport-controls {
  display: flex;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 16px;
}

.control-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--dash-text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.control-icon:hover,
.control-icon.active {
  color: var(--dash-text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Tab Panes */
.tab-pane {
  display: none;
  flex-grow: 1;
  height: calc(100% - 75px);
  overflow: hidden;
}

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

/* Simulator Viewport (iframe Wrapper) */
.viewport-wrapper {
  position: relative; /* For phone notch absolute placement */
  margin: 0 auto;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background-color: #08080a;
  border: 1px solid var(--dash-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-view {
  width: 100%;
}

.mobile-view {
  width: 390px; /* Sleeker width */
  max-width: 100%;
  border: 14px solid #18181f; /* Premium thick bezel */
  border-radius: 48px; /* Smooth corners */
  height: 95%;
  max-height: 100%;
}

/* Phone Notch / Dynamic Island */
.phone-notch {
  display: none;
}

.mobile-view .phone-notch,
body.standalone-preview.force-mobile .phone-notch {
  display: block;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background-color: #18181f;
  border-radius: 13px;
  z-index: 10;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Subtle camera and sensor cutouts inside the island */
.phone-notch::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #09090d;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-notch::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 4px;
  background: #09090d;
  border-radius: 2px;
}

#preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #08080a;
}

/* Code Inspector Tab Layout */
.code-export-container {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.code-sidebar {
  width: 180px;
  border-right: 1px solid var(--dash-border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background-color: rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.code-file-btn {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--dash-text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.code-file-btn:hover {
  background: rgba(255,255,255,0.03);
  color: var(--dash-text-primary);
}

.code-file-btn.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--dash-text-primary);
  font-weight: 600;
}

.code-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.code-body-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.1);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
}

.copy-btn {
  background: var(--dash-accent);
  color: #ffffff;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px var(--dash-accent-glow);
}

.copy-btn:hover {
  transform: translateY(-1px);
  background-color: #b55fe6;
}

.code-block {
  padding: 24px;
  margin: 0;
  overflow: auto;
  flex-grow: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  background-color: #050508;
  color: #e5c07b;
}

code {
  display: block;
  white-space: pre;
}

/* Animations for buttons */
.copy-btn:active {
  transform: scale(0.95);
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }
  .control-panel {
    width: 100%;
    height: auto;
  }
  .main-content-area {
    height: 800px;
  }
  .tab-pane {
    height: 700px;
  }
}

/* Standalone Preview Mode overrides */
body.standalone-preview {
  overflow: hidden;
}

body.standalone-preview .control-panel,
body.standalone-preview .tab-header,
body.standalone-preview .ambient-glow {
  display: none !important;
}

body.standalone-preview .app-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  height: 100vh !important;
  width: 100vw !important;
  display: block !important;
}

body.standalone-preview .main-content-area {
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.standalone-preview .tab-pane {
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.standalone-preview .viewport-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

body.standalone-preview #preview-frame {
  border-radius: 0 !important;
  border: none !important;
  width: 100% !important;
  height: 100% !important;
}

/* Force Mobile Standalone Preview Mockup frame */
body.standalone-preview.force-mobile {
  background-color: #050508;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

body.standalone-preview.force-mobile .app-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100vh !important;
  width: 100vw !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.standalone-preview.force-mobile .main-content-area {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.standalone-preview.force-mobile .tab-pane {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.standalone-preview.force-mobile .viewport-wrapper {
  width: 390px !important;
  height: 860px !important; /* Taller, sleek modern aspect ratio */
  max-width: 90vw !important;
  max-height: 90vh !important;
  border: 14px solid #18181f !important; /* Thicker premium border */
  border-radius: 48px !important; /* Rounder corner to match bezel */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
  margin: 0 auto !important;
}

body.standalone-preview.force-mobile #preview-frame {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
}

/* ========================================================================
   SETUP ACCORDION STYLES
   ======================================================================== */
.setup-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.accordion-item.active {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(168, 85, 247, 0.25);
}

.accordion-trigger {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--dash-text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.02);
}

.accordion-arrow {
  font-size: 0.6rem;
  color: var(--dash-text-secondary);
  transition: transform 0.3s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
  line-height: 1.5;
  transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.3s ease;
}

.accordion-content code {
  display: inline;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  color: #3df3a4;
  font-family: monospace;
}

