/* Mobile Stylesheet for Nice Cooker Shipment */

/* General mobile styles */
body {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

/* Header adjustments for mobile */
header h1 {
  font-size: 1.5em;
  text-align: center;
  margin: 10px 0;
}

/* Navigation adjustments */
nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

nav li {
  width: 100%;
  margin-bottom: 5px;
}

nav a {
  display: block;
  padding: 10px;
  background-color: #007bff;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: #0056b3;
}

/* Main content adjustments */
main {
  padding: 10px 0;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

section {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

h2 {
  font-size: 1.3em;
  margin-top: 0;
  word-wrap: break-word; /* Prevent long words from causing overflow */
}

/* Form adjustments */
form {
  display: flex;
  flex-direction: column;
}

form label {
  margin-bottom: 5px;
  font-weight: bold;
}

form input, form select, form textarea {
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

form button {
  padding: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
}

form button:hover {
  background-color: #218838;
}

/* Table adjustments */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
  overflow-x: auto;
  display: block; /* Allows horizontal scrolling */
  max-width: 100%;
}

th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

th {
  background-color: #e9ecef;
  font-weight: bold;
}

tr:hover {
  background-color: #f8f9fa;
}

/* Chart container adjustments */
.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Special handling for double-width charts on mobile */
.chart-container-double {
  height: 350px;
}

/* Pie chart container adjustments */
.pie-chart-container {
  height: 300px;
}

/* Report container adjustments */
.report-container {
  height: auto;
  min-height: 300px;
}

/* Footer adjustments */
footer {
  text-align: center;
  padding: 15px;
  background-color: #343a40;
  color: white;
  font-size: 0.9em;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive utilities */
@media (max-width: 480px) {
  .container {
    padding: 5px;
  }

  header h1 {
    font-size: 1.3em;
  }

  section {
    padding: 10px;
  }

  h2 {
    font-size: 1.2em;
  }

  .chart-container {
    height: 250px;
  }
  
  .chart-container-double {
    height: 300px;
  }
  
  .pie-chart-container {
    height: 250px;
  }
}