/* PWA Orientation Lock - Mobile Portrait Only, Desktop Landscape Allowed */

/* Force portrait orientation on mobile devices */
@media screen and (max-width: 1024px) and (orientation: landscape) {
  body {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    height: 100vw;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
  }
  
  /* Alternative: Show rotation warning overlay */
  body::before {
    content: "Please rotate your device to portrait mode";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem;
    z-index: 999999;
    flex-direction: column;
  }
  
  body::after {
    content: "📱";
    font-size: 5rem;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    z-index: 999999;
    animation: rotateIcon 1.5s ease-in-out infinite;
  }
  
  @keyframes rotateIcon {
    0%, 100% { transform: translate(-50%, -50%) rotate(90deg); }
    50% { transform: translate(-50%, -50%) rotate(0deg); }
  }
}

/* Allow landscape on tablets and desktops */
@media screen and (min-width: 1025px) {
  body {
    /* Normal behavior for desktop */
    transform: none !important;
    width: auto !important;
    height: auto !important;
    position: relative !important;
  }
  
  body::before,
  body::after {
    display: none !important;
  }
}

/* Ensure portrait lock on mobile devices only */
@media screen and (max-width: 767px) {
  html {
    /* Lock viewport to portrait */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
}
