/* SimStudio Embed UI Override System */

/* Settings Modal Structure Overrides */

/* Hide Left Sidebar */
.sim-hide-left-sidebar [role="dialog"] .w-\[180px\] { 
  display: none !important; 
}

.sim-hide-left-sidebar [role="dialog"] .flex.h-full {
  padding-left: 0 !important;
}

.sim-hide-left-sidebar [role="dialog"] .flex-1 {
  margin-left: 0 !important;
  max-width: none !important;
}

/* Hide Close Button */
.sim-hide-close-button [role="dialog"] button:has(.sr-only) {
  display: none !important; 
}

.sim-hide-close-button [role="dialog"] button[class*="absolute"][class*="top-4"][class*="right-4"] {
  display: none !important;
}

/* Hide Header */
.sim-hide-header [role="dialog"] .border-b.px-6.py-4:has(h2) { 
  display: none !important; 
}

.sim-hide-header [role="dialog"] [class*="border-b"]:has(h2) {
  display: none !important;
}

/* Individual Tab Targeting by Icon Classes */
.sim-hide-tab-general [role="dialog"] button:has(.lucide-settings) { 
  display: none !important; 
}

.sim-hide-tab-account [role="dialog"] button:has(.lucide-user) { 
  display: none !important; 
}

.sim-hide-tab-mcp [role="dialog"] button:has(.lucide-server) { 
  display: none !important; 
}

.sim-hide-tab-environment [role="dialog"] button:has(.lucide-file-code) { 
  display: none !important; 
}

.sim-hide-tab-apikeys [role="dialog"] button:has(.lucide-key) { 
  display: none !important; 
}

.sim-hide-tab-subscription [role="dialog"] button:has(.lucide-credit-card) { 
  display: none !important; 
}

.sim-hide-tab-team [role="dialog"] button:has(.lucide-users) { 
  display: none !important; 
}

.sim-hide-tab-sso [role="dialog"] button:has(.lucide-log-in) { 
  display: none !important; 
}

.sim-hide-tab-privacy [role="dialog"] button:has(.lucide-shield) { 
  display: none !important; 
}

.sim-hide-tab-copilot [role="dialog"] button:has(.lucide-bot) { 
  display: none !important; 
}

.sim-hide-tab-credentials [role="dialog"] button:has(.lucide-waypoints) { 
  display: none !important; 
}

/* Workspace Sidebar Hiding - COMMENTED OLD SELECTORS */
/* 
.sim-hide-workspace-sidebar aside.fixed.inset-y-0.left-0.z-10 { 
  display: none !important; 
}

.sim-hide-workspace-sidebar aside[class*="fixed"][class*="inset-y-0"][class*="left-0"] { 
  display: none !important; 
}

Remove left padding from main content when sidebar is hidden
.sim-hide-workspace-sidebar .flex.h-\[100vh\].flex-col.pl-64,
.sim-hide-workspace-sidebar [class*="pl-64"] {
  padding-left: 0 !important;
}

Ensure full width utilization
.sim-hide-workspace-sidebar .flex.h-\[100vh\].flex-col {
  margin-left: 0 !important;
}
*/

/* WORKSPACE SIDEBAR HIDING - Target the correct z-20 div */
.sim-hide-workspace-sidebar body > div.flex.min-h-screen.w-full > div.z-20 {
  display: none !important;
  visibility: hidden !important;
}

/* Alternative selector for the z-20 div containing aside */
.sim-hide-workspace-sidebar div.z-20:has(aside) {
  display: none !important;
  visibility: hidden !important;
}

/* Fallback targeting the aside directly inside z-20 div */
.sim-hide-workspace-sidebar div.z-20 > aside {
  display: none !important;
  visibility: hidden !important;
}

/* Direct targeting of workspace aside sidebar (z-10) */
.sim-hide-workspace-sidebar aside.fixed.inset-y-0.left-0.z-10 {
  display: none !important;
  visibility: hidden !important;
}

/* More generic aside targeting for workspace sidebar */
.sim-hide-workspace-sidebar aside.z-10 {
  display: none !important;
  visibility: hidden !important;
}

/* Hide Tooltips */
.sim-hide-tooltips [role="tooltip"],
.sim-hide-tooltips .tooltip,
.sim-hide-tooltips [data-tooltip],
.sim-hide-tooltips [title] {
  display: none !important;
  visibility: hidden !important;
}

/* Background Style Overrides */
.sim-bg-transparent {
  background: transparent !important;
}

.sim-bg-transparent > div:first-child {
  background: transparent !important;
  backdrop-filter: none !important;
}

.sim-bg-blur > div:first-child {
  background: rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(8px) !important;
}

.sim-bg-solid > div:first-child {
  background: var(--background) !important;
  backdrop-filter: none !important;
}

/* Size Preset Overrides */
.sim-size-compact > div:first-child > div {
  max-width: 800px !important;
  max-height: 70vh !important;
}

.sim-size-standard > div:first-child > div {
  max-width: 1200px !important;
  max-height: 90vh !important;
}

.sim-size-full > div:first-child {
  padding: 0 !important;
}

.sim-size-full > div:first-child > div {
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Embed Layout Enhancements */
.embed-modal-container {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.embed-modal-content {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sim-hide-left-sidebar [role="dialog"] {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Default 75% zoom for better workflow overview */
/* Option 1: zoom (keeps full screen but shifts top-left) */
/*
.workflow-container {
  zoom: 0.75 !important;
}
*/

/* Option 2: transform (centers properly but breaks full screen) */
/*
.workflow-container {
  transform: scale(0.75) !important;
  transform-origin: center center !important;
}
*/

/* Browser compatibility fallbacks for :has() selector */
@supports not selector(:has(*)) {
  /* Fallback for browsers without :has() support */
  [data-sim-hide="left-sidebar"] .w-\[180px\] { 
    display: none !important; 
  }
  
  [data-sim-hide="close-button"] button[aria-label*="close" i] { 
    display: none !important; 
  }
  
  [data-sim-hide="header"] .border-b { 
    display: none !important; 
  }
}