/* ============================================
   MODAL 3D MINIMALISTA - ESTILO iOS
   Versão: 2.0 | Data: 17/10/2025
   ============================================ */

/* Modal Base */
.planogram-3d-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.planogram-3d-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header - Apenas Desktop */
.planogram-3d-modal-header.desktop-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.planogram-3d-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.planogram-3d-title i {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
}

.planogram-3d-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.planogram-3d-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Container 3D */
.planogram-3d-container {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.planogram-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* =====================================
   MENU SUSPENSO MINIMALISTA (iOS)
   ===================================== */

.planogram-3d-dropdown-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* Botão Trigger (3 pontos) */
.dropdown-menu-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.dropdown-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.dropdown-menu-trigger.active {
  background: rgba(102, 126, 234, 0.8);
  border-color: rgba(102, 126, 234, 1);
}

/* Menu Suspenso */
.dropdown-menu-content {
  position: absolute;
  top: 50px;
  right: 0;
  min-width: 280px;
  max-width: 320px;
  background: rgba(28, 28, 30, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu-content.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header do Menu */
.dropdown-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(102, 126, 234, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-menu-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dropdown-menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Lista de Opções */
.dropdown-menu-options {
  padding: 8px 0;
}

.dropdown-option {
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  font-size: 16px;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-option:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.98);
}

.option-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-content i {
  font-size: 18px;
  color: #667eea;
  width: 20px;
  text-align: center;
}

.option-content span {
  font-weight: 500;
}

.option-arrow {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}

/* Toggle Switch (estilo iOS) */
.option-toggle {
  display: flex;
  align-items: center;
}

.toggle-switch {
  width: 50px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.toggle-switch::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
  background: #667eea;
}

.toggle-switch.active::before {
  transform: translateX(20px);
}

/* Informações de Controle */
.dropdown-menu-info {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.info-section {
  margin-bottom: 12px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-section p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* Notificações */
.dropdown-notification {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  background: rgba(28, 28, 30, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100010;
  white-space: nowrap;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-notification-success {
  color: #4ade80;
  border-left: 4px solid #4ade80;
}

.dropdown-notification-info {
  color: #60a5fa;
  border-left: 4px solid #60a5fa;
}

/* =====================================
   RESPONSIVIDADE
   ===================================== */

/* Mobile - Header oculto, tela cheia */
@media (max-width: 768px) {
  .planogram-3d-modal-header.desktop-only {
    display: none !important;
  }
  
  .planogram-3d-modal-content {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    max-width: none !important;
    max-height: none !important;
  }
  
  .planogram-3d-modal {
    padding: 0 !important;
  }
  
  .planogram-3d-dropdown-menu {
    top: 20px;
    right: 20px;
  }
  
  .dropdown-menu-trigger {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .dropdown-menu-content {
    min-width: 260px;
    max-width: calc(100vw - 40px);
    top: 60px;
  }
  
  .dropdown-menu-header {
    padding: 14px 18px;
  }
  
  .dropdown-menu-header h3 {
    font-size: 15px;
  }
  
  .dropdown-option {
    padding: 14px 18px;
    font-size: 16px;
  }
  
  .option-content i {
    font-size: 20px;
  }
  
  .dropdown-notification {
    top: 60px;
    padding: 10px 20px;
    font-size: 13px;
    max-width: 90%;
    white-space: normal;
    text-align: center;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .planogram-3d-dropdown-menu {
    top: 15px;
    right: 15px;
  }
  
  .dropdown-menu-trigger {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .dropdown-menu-content {
    min-width: 240px;
    max-width: calc(100vw - 30px);
    top: 55px;
  }
  
  .dropdown-menu-header {
    padding: 12px 16px;
  }
  
  .dropdown-menu-header h3 {
    font-size: 14px;
  }
  
  .dropdown-option {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  .option-content i {
    font-size: 18px;
  }
  
  .info-section h4 {
    font-size: 13px;
  }
  
  .info-section p {
    font-size: 12px;
  }
}

/* Desktop */
@media (min-width: 769px) {
  .planogram-3d-modal-content {
    width: 95%;
    height: 95%;
    max-width: 1400px;
    max-height: 900px;
    border-radius: 16px;
  }
  
  .dropdown-menu-content {
    min-width: 300px;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .dropdown-menu-content {
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .dropdown-menu-info {
    max-height: 120px;
    overflow-y: auto;
  }
}

/* =====================================
   ANIMAÇÕES E TRANSIÇÕES
   ===================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.planogram-3d-modal {
  animation: fadeIn 0.3s ease;
}

/* Modo escuro automático */
@media (prefers-color-scheme: dark) {
  .dropdown-menu-content {
    background: rgba(28, 28, 30, 0.98);
  }
}

/* Reduzir movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
  .dropdown-menu-content,
  .dropdown-menu-trigger,
  .dropdown-option,
  .dropdown-notification {
    transition: none;
    animation: none;
  }
}

/* Acessibilidade */
.dropdown-menu-trigger:focus,
.dropdown-option:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print */
@media print {
  .planogram-3d-dropdown-menu {
    display: none;
  }
}


