/* Mobile-specific optimizations for Daily 1,2,3 */

/* Prevent horizontal scrolling */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* Better mobile typography */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  h1,
  h2,
  h3 {
    line-height: 1.2;
  }
}

/* Mobile-friendly buttons */
@media (max-width: 768px) {
  button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Larger touch targets for mobile */
  .mobile-task-card {
    min-height: 60px;
    padding: 12px;
  }

  /* Better spacing for mobile */
  .space-y-3 > * + * {
    margin-top: 12px;
  }

  .space-y-2 > * + * {
    margin-top: 8px;
  }
}

/* Mobile modal improvements */
@media (max-width: 768px) {
  #dailyModal .fixed,
  #editModal .fixed {
    margin: 16px;
    max-height: calc(100vh - 32px);
    width: calc(100% - 32px);
  }

  /* Better mobile form inputs */
  input[type="text"],
  input[type="number"],
  input[type="time"],
  input[type="date"] {
    -webkit-appearance: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Mobile-friendly time inputs */
  input[type="time"],
  input[type="date"] {
    min-height: 44px;
  }
}

/* Mobile sidebar improvements */
@media (max-width: 1024px) {
  #sidebar {
    border-top: 1px solid hsl(217.2 32.6% 17.5%);
    border-left: none;
  }
}

/* Mobile task status improvements */
@media (max-width: 768px) {
  .task-status {
    width: 8px;
    height: 8px;
  }

  .task-status-text {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* Mobile loading states */
@media (max-width: 768px) {
  #loadingIndicator {
    padding: 32px 16px;
  }
}

/* Mobile empty state improvements */
@media (max-width: 768px) {
  #emptyState {
    padding: 48px 16px;
  }

  #emptyState .text-6xl {
    font-size: 4rem;
  }
}

/* Mobile gauge improvements */
@media (max-width: 768px) {
  #taskGauge {
    margin: 16px 0;
    padding: 16px;
  }

  #taskGauge .relative {
    width: 80px;
    height: 80px;
  }

  #taskGauge svg {
    width: 80px;
    height: 80px;
  }
}

/* Mobile header improvements */
@media (max-width: 768px) {
  header {
    padding: 12px 16px;
  }

  #headerControls {
    transition: all 0.3s ease;
  }

  #headerControls.hidden {
    display: none;
  }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
  #dateNavigation {
    flex-wrap: wrap;
    gap: 8px;
  }

  #dateNavigation .flex-col {
    min-width: 100px;
  }
}

/* Mobile meeting improvements */
@media (max-width: 768px) {
  #timeline .bg-muted {
    padding: 12px;
    margin-bottom: 8px;
  }
}

/* Mobile form improvements */
@media (max-width: 768px) {
  .step {
    padding: 0 8px;
  }

  .step input[type="text"] {
    margin-bottom: 12px;
  }

  .step .flex {
    flex-direction: column;
    gap: 8px;
  }

  .step .flex > * {
    width: 100%;
  }
}

/* Mobile accessibility improvements */
@media (max-width: 768px) {
  /* Better focus indicators for touch devices */
  button:focus-visible,
  input:focus-visible {
    outline: 2px solid hsl(212.7 26.8% 83.9%);
    outline-offset: 2px;
  }

  /* Prevent text selection on interactive elements */
  .task-cell,
  .mobile-task-card,
  button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  /* Reduce animations on mobile for better performance */
  .transition-transform {
    transition: transform 0.2s ease;
  }

  .hover\:scale-105:hover {
    transform: scale(1.02);
  }
}

/* Mobile dark mode improvements */
@media (max-width: 768px) {
  /* Better contrast for mobile screens */
  .text-muted-foreground {
    opacity: 0.8;
  }

  .bg-muted {
    background-color: hsl(217.2 32.6% 17.5%);
  }
}
