/* ========================================
   LANDSCAPE WARNING FEATURE
   Remove this entire file to disable the landscape warning
   ======================================== */

/* Landscape orientation warning overlay */
.landscape-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(248, 248, 245);
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', cursive, sans-serif;
  color: #2e8b3c;
}

.landscape-warning-content {
  text-align: center;
  padding: 2rem;
}

.landscape-warning-title {
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.landscape-warning-subtitle {
  font-size: 1.2em;
  margin-bottom: 3rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* Phone rotation animation */
.phone-rotation-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  position: relative;
}

.phone-icon {
  width: 60px;
  height: 100px;
  background: #2e8b3c;
  border-radius: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  animation: rotatePhone 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-icon::before {
  content: '';
  width: 40px;
  height: 65px;
  background: rgb(248, 248, 245);
  border-radius: 6px;
  position: absolute;
}

.phone-icon::after {
  content: '';
  width: 20px;
  height: 3px;
  background: #2e8b3c;
  border-radius: 2px;
  position: absolute;
  bottom: 8px;
}

@keyframes rotatePhone {
  0% {
    transform: translate(-50%, -50%) rotate(90deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

/* ========================================
   LANDSCAPE WARNING ACTIVATION RULES
   Smart handling that doesn't interfere with email input focus
   ======================================== */

/* Show landscape warning only on mobile devices in landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .landscape-warning {
    display: flex;
  }
  
  /* Hide main content when landscape warning is shown */
  body {
    overflow: hidden;
  }
  
  .main-wrapper,
  #loader,
  .background-shapes {
    display: none !important;
  }
  
  flowise-chatbot {
    display:none !important;
  }
  
  /* SMART FOCUS HANDLING: Hide landscape warning when email input is focused (keyboard open) */
  body.email-input-focused .landscape-warning {
    display: none !important;
  }
  
  body.email-input-focused .main-wrapper,
  body.email-input-focused #loader,
  body.email-input-focused .background-shapes {
    display: block !important;
  }
  
  body.email-input-focused {
    overflow: visible;
  }
  
  body.email-input-focused flowise-chatbot {
    opacity: 1 !important;
    transition: all 0.3s ease !important;
  }
}

/* Ensure warning doesn't show on desktop/tablet landscape */
@media screen and (min-width: 769px) {
  .landscape-warning {
    display: none !important;
  }
  
  flowise-chatbot {
    opacity: 1 !important;
    transition: none !important;
    animation: none !important;
  }
}
