/* Device Simulation Styles for Scaleify */

/* Device Dropdown Styles */
.device-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.device-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.device-dropdown-content {
  padding: 8px;
}

.device-category {
  margin-bottom: 12px;
}

.device-category:last-child {
  margin-bottom: 0;
}

.device-category-title {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
}

.device-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.device-option:hover {
  background: #2a2a2a;
}

.device-option:active {
  background: #333;
}

.device-name {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}

.device-specs {
  font-size: 12px;
  color: #888;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Control Button Styles - HIDDEN TO CLEAN UP PREVIEW */
.orientation-controls,
.scale-controls,
.interaction-controls {
  display: none !important; /* Hide all unnecessary control buttons */
}

.orientation-btn,
.scale-btn,
.interaction-btn,
.screenshot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  transition: all 0.15s ease;
}

.orientation-btn:hover,
.scale-btn:hover,
.interaction-btn:hover,
.screenshot-btn:hover {
  background: #2a2a2a;
  border-color: #444;
  color: #fff;
}

.orientation-btn.active,
.interaction-btn.active {
  background: #007AFF;
  border-color: #007AFF;
  color: #fff;
}

.scale-display {
  font-size: 12px;
  color: #888;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  min-width: 40px;
  text-align: center;
  padding: 0 8px;
}

/* Device Frame Styles */
.device-frame {
  position: relative;
  margin: 0 auto;
  transition: all 0.3s ease;
  transform-origin: center center;
  width: 380px;
  height: 720px;
  overflow: visible;
}

.device-outline {
  position: relative;
  width: 100%;
  height: 100%;
}

.device-bezel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0D1117;
  border-radius: var(--corner-radius, 50px);
  padding: 8px;
  box-shadow: 
    0 0 0 2px #333,
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0D1117;
  border-radius: calc(var(--corner-radius, 50px) - 8px);
  overflow: hidden;
}

.device-content {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0D1117;
  overflow: hidden;
}

/* iPhone-specific styles */
.device-frame.iphone .device-bezel {
  background: #0D1117;
}

.device-frame.iphone.has-dynamic-island .dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 19px;
  z-index: 10;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
  opacity: 1;
  transition: none;
  animation: none;
  visibility: visible;
  display: block;
  pointer-events: none;
}

.device-frame.iphone.has-notch .notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 164px;
  height: 30px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 10;
  opacity: 1;
  transition: none;
  animation: none;
  visibility: visible;
  display: block;
  pointer-events: none;
}

.device-frame.iphone .home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.device-frame.iphone.has-home-button .home-button {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  background: #333;
  border: 2px solid #555;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* iPad-specific styles */
.device-frame.ipad .device-bezel {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  padding: 12px;
}

.device-frame.ipad .home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* Apple Watch-specific styles */
.device-frame.watch .device-bezel {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  border-radius: var(--corner-radius, 50px);
  position: relative;
}

.device-frame.watch .digital-crown {
  position: absolute;
  right: -6px;
  top: 25%;
  width: 12px;
  height: 24px;
  background: linear-gradient(90deg, #555, #333);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.device-frame.watch .side-button {
  position: absolute;
  right: -4px;
  top: 45%;
  width: 8px;
  height: 16px;
  background: linear-gradient(90deg, #555, #333);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Landscape orientation */
.device-frame.landscape {
  transform: rotate(0deg);
}

.device-frame.landscape.iphone .dynamic-island {
  top: 50%;
  left: 12px;
  transform: translateY(-50%) rotate(90deg);
}

.device-frame.landscape.iphone .home-indicator {
  bottom: 50%;
  right: 8px;
  left: auto;
  transform: translateY(50%) rotate(90deg);
}

/* Interactive mode */
.device-frame.interactive {
  cursor: pointer;
}

.device-frame.interactive .device-content {
  pointer-events: all;
}

.device-frame:not(.interactive) .device-content {
  pointer-events: none;
}

/* Touch effect animation */
@keyframes touchRipple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.touch-effect {
  animation: touchRipple 0.3s ease-out forwards;
}

/* Device preview container adjustments */
.device-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: visible;
  padding: 10px;
  box-sizing: border-box;
  min-height: 800px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .orientation-controls,
  .scale-controls,
  .interaction-controls {
    gap: 2px;
  }
  
  .orientation-btn,
  .scale-btn,
  .interaction-btn,
  .screenshot-btn {
    width: 28px;
    height: 28px;
  }
  
  .scale-display {
    font-size: 11px;
    min-width: 35px;
    padding: 0 6px;
  }
}

@media (max-width: 768px) {
  .device-dropdown {
    min-width: 240px;
    right: -20px;
  }
  
  .orientation-controls,
  .scale-controls,
  .interaction-controls {
    margin-left: 8px;
  }
  
  .device-frame {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .device-preview {
    padding: 10px;
  }
}

@media (max-height: 600px) {
  .device-frame {
    max-height: 95vh;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .device-dropdown {
    background: #0a0a0a;
    border-color: #222;
  }
  
  .device-option:hover {
    background: #1a1a1a;
  }
  
  .device-bezel {
    box-shadow: 
      0 0 0 2px #222,
      0 8px 32px rgba(0, 0, 0, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

/* Accessibility improvements */
.orientation-btn:focus,
.scale-btn:focus,
.interaction-btn:focus,
.screenshot-btn:focus {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
}

.device-option:focus {
  outline: 2px solid #007AFF;
  outline-offset: -2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .device-bezel {
    border: 2px solid #fff;
  }
  
  .device-option {
    border: 1px solid #666;
  }
  
  .orientation-btn,
  .scale-btn,
  .interaction-btn,
  .screenshot-btn {
    border-color: #666;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .device-frame,
  .device-dropdown,
  .orientation-btn,
  .scale-btn,
  .interaction-btn,
  .screenshot-btn {
    transition: none;
  }
  
  .touch-effect {
    animation: none;
  }
}

/* Prevent any transitions from affecting device frame elements */
.device-frame * {
  transition: none !important;
  animation: none !important;
  box-sizing: border-box;
}

/* Allow specific transitions only for the device frame itself during resize */
.device-frame {
  transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
}

.device-frame .dynamic-island,
.device-frame .notch,
.device-frame .home-indicator,
.device-frame .home-button {
  transition: none !important;
  animation: none !important;
} 