/* Scoped styles for river-and-lake-water-level-checker (prefix: rlwl-) */

.rlwl-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
}

.rlwl-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rlwl-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
}

.rlwl-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
}

.rlwl-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.rlwl-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.rlwl-tab-btn.rlwl-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.rlwl-search-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rlwl-input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rlwl-input {
  flex: 1 1 260px;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
  color: #0f172a;
}

.rlwl-select {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.rlwl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.rlwl-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.rlwl-btn-primary:hover {
  background: #1d4ed8;
}

.rlwl-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.rlwl-btn-secondary:hover {
  background: #e2e8f0;
}

.rlwl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.rlwl-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rlwl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rlwl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.rlwl-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rlwl-stage-normal { background: #dcfce7; color: #15803d; }
.rlwl-stage-action { background: #fef3c7; color: #b45309; }
.rlwl-stage-flood { background: #fee2e2; color: #b91c1c; }

.rlwl-card-title {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}

.rlwl-card-location {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.rlwl-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.rlwl-metric-item {
  display: flex;
  flex-direction: column;
}

.rlwl-metric-lbl {
  color: #64748b;
  font-size: 0.75rem;
}

.rlwl-metric-val {
  font-weight: 700;
  color: #1e293b;
  font-size: 1rem;
}

.rlwl-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.rlwl-link {
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.rlwl-link:hover {
  text-decoration: underline;
}

.rlwl-calc-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rlwl-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.rlwl-calc-result-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rlwl-ad-slot {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.rlwl-hidden {
  display: none !important;
}

.rlwl-copied {
  color: #10b981 !important;
}

@media (max-width: 768px) {
  .rlwl-grid {
    grid-template-columns: 1fr;
  }
  .rlwl-input-row {
    flex-direction: column;
  }
}
