/* Furusato Tax Deduction Calculator Styles */
/* Using ID selectors for high specificity - reduces need for !important */

#furusatoToolContainer {
  max-width: 56rem;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Section Styles - ID selectors override Tailwind naturally */
#inputSection {
  background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid #60a5fa;
}

#resultSection {
  background: linear-gradient(to bottom right, #fff7ed, #fef3c7);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid #fb923c;
  animation: fadeIn 0.4s ease-out;
}

.section-title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 3px solid !important;
}

#inputSection .section-title {
  color: #1e40af !important;
  border-bottom-color: #60a5fa !important;
}

#resultSection .section-title {
  color: #9a3412 !important;
  border-bottom-color: #fb923c !important;
}

#furusatoForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Form Groups */
.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
}

.form-label {
  display: block !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #1e40af !important;
  margin-bottom: 0.75rem !important;
}

#annualIncome {
  width: 100% !important;
  padding: 1rem 1.5rem !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  border: 3px solid #93c5fd !important;
  border-radius: 0.75rem !important;
  background-color: white !important;
  color: #111827 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s !important;
}

#annualIncome:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.5) !important;
}

#annualIncome:hover {
  border-color: #60a5fa !important;
}

#annualIncome::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

.form-hint {
  font-size: 0.875rem !important;
  color: #2563eb !important;
  margin-top: 0.5rem !important;
  font-weight: 500 !important;
}

/* Radio Grid (Card Layout) */
.radio-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem !important;
}

@media (min-width: 768px) {
  .radio-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

.radio-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
  border: 3px solid #bfdbfe !important;
  border-radius: 0.75rem !important;
  background-color: white !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
}

.radio-card:hover {
  border-color: #60a5fa !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  transform: scale(1.05) !important;
  background-color: #eff6ff !important;
}

.radio-card:has(.radio-input:checked) {
  background: linear-gradient(to bottom right, #fed7aa, #fef3c7) !important;
  border-color: #f97316 !important;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.3) !important;
  transform: scale(1.05) !important;
}

.radio-input {
  position: absolute !important;
  top: 0.5rem !important;
  right: 0.5rem !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  color: #ea580c !important;
  border-color: #d1d5db !important;
  background-color: white !important;
}

.radio-input:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.5) !important;
}

.radio-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 0.5rem !important;
}

.radio-icon {
  font-size: 1.875rem !important;
}

.radio-text {
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
}

.radio-card:has(.radio-input:checked) .radio-text {
  color: #7c2d12 !important;
}

.radio-text small {
  font-size: 0.75rem !important;
  color: #4b5563 !important;
  font-weight: 400 !important;
}

.radio-card:has(.radio-input:checked) .radio-text small {
  color: #c2410c !important;
}

/* Error Message */
#errorMessage {
  background-color: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.875rem !important;
}

/* Result Section */
.result-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.result-card {
  background-color: white !important;
  padding: 1.25rem !important;
  border-radius: 0.5rem !important;
  border: 2px solid #fed7aa !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  animation: scaleIn 0.3s ease-out;
}

.result-main {
  background: linear-gradient(to bottom right, #fed7aa, #fff7ed) !important;
  border: 3px solid #fb923c !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.result-description {
  font-size: 0.75rem !important;
  color: #6b7280 !important;
  margin-top: 0.5rem !important;
  text-align: center !important;
}

.result-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
}

@media (min-width: 768px) {
  .result-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.result-label {
  font-size: 0.875rem !important;
  color: #4b5563 !important;
  margin-bottom: 0.25rem !important;
}

.result-value {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #ea580c !important;
}

.result-primary {
  font-size: 1.875rem !important;
  color: #c2410c !important;
}

.result-note {
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
}

/* Notice Box */
.notice-box {
  margin-top: 2rem !important;
  background-color: #fefce8 !important;
  border: 1px solid #fde047 !important;
  padding: 1.5rem !important;
  border-radius: 0.5rem !important;
}

.notice-title {
  font-weight: 700 !important;
  color: #854d0e !important;
  margin-bottom: 0.5rem !important;
}

.notice-text {
  font-size: 0.875rem !important;
  color: #a16207 !important;
  margin-bottom: 0.5rem !important;
}

.notice-list {
  list-style-type: disc !important;
  list-style-position: inside !important;
  font-size: 0.875rem !important;
  color: #a16207 !important;
  margin-left: 1rem !important;
}

.notice-list li {
  margin-bottom: 0.25rem !important;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  #furusatoToolContainer {
    padding: 0 0.5rem;
  }

  #inputSection,
  #resultSection {
    padding: 1.25rem;
  }

  .section-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  #annualIncome {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
  }

  .form-label {
    font-size: 0.875rem !important;
    margin-bottom: 0.5rem !important;
  }

  .radio-grid {
    grid-template-columns: 1fr !important;
  }

  .radio-icon {
    font-size: 1.5rem !important;
  }

  .result-value {
    font-size: 1.25rem !important;
  }

  .result-primary {
    font-size: 1.5rem !important;
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
