/* Add pointer to header cells so users know they're clickable */
#ntx-plants-table th {
  cursor: pointer;
}

/* Optional: visible focus style for keyboard users */
#ntx-plants-table th:focus {
  outline: 3px solid rgba(21,156,228,0.35);
  outline-offset: 2px;
}

/* Keep existing modal/table styles below (do not remove) */
/* ...existing css... */
/* Modal overlay and details styling for NTX Plants plugin */

/* Modal overlay: full-screen fixed overlay */
#ntx-modal {
  display: none; /* hidden by default; JS toggles .open */
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  z-index: 99999; /* very high to float above theme elements */
  background: rgba(0,0,0,0.55); /* backdrop */
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

/* When modal is open, show as flex container to center content */
#ntx-modal.open {
  display: flex;
}

/* Modal content box */
#ntx-modal .ntx-modal-content {
  background: #fff;
  color: #222;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 1rem 1.1rem;
  position: relative;
  outline: none;
}

/* Close button */
#ntx-modal .ntx-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #444;
}

/* Prevent background scroll while modal open */
body.ntx-modal-open {
  overflow: hidden;
  touch-action: none;
}

/* Title and alias styles */
.ntx-plant-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.ntx-aliases {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: #333;
}

.ntx-aliases ul {
  margin: 0.25rem 0 0.75rem 1.2rem;
  padding: 0;
  list-style-type: disc;
}

.ntx-aliases li {
  margin: 0.15rem 0;
  line-height: 1.25rem;
}

/* details table */
.ntx-plant-defaults .ntx-details {
  border-collapse: collapse;
  width: 100%;
  margin-top: 0.5rem;
}
.ntx-plant-defaults .ntx-details th {
  text-align: left;
  padding-right: 0.75rem;
  vertical-align: top;
  font-weight: 600;
  white-space: nowrap;
  width: 40%;
  min-width: 160px;
}
.ntx-plant-defaults .ntx-details td {
  padding: 0 0 0.35rem 0;
  color: #222;
}

/* Small screens adjustment */
@media (max-width: 600px) {
  #ntx-modal .ntx-modal-content {
    max-width: 100%;
    padding: 0.8rem;
    max-height: 92vh;
  }
  .ntx-plant-defaults .ntx-details th {
    display: block;
    width: 100%;
    white-space: normal;
    padding-bottom: 0.25rem;
  }
  .ntx-plant-defaults .ntx-details td {
    display: block;
    padding-bottom: 0.6rem;
  }
}

/* ========================================
   Planting Calendar Styles
   ======================================== */

#ntx-planting-calendar-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

#ntx-planting-calendar-wrap h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: #333;
}

.ntx-calendar-instructions {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Selection controls */
.ntx-select-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

#ntx-selected-count {
  margin-left: auto;
  font-weight: 600;
  color: #2a7221;
}

/* Button styles */
.ntx-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.ntx-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ntx-btn-primary {
  background-color: #2a7221;
  color: #fff;
}

.ntx-btn-primary:hover:not(:disabled) {
  background-color: #1e5518;
}

.ntx-btn-secondary {
  background-color: #e9e9e9;
  color: #333;
}

.ntx-btn-secondary:hover:not(:disabled) {
  background-color: #d0d0d0;
}

/* Plant list - compact version with multi-column layout */
.ntx-plant-list-compact {
  display: grid;
  /* More compact: smaller min-width allows more columns on wider screens */
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.25rem;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  background: #fafafa;
}

.ntx-plant-checkbox-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  font-size: 0.85rem;
}

.ntx-plant-checkbox-compact:hover {
  background-color: #f0f8f0;
  border-color: #c0dbc0;
}

.ntx-plant-checkbox-compact input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.ntx-plant-checkbox-compact input[type="checkbox"]:checked + .ntx-plant-name {
  color: #2a7221;
  font-weight: 600;
}

.ntx-plant-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Limit control */
.ntx-limit-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.ntx-limit-control select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Original plant list (kept for backwards compatibility) */
.ntx-plant-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem;
  background: #fafafa;
}

.ntx-plant-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.ntx-plant-checkbox:hover {
  background-color: #f0f8f0;
  border-color: #c0dbc0;
}

