* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.hidden {
  display: none;
}

html {
  overflow-y: scroll;
}

/* Header styles */
.header {
    background-color: #003049;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  gap: 0.25rem;
}

.logo-icon {
  font-size: 2rem;
  color: white;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
}

.beta-badge {
  background-color: #3b82f6;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #bfdbfe;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding-top: 0px;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.converter-wrapper {
	background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 24px;
    position: relative;
    margin-top: 20px;
}

h1 {
    background-color: #fcbf49;
    margin: -24px -24px 24px -24px;
    padding: 16px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.toggle-container {
  margin: 1.5rem 0;
  padding: 0 1rem;
  width: 100%;
}

.toggle-wrapper {
  background: #f3f4f6;
  border-radius: 0.75rem;
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  margin: 0 auto;
  width: 100%;
  max-width: 400px;
  justify-content: center;
}

.toggle-option {
  flex: 1;
  max-width: 200px;
}

.toggle-label {
  display: block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-option input[type="radio"]:checked + .toggle-label {
  background: #003049;
  color: white;
}

.toggle-option:hover input[type="radio"]:not(:checked) + .toggle-label {
  background: #e5e7eb;
}

.converter-form {
  max-width: 100%;
  margin: 0 auto;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
}

input {
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 16px;
  width: 100%;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: #003049;
  box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

input.input-error {
  border-color: #dc2626;
}

input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
  color: #dc2626;
  font-size: 0.75rem;
  min-height: 1rem;
}

/* Button styling */
.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.btn {
  width: 100%;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: #003049;
  color: white;
}

.btn-primary:hover {
  background: #002238;
}

.btn-secondary {
  background: white;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.result-container {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.result-container.has-result {
  display: block;
}

.result {
  font-size: 1.125rem;
  color: #1e293b;
  font-weight: 500;
}

.info {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
}

/* Focus states for accessibility */
input:focus,
button:focus,
.toggle-option input[type="radio"]:focus + .toggle-label {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.2);
}

/* FAQ Section */
.faq-section {
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: #003049;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-item {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 16px;
}

.faq-question {
    color: #003049;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.faq-answer {
    color: #334155;
    font-size: 16px;
    line-height: 1.5;
}

.faq-answer ul {
    list-style-type: none;
    padding-left: 0;
}

.faq-answer ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.faq-answer ul li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #003049;

}
@media (max-width: 640px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .beta-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .header-content {
        height: 3.5rem;
    }
	
	.converter-wrapper {
        padding: 16px;
    }
	
	h1 {
        margin: -16px -16px 16px -16px;
        font-size: 20px;
    }

	.input-row {
    grid-template-columns: repeat(2, 1fr);
	}
  
	.button-group {
    grid-template-columns: 1fr;
	}
	
	.faq-section {
        padding: 16px;
        margin-top: 24px;
    }
    
    .faq-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .faq-grid {
        gap: 16px;
    }

    .faq-question {
        font-size: 16px;
    }

    .faq-answer {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
  .header {
        position: fixed;
    }
    
	body {
        padding-top: 3.5rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
  
  .input-row {
    grid-template-columns: 1fr;
  }
  
  .input-group {
    gap: 0.375rem;
  }
  
  .input-group label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .input-group input[type="time"] {
    min-height: 2.75rem;
    font-size: 1rem;
    -webkit-appearance: none;
    background-color: white;
    padding: 0.5rem;
    width: 100%;
  }
  
  .btn {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    min-height: 2.75rem;
    line-height: 1.2;
  }
  
  .button-group {
    gap: 0.75rem;
    text-align: center;
  }
  
.toggle-container {
    padding: 0 0.5rem;
    margin: 1rem 0;
  }
  
  .toggle-wrapper {
    padding: 0.375rem;
    gap: 0.375rem;
  }
  
  .toggle-option {
    min-width: 0;  /* Allow shrinking below min-content */
  }
  
  .toggle-label {
    padding: 0.625rem 0.75rem;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap if needed */
    line-height: 1.2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .result {
    font-size: 1rem;
  }

  .result-container {
    padding: 1rem;
  }
}