/* :root {
  --primary-color: #b6664b;
  --primary-dark: #8b4d39;
  --primary-light: #d27b5d;
  --primary-lighter: #e8a08d;
  --secondary-color: #c88b76;
  --background: #fdf8f6;
  --card-bg: #ffffff;
  --text-primary: #4b2c23;
  --text-secondary: #735347;
  --border-color: #e8d3cc;
  --success-color: #8b4d39;
} */

:root {
  /* Primary color - Deep teal #003C43 and its variations */
  --primary-color: #003c43;
  --primary-dark: #002a2f; /* Darker shade */
  --primary-light: #004e57; /* Lighter shade */
  --primary-lighter: #00616b; /* Even lighter shade */

  /* Secondary color - Medium teal #135D66 */
  --secondary-color: #135d66;

  /* Background colors */
  --background: #f5f8f8; /* Very light teal-tinted white */
  --card-bg: #ffffff;

  /* Text colors */
  --text-primary: #002428; /* Very dark teal, almost black */
  --text-secondary: #264d52; /* Muted teal for secondary text */

  /* Border and accent colors */
  --border-color: #77b0aa; /* Light teal */
  --success-color: #135d66; /* Using the medium teal for success states */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

body {
  background-color: var(--background);
  min-height: 100vh;
  color: var(--text-primary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.calculator-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.calculator-tabs::-webkit-scrollbar {
  display: none;
}

.tab-button {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-button:hover {
  background: var(--background);
  color: var(--primary-color);
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.calculator-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.calculator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.1);
}

.calculator-card h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calculator-card h2 i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.925rem;
}

input,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  color: var(--text-primary);
  background: var(--background);
  -webkit-appearance: none;
  appearance: none;
}

/* Custom dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B6664B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(182, 102, 75, 0.1);
}

button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--primary-color)
  );
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.result {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  text-align: center;
  display: none;
  border: 1px solid var(--border-color);
}

.result.show {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.result span {
  color: var(--success-color);
  font-weight: 600;
  font-size: 1.1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calculator-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.calculator-section.active {
  display: block;
}

@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
  }

  .header {
    border-radius: 0.5rem;
    padding: 1.5rem 1rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .calculator-tabs {
    padding: 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 0;
  }

  /* Improved mobile dropdown styling */
  select {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    background-position: right 1rem center;
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Add Toast Notification Styles  */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem;
  border-radius: 0.5rem;
  color: white;
  max-width: 300px;
  z-index: 1000;
  animation: slideIn 0.3s ease-in-out;
}

.toast.success {
  background-color: var(--success-color);
}
.toast.error {
  background-color: #dc3545;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Accessibility Improvements */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Focus Styles */
:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Installation Prompt styles */

./* Installation Prompt Styles */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 9999; /* Ensure it's above other elements */
  width: 90%;
  max-width: 400px;
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
}

.install-prompt.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 100%);
  pointer-events: none;
}

.install-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.install-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.install-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.install-prompt p {
  margin: 0;
  color: #666;
  line-height: 1.4;
}

.install-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.install-btn {
  background: #B6664B;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.install-btn:hover {
  background: #a55a41;
}

.dismiss-btn {
  background: transparent;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  transition: background 0.2s;
}

.dismiss-btn:hover {
  background: #f5f5f5;
}

@media (max-width: 480px) {
  .install-prompt {
    width: 95%;
    bottom: 10px;
  }
  
  .install-buttons {
    flex-direction: column;
  }
  
  .install-btn, .dismiss-btn {
    width: 100%;
  }
}s