.ntx-plant-checkbox input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ntx-plant-checkbox input[type="checkbox"]:checked + .ntx-plant-label {
  color: #2a7221;
}

.ntx-plant-label {
  flex: 1;
  line-height: 1.3;
}

.ntx-plant-label strong {
  display: block;
  font-weight: 600;
}

.ntx-plant-label em {
  font-size: 0.85rem;
  color: #666;
}

/* Calendar actions */
.ntx-calendar-actions {
  margin-top: 1.5rem;
  text-align: center;
}

#ntx-create-calendar {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Calendar result container */
.ntx-calendar-result {
  margin-top: 2rem;
}

.ntx-calendar-empty {
  text-align: center;
  padding: 2rem;
  background: #fff8e6;
  border: 1px solid #f0d58c;
  border-radius: 6px;
  color: #856404;
}

.ntx-calendar-empty p {
  margin: 0.5rem 0;
}

/* Generated calendar */
.ntx-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.ntx-calendar-generated h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #333;
}

/* View toggle buttons */
.ntx-view-toggle {
  display: flex;
  gap: 0.25rem;
}

.ntx-view-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.ntx-view-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.ntx-view-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.ntx-view-btn.active {
  background: #2a7221;
  color: #fff;
  border-color: #2a7221;
}

.ntx-view-btn:hover:not(.active) {
  background: #f5f5f5;
}

/* Color legend */
.ntx-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 4px;
}

.ntx-legend-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #666;
}

.ntx-legend-item {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 500;
}

.ntx-calendar-summary {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.ntx-calendar-weeks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ntx-calendar-week {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.ntx-week-header {
  margin: 0;
  padding: 0.75rem 1rem;
  background: #2a7221;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.ntx-week-date {
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.9;
}

.ntx-week-actions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ntx-action-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.ntx-action-item:last-child {
  border-bottom: none;
}

/* Plant name - larger and prominent */
.ntx-action-plant {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.35rem;
}

/* Action name - smaller than plant name, color-coded */
.ntx-action-name {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}

.ntx-action-desc {
  margin: 0.4rem 0 0 0;
  color: #666;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Error styling */
.ntx-error {
  background: #ffe6e6;
  border: 1px solid #f5c6c6;
  color: #c00;
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
}

/* ========================================
   MONTHLY CALENDAR VIEW (Google Calendar style)
   ======================================== */

.ntx-monthly-view {
  margin-top: 1rem;
}

.ntx-month-calendar {
  margin-bottom: 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.ntx-month-header {
  margin: 0;
  padding: 0.75rem 1rem;
  background: #2a7221;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.ntx-month-grid {
  display: flex;
  flex-direction: column;
}

.ntx-month-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.ntx-month-cell {
  min-height: 80px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 0.25rem;
  background: #fff;
  position: relative;
}

.ntx-month-cell:last-child {
  border-right: none;
}

.ntx-month-row:last-child .ntx-month-cell {
  border-bottom: none;
}

.ntx-day-header {
  min-height: auto;
  padding: 0.5rem;
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  color: #666;
}

.ntx-day-empty {
  background: #fafafa;
}

.ntx-day-number {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.25rem;
}

.ntx-day-has-actions {
  background: #f8fff8;
}

.ntx-day-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 60px;
  overflow-y: auto;
}

.ntx-day-action {
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.ntx-day-action-plant {
  font-weight: 500;
}

/* Responsive adjustments for calendar */
@media (max-width: 600px) {
  #ntx-planting-calendar-wrap {
    padding: 0.5rem;
  }

  .ntx-select-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #ntx-selected-count {
    margin-left: 0;
    text-align: center;
  }

  .ntx-plant-list,
  .ntx-plant-list-compact {
    grid-template-columns: repeat(2, 1fr);
    max-height: 250px;
  }

  .ntx-calendar-week {
    margin: 0 -0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .ntx-calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ntx-month-cell {
    min-height: 50px;
    padding: 0.15rem;
  }

  .ntx-day-number {
    font-size: 0.7rem;
  }

  .ntx-day-action {
    font-size: 0.55rem;
  }
}