/* ETMINSTANTWORKS - Web Styles */

/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
  color: #333;
}

/* Flutter Web Optimizations */
flt-glass-pane {
  height: 100vh !important;
  width: 100vw !important;
}

/* Loading improvements */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  body {
    font-size: 16px;
  }
}

@media screen and (min-width: 1025px) {
  body {
    font-size: 18px;
  }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(46, 125, 50, 0.8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(46, 125, 50, 1);
}

/* Focus Management for Web */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #2E7D32;
  outline-offset: 2px;
}

/* Touch/Click Areas for Web */
button, 
.clickable {
  cursor: pointer;
  user-select: none;
}

/* Performance Optimizations */
.flutter-container {
  contain: layout style paint;
}

/* Prevent text selection on UI elements */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Web-specific animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000;
    --secondary-color: #fff;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1B5E20 0%, #0D4016 100%);
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .no-print {
    display: none !important;
  }
}

/* ==================== DRAWER PWA OPTIMIZATIONS ==================== */

/* Drawer optimizado para móviles y tablets */
.drawer-overlay {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.drawer-content {
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #1B5E20 100%);
}

/* Mejoras táctiles para elementos del drawer */
.drawer-item {
  min-height: 56px;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-item:active {
  background-color: rgba(255, 255, 255, 0.25) !important;
  transform: scale(0.98);
}

.drawer-item:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Header del drawer responsivo */
.drawer-header {
  background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Safe area para dispositivos con notch */
@supports (padding: max(0px)) {
  .drawer-header {
    padding-top: max(24px, env(safe-area-inset-top) + 24px) !important;
  }
  
  .drawer-content {
    padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
  }
}

/* Mejoras específicas para móviles */
@media screen and (max-width: 768px) {
  .drawer-item {
    min-height: 60px;
    font-size: 16px;
  }
  
  .drawer-header {
    padding: 32px 20px 20px 20px;
  }
}

/* Mejoras para tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .drawer-item {
    min-height: 58px;
    font-size: 17px;
  }
  
  .drawer-header {
    padding: 28px 24px 24px 24px;
  }
}

/* PWA específicos para drawer */
.drawer-pwa {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Animaciones suaves para drawer */
.drawer-slide-in {
  animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
} 