/* Government Planning Plugin Styles */

/* Year State Badges */
.year-state-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: bold;
}

.state-drafting { background: #e0e0e0; color: #666; }
.state-submission_open { background: #4CAF50; color: white; }
.state-submission_closed { background: #FF9800; color: white; }
.state-under_review { background: #2196F3; color: white; }
.state-med_approved { background: #9C27B0; color: white; }
.state-cabinet_review { background: #673AB7; color: white; }
.state-parliament_review { background: #3F51B5; color: white; }
.state-approved { background: #009688; color: white; }
.state-archived { background: #607D8B; color: white; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 500;
}

.status-draft { background: #e0e0e0; color: #666; }
.status-ready { background: #2196F3; color: white; }
.status-submitted { background: #FF9800; color: white; }
.status-under_review { background: #9C27B0; color: white; }
.status-approved { background: #4CAF50; color: white; }
.status-rejected { background: #f44336; color: white; }
.status-removed { background: #9e9e9e; color: white; }
.status-active { background: #4CAF50; color: white; }
.status-inactive { background: #9e9e9e; color: white; }

/* Planning Dashboard */
.gov-planning-dashboard { margin-bottom: 20px; }
.gov-planning-stats { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
.stat-card { flex: 1; min-width: 120px; max-width: 180px; padding: 15px; background: #f5f5f5; border-radius: 8px; text-align: center; border: 1px solid #e0e0e0; }
.stat-card .stat-value { font-size: 2em; font-weight: bold; color: #333; }
.stat-card .stat-label { font-size: 0.85em; color: #666; margin-top: 5px; }
.stat-card.draft .stat-value { color: #666; }
.stat-card.ready .stat-value { color: #2196F3; }
.stat-card.submitted .stat-value { color: #FF9800; }
.stat-card.approved .stat-value { color: #4CAF50; }
.stat-card.rejected .stat-value { color: #f44336; }

/* Year Tabs */
.gov-planning-year-tabs { display: flex; gap: 5px; margin-bottom: 20px; border-bottom: 2px solid #e0e0e0; }
.gov-planning-year-tabs a { display: inline-block; padding: 10px 20px; text-decoration: none; color: #666; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; margin-bottom: -2px; background: #f5f5f5; }
.gov-planning-year-tabs a:hover { background: #e8e8e8; color: #333; }
.gov-planning-year-tabs a.selected { background: white; color: #333; border-color: #e0e0e0; font-weight: bold; }

/* Planning Item List */
.planning-items-list { border: 1px solid #e0e0e0; border-radius: 4px; overflow: hidden; }
.planning-items-list table { width: 100%; border-collapse: collapse; }
.planning-items-list th { background: #f5f5f5; padding: 10px; text-align: left; border-bottom: 1px solid #e0e0e0; font-weight: 600; }
.planning-items-list td { padding: 10px; border-bottom: 1px solid #eee; }
.planning-items-list tr:hover { background: #f9f9f9; }
.planning-items-list tr:last-child td { border-bottom: none; }

/* Gov Planning Panels */
#gov-planning-panel, #gov-planning-outcome-panel, #gov-planning-indicator-panel { margin-top: 15px; background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px; padding: 15px; }
#gov-planning-panel h3, #gov-planning-outcome-panel h3, #gov-planning-indicator-panel h3 { margin-top: 0; color: #333; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; }
#gov-planning-panel h4, #gov-planning-outcome-panel h4, #gov-planning-indicator-panel h4 { margin-top: 15px; margin-bottom: 10px; color: #555; }

/* Budget Table */
.budget-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.budget-table th, .budget-table td { padding: 8px; border: 1px solid #e0e0e0; }
.budget-table th { background: #f5f5f5; text-align: left; }
.budget-table td.amount { text-align: right; font-family: monospace; }
.budget-table tfoot td { font-weight: bold; background: #f0f0f0; }

/* Warning/Error Alerts */
.gov-planning-warning { padding: 10px 15px; margin: 10px 0; border-radius: 4px; border-left: 4px solid; }
.gov-planning-warning.error { background: #ffebee; border-color: #f44336; color: #c62828; }
.gov-planning-warning.warning { background: #fff3e0; border-color: #FF9800; color: #e65100; }
.gov-planning-warning.info { background: #e3f2fd; border-color: #2196F3; color: #1565c0; }

/* Fix overlap in gov-planning-panel flash warnings (Redmine icon + text) */
#gov-planning-panel .flash,
#gov-planning-panel .flash.warning,
#gov-planning-panel .flash.error {
  padding: 8px 10px 8px 30px;  /* Left padding for icon */
  margin-bottom: 8px;
  font-size: 0.9em;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
#gov-planning-panel .flash strong {
  display: inline;
  margin-right: 4px;
}
/* Responsive: stack warning code above message on small screens */
@media screen and (max-width: 600px) {
  #gov-planning-panel .flash {
    padding: 10px 10px 10px 28px;
  }
  #gov-planning-panel .flash strong {
    display: block;
    margin-bottom: 4px;
  }
}

/* Similar Items */
.similar-items-list { list-style: none; padding: 0; margin: 0; }
.similar-items-list li { padding: 8px 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.similar-items-list li:last-child { border-bottom: none; }
.similarity-score { font-size: 0.85em; padding: 2px 6px; border-radius: 3px; }
.similarity-score.high { background: #ffebee; color: #c62828; }
.similarity-score.medium { background: #fff3e0; color: #e65100; }
.similarity-score.low { background: #e8f5e9; color: #2e7d32; }

/* Import Preview */
.import-preview-table { width: 100%; border-collapse: collapse; }
.import-preview-table th, .import-preview-table td { padding: 8px; border: 1px solid #e0e0e0; text-align: left; }
.import-preview-table th { background: #f5f5f5; }
.import-preview-table tr.error { background: #ffebee; }
.import-preview-table tr.warning { background: #fff3e0; }

/* Inactive rows */
tr.inactive { opacity: 0.6; }
tr.inactive td { color: #999; }

/* Icon for menu */
.icon-gov-planning { background-image: url(../images/gov_planning.png); }
