/* === Rechner Widget === */

#rechner-widget {
  font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: #706F6F;
  line-height: 1.5;
  border: 2px solid #4E868C;
  border-radius: 0;
  padding: 40px;
}

/* Grid layout for fields */
.rw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Field group */
.rw-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Labels */
.rw-label {
  font-size: 16px;
  font-weight: 500;
  color: #706F6F;
}

/* Inputs and selects */
.rw-input {
  padding: 0.55rem 0.75rem;
  border: 1px solid #4E868C;
  border-radius: 0;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: #333;
  transition: border-color 0.15s ease;
}

.rw-input:focus {
  outline: none;
  border-color: #4E868C;
  box-shadow: 0 0 0 2px rgba(78, 134, 140, 0.15);
}

.rw-input-error {
  border-color: #dc2626;
}

.rw-input-error:focus {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* Select styling */
select.rw-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%234a4a4a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Button wrapper */
.rw-btn-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

/* Button */
.rw-btn {
  width: auto;
  padding: 1rem 2.5rem;
  background: #4E868C;
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rw-btn:hover {
  background: #3d6b70;
}

.rw-btn:disabled {
  background: #8cb8bc;
  cursor: not-allowed;
}

/* Error box */
.rw-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0;
  color: #dc2626;
  font-size: 0.875rem;
}

/* Results */
.rw-results {
  margin-top: 1.5rem;
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1.25rem;
  text-align: center;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder text in results box */
.rw-results-placeholder {
  color: #706F6F;
  font-style: italic;
  font-size: 16px;
  margin: 0;
}

/* Warnings */
.rw-warnings {
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0;
  color: #92400e;
  font-size: 16px;
  margin-bottom: 1rem;
  text-align: left;
}

.rw-warning-list {
  margin: 0.3rem 0 0 0;
  padding: 0 0 0 1.25rem;
}

.rw-warning-list li {
  margin-bottom: 0.25rem;
}

/* Goal sections */
.rw-goal {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  text-align: left;
}

.rw-goal-title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #4E868C;
}

/* Result grid */
.rw-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.rw-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rw-result-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #706F6F;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rw-result-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
}

/* Filter model recommendation */
.rw-recommendation {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #edf6f7;
  border: 1px solid #4E868C;
  border-radius: 0;
  text-align: left;
}

.rw-recommendation-title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #4E868C;
}

/* Disclaimer */
.rw-disclaimer {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 0.8125rem;
  color: #9ca3af;
  line-height: 1.5;
  text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
  #rechner-widget {
    padding: 24px 16px;
  }

  .rw-grid {
    grid-template-columns: 1fr;
  }

  .rw-result-grid {
    grid-template-columns: 1fr 1fr;
  }
}
