/* ========== Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #13251c75;
  background-image: linear-gradient(rgba(0, 0, 0, 0.237), rgba(0, 0, 0, 0.774)), url('forest-fire-432870_1280.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed; /* applied for all, no need for extra media query */
  min-height: 100vh;
  padding: 2rem;
}

/* ========== Header ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #13251c;
  padding: 1rem 2rem;
  border-bottom: 2px solid #1f3a2c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #e9f4ee;
  letter-spacing: 1px;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  font-weight: 600;
  color: #cfe6da;
  transition: color 0.25s ease, transform 0.2s ease;
  position: relative;
}

nav a:hover {
  color: #9fe0b8;
  transform: translateY(-2px);
}

nav a::after {
  content: "";
  display: block;
  height: 2px;
  width: 0%;
  background: #9fe0b8;
  transition: width 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}

nav a:hover::after {
  width: 100%;
}

/* ========== Headings ========== */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #e9f4ee;
  text-align: center;
}

/* ========== Layout Grid ========== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ========== Card Styles ========== */
.card {
  background: rgba(19, 37, 28, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(207, 230, 218, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.6);
}

.card h2 {
  color: #e9f4ee;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid #2f6f4e;
  padding-bottom: 0.5rem;
}

.card h3 {
  color: #e9f4ee;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  border-bottom: 0.5px solid #2f6f4e;
  padding-bottom: 0.5rem;
}

/* ========== Form Styles ========== */
form#job-form {
  width: 100%;
}

form#job-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  color: #cfe6da;
}

form#job-form input,
form#job-form select {
  margin-top: 0.3rem;
  padding: 0.5rem 0.8rem;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #1f3a2c;
  background-color: #0f1a14;
  color: #519572;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

form#job-form input:focus {
  border-color: #2f6f4e;
  outline: none;
}

form#job-form button[type="submit"] {
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 10px;
  background-color: #2f6f4e;
  color: #e9f4ee;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  width: 100%;
}

form#job-form button[type="submit"]:hover {
  background-color: #3e8b63;
  transform: translateY(-2px);
}

/* ===== Location inputs (stacked) ===== */
.location-group {
  margin-bottom: 1rem;
}

.location-input {
  width: 100%;
  margin-bottom: 0.5rem;
}

.location-input input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #1f3a2c;
  background-color: #0f1a14;
  color: #e6eae6;
}

#get-location {
  background: #2f6f4e;
  color: white;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  width: auto;
  margin-top: 0.25rem;
}

#get-location:hover {
  background: #3e8b63;
}

/* ===== Add parameter buttons ===== */
.add-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.param-btn {
  background: #1f3a2c;
  color: #cfe6da;
  border: 1px solid #2f6f4e;
  padding: 0.5rem 1.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.3;
  display: inline-block;
  width: auto;
}

.param-btn:hover:not(:disabled) {
  background: #2f6f4e;
  color: white;
}

.param-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Hidden sliders (shown when added) ===== */
.slider-container {
  margin-bottom: 15px;
}

.slider-container label {
  display: block;
  margin-bottom: 5px;
}

.slider-value {
  font-weight: bold;
  margin-left: 10px;
}

.slider-container.hidden {
  display: none;
}

/* ===== Disabled placeholder widgets ===== */
.placeholder-widget {
  background: #2a2a2a;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  opacity: 0.6;
  filter: grayscale(0.8);
  pointer-events: none;
  border: 1px dashed #666;
}

.placeholder-widget h3 {
  color: #aaa;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.placeholder-widget h3::after {
  content: "🔒";
  font-size: 1rem;
  opacity: 0.7;
}

.placeholder-option {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
  color: #888;
  display: flex;
  justify-content: space-between;
}

/* ===== Job Status & Results ===== */
#status-container {
  width: 100%;
}

#job-status {
  background: #0f1a14;
  border: 1px solid #1f3a2c;
  padding: 1rem;
  border-radius: 12px;
  color: #cfe6da;
  min-height: 4rem;
  font-family: monospace;
  overflow-x: auto;
}

#job-results,
#job-display-container {
  width: 100%;
}

#job-results img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#job-results a {
  color: #9fe0b8;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

#job-results a:hover {
  text-decoration: underline;
}

#job-display-container select {
  background: #0f1a14;
  color: #e6eae6;
  border: 1px solid #1f3a2c;
  border-radius: 6px;
  padding: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
}

#file-preview {
  margin-top: 1.5rem;
  background: #0f1a14;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #1f3a2c;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body {
    padding: 1rem;
  }

  form#job-form button[type="submit"] {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
  }
}

#geo-modal {
  font-family: 'Inter', sans-serif;
}
#geo-modal h3 {
  margin-top: 0;
  color: #cfe6da;
}
#close-modal:hover {
  color: #9fe0b8;
}

.job-results-select {
    padding: 8px;
    margin-bottom: 15px;
    width: 300px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white;
    font-size: 14px;
}

.geo-btn {
    margin: 5px;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}
.shapefile-btn {
    background-color: #2f6f4e;
    color: white;
}
.shapefile-btn:hover {
    background-color: #1e4f3a;
}

#run-dropdown, #file-dropdown, #filter-dropdown {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: rgb(0, 0, 0);
    font-size: 14px;
    width: 250px;
    margin-right: 10px;
}