.calculator-container {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background-color: var(--bg-color, #fff);
  transition: box-shadow 0.3s ease;
}

.calculator-container:hover {
  box-shadow: 0 0 12px rgba(129, 129, 129, 0.13);
}

.calculator-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  align-items: center;
}

.calculator-container:hover .calculator-overlay {
  opacity: 1;
  pointer-events: auto;
}

.branding-button {
  font-size: 12px;
  text-decoration: none;
  background: #e7e7e7;
  color:  #6e6e6e;
  padding: 4px 8px;
  border-radius: 4px;
}

.updated-date {
  font-size: 12px;
  color: #666;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

/* Embedded FORM Styling */
.calculator-form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  font-family: system-ui, sans-serif;
  padding-top: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 3fr 2fr 1fr;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.form-row.no-unit input {
  grid-column: span 2;
}

label {
  font-weight: 500;
  color: #333;
  text-align: right;
}

input,
select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border 0.2s ease;
}

input:focus,
select:focus {
  border-color: #5a5a5a;
  outline: none;
}

.unit {
  font-size: 0.9rem;
  color: #555;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.8rem;
}

button[type="button"] {
  background-color: #e7e7e7;
  color: #6e6e6e;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #5a5a5a;
  color: #ffffff;
}

.result {
  align-items: center;
}

.result-card {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  font-family: system-ui, sans-serif;
  padding-top: 0.5rem;
}

.result-card p {
  font-weight: normal;
  color: #333;
  margin-left: 1.0rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header button {
  background-color: #e7e7e7;
  color: #6e6e6e;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.result-header button:hover {
  background-color: #5a5a5a;
  color: #ffffff;
}

.result-header h3 {
  font-family: system-ui, sans-serif;
  font-size: 1.8rem;
  color: #555;
}