/* style.css */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: #f5f5f5;
}
header {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  color: white;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
header h1 {
  margin: 0;
  font-size: 2.5rem;
}
section {
  padding: 1rem;
}
#input-section {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.form-group {
  margin-bottom: 20px;
}
form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}
form input, form select {
  width: 100%;
  padding: 12px;
  margin-top: 0.25rem;
  box-sizing: border-box;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}
form input:focus, form select:focus {
  outline: none;
  border-color: #4caf50;
}
form input::placeholder {
  color: #999;
  font-style: italic;
}
/* Range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(to right, #ffeb3b 0%, #ffc107 25%, #ff9800 50%, #66bb6a 75%, #4caf50 100%);
  border-radius: 5px;
  outline: none;
  padding: 0;
  border: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: white;
  border: 3px solid #4caf50;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: white;
  border: 3px solid #4caf50;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}
form button {
  margin-top: 1.5rem;
  padding: 14px 2rem;
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  border-radius: 5px;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
form button:active {
  transform: translateY(0);
}
/* Tooltip styles */
.tooltip {
  cursor: help;
  display: inline-block;
  margin-left: 5px;
  font-size: 14px;
  color: #2196f3;
  background: #e3f2fd;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  text-align: center;
  line-height: 18px;
  font-weight: bold;
  transition: background-color 0.2s;
}
.tooltip:hover {
  background: #2196f3;
  color: white;
}
#plan-section {
  max-width: 1400px;
  margin: 20px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#plan-section h2 {
  color: #2e7d32;
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 3px solid #4caf50;
}
#plan-details {
  margin-top: 1rem;
}
#plan-details h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2e7d32;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 0.5rem;
  font-size: 1.4rem;
}
#plan-details table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
#plan-details th, #plan-details td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: left;
}
#plan-details th {
  background: #f2f2f2;
  font-weight: bold;
}
#garden-plot {
  margin: 1rem 0;
}
#gantt-chart {
  margin: 1rem 0;
}
#gantt-chart table {
  border-collapse: collapse;
}
#gantt-chart th {
  background: #4caf50;
  color: white;
  padding: 8px;
  text-align: center;
}
#gantt-chart td {
  text-align: center;
  min-width: 40px;
}
#download-pdf {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #2196f3;
  color: white;
  border: none;
  cursor: pointer;
}
#download-pdf:hover {
  background: #1e88e5;
}

/* Schedule Table Styles */
.schedule-table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-table th {
  background: #4caf50;
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #388e3c;
}

.schedule-table td {
  padding: 10px 8px;
  border: 1px solid #ddd;
  vertical-align: top;
}

.schedule-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.schedule-table tr:hover {
  background-color: #e8f5e9;
}

.location-badge {
  display: inline-block;
  padding: 4px 10px;
  color: white;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}

.location-greenhouse {
  background: #ff9800;
}

.location-outdoor {
  background: #4caf50;
}

.succession-item {
  margin-bottom: 8px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  border-left: 3px solid #2196f3;
}

.succession-item:last-child {
  margin-bottom: 0;
}

.succession-label {
  font-weight: 600;
  color: #2196f3;
  margin-bottom: 4px;
}

.date-range {
  font-size: 0.9em;
  color: #555;
  line-height: 1.5;
}

.plant-name {
  font-weight: 600;
  color: #333;
  font-size: 1.05em;
}

.plant-count {
  color: #666;
  font-size: 1em;
  font-weight: 600;
}

.note-tip {
  background: #fff3cd;
  padding: 12px;
  border-radius: 5px;
  border-left: 4px solid #ffc107;
  margin-bottom: 15px;
}

/* Print styles */
@media print {
  .note-tip {
    display: none;
  }

  #gantt-chart {
    display: none;
  }

  .schedule-table {
    font-size: 10pt;
    page-break-inside: auto;
  }

  .schedule-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .schedule-table thead {
    display: table-header-group;
  }

  .location-badge {
    border: 1px solid #333;
  }

  .succession-item {
    border: 1px solid #ccc;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .schedule-table {
    font-size: 0.9em;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 8px 4px;
  }
}

/* Very small screens - stack into cards */
@media (max-width: 600px) {
  .schedule-table thead {
    display: none;
  }

  .schedule-table,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table tr {
    margin-bottom: 20px;
    border: 2px solid #4caf50;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .schedule-table td {
    text-align: left;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
  }

  .schedule-table td:before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #2e7d32;
    font-size: 0.85em;
    text-transform: uppercase;
  }

  .schedule-table td:last-child {
    border-bottom: none;
  }

  .location-badge {
    display: inline-block;
    margin-top: 4px;
  }
}
