/* Common base styles */
body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 0;
  color: #333;
}

header {
  background: #4CAF50;
  color: white;
  padding: 1rem;
  text-align: center;
}

main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

h2 {
  color: #4CAF50;
}

.calc-section {
  flex: 0 0 340px;
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Links in header navigation */
a.nav {
  color: #fff;
  text-decoration: underline;
}

/* Results and sections */
.result {
  margin-top: 0.5rem;
  font-weight: bold;
}

section {
  margin-top: 2rem;
}

/* Buttons (used on both pages) */
button {
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  background: #4CAF50;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background: #45a049;
}

/* Input widths are page-specific to preserve previous layouts */
body.home input[type="number"] {
  padding: 0.5rem;
  margin: 0.3rem;
  width: 120px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

body.tips input[type="number"] {
  padding: 0.5rem;
  margin: 0.3rem;
  width: 160px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Tip page specific elements */
label {
  display: inline-block;
  width: 140px;
  margin: 0.3rem 0.3rem 0.3rem 0;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.note {
  color: #666;
  font-size: 0.9rem;
}

.quick-tips {
  margin: 0.3rem 0.3rem 0.3rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-tips button {
  padding: 0.4rem 0.6rem;
  background: #4CAF50;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}

.quick-tips button:hover {
  background: #45a049;
}

/* Language switcher footer */
footer.language-switcher {
  text-align: center;
  margin: 2rem auto 0;
  padding: 1rem 0 2rem;
}

footer.language-switcher nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

footer.language-switcher a {
  color: #4CAF50;
  font-weight: bold;
  text-decoration: none;
}

footer.language-switcher a:hover,
footer.language-switcher a:focus {
  text-decoration: underline;
}

footer.language-switcher a[aria-current="page"] {
  text-decoration: underline;
}
