/* ===== Rent Tax Credit Checker Specific Styles ===== */

body {
  background: #ffffff;
  min-height: 100vh;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 30px;
}

.label-with-tooltip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0;
  color: #2d3748;
  font-size: 0.95rem;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-top: 10px;
}

.input-field:focus {
  outline: none;
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}

.value-display {
  text-align: right;
  color: #3182f6;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 8px;
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 50px;
}

.input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-weight: 600;
  pointer-events: none;
}

.toggle-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.toggle-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.95rem;
}

.toggle-btn:hover {
  border-color: #3182f6;
}

.toggle-btn.active {
  background: #3182f6;
  color: white;
  border-color: #3182f6;
}

.result-card {
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
  border-radius: 20px;
  padding: 50px 30px;
  text-align: center;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.result-icon {
  font-size: 6rem;
  margin-bottom: 20px;
  animation: scaleIn 0.5s ease-out;
}

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

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: #3182f6;
  margin-bottom: 20px;
  animation: countUp 0.6s ease-out;
}

.result-main-message {
  font-size: 1.3rem;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: 12px;
  font-weight: 700;
}

.result-sub-message {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 20px;
  font-weight: 400;
}

.tip-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 16px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: left;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tip-box strong {
  color: #92400e;
}

.empty-state {
  color: #a0aec0;
  font-size: 1rem;
}

.fail-reason {
  background: #fee2e2;
  border-left: 4px solid #ef4444;
  padding: 16px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: left;
  color: #991b1b;
}

.info-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 8px;
}

.rent-input-group {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  align-items: start;
}

.rent-input-group .input-group {
  margin-bottom: 0;
}

.small-label {
  font-size: 0.85rem;
}

/* 툴팁 스타일 */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  transition: all 0.2s ease;
  user-select: none;
}

.tooltip-icon:hover {
  background: #3182f6;
  color: white;
}

.tooltip-content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 12px;
  width: 260px;
  font-size: 13px;
  line-height: 1.45;
  color: #4a5568;
  font-weight: 400;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

.tooltip-content::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #e5e7eb;
  margin-top: 1px;
}

.tooltip:hover .tooltip-content,
.tooltip.active .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.help-text {
  font-size: 0.8rem;
  color: #718096;
  margin-top: 8px;
  line-height: 1.5;
}

.salary-options {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.salary-option-btn {
  padding: 18px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
}

.salary-option-btn:hover {
  border-color: #3182f6;
  background: #f7fafc;
}

.salary-option-btn.active {
  background: #3182f6;
  color: white;
  border-color: #3182f6;
}

.salary-option-label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.salary-option-desc {
  font-size: 0.85rem;
  opacity: 0.85;
}

.salary-option-btn.active .salary-option-desc {
  opacity: 1;
}

/* 정보 영역 */
.info-area {
  background: #ffffff;
  padding: 3rem 1.5rem 4rem;
}

.info-container {
  max-width: 680px;
  margin: 0 auto;
}

.info-section {
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid #f1f5f9;
}

.info-section-last {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1rem;
  line-height: 1.75;
  color: #6b7280;
  margin-bottom: 1rem;
}

.info-toggle-btn {
  font-size: 0.875rem;
  border: none;
  background: none;
  color: #3182f6;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  transition: color 0.2s ease;
  font-family: inherit;
  margin-top: 0.5rem;
}

.info-toggle-btn:hover {
  color: #1d4ed8;
}

.toggle-content {
  margin-top: 1.25rem;
}

.toggle-content.is-collapsed {
  display: none;
}

.info-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  color: #6b7280;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
}

.info-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3182f6;
  font-weight: 700;
}

.info-list li:last-child {
  margin-bottom: 0;
}

/* 사례 카드 */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.case-item {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  background: #f9fafb;
  border-color: #e5e7eb;
}

.case-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
}

.case-detail {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
}

.case-result {
  font-size: 0.9375rem;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.case-result strong {
  font-weight: 700;
  color: #3182f6;
}

.case-note {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
}

/* 경정청구 설명 섹션 */
.gyeongjeong-content {
  margin-top: 1.25rem;
}

.gyeongjeong-content p {
  color: #6b7280;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.gyeongjeong-content p:last-child {
  margin-bottom: 0;
}

/* 공유 버튼 */
.share-btn {
  width: 100%;
  padding: 16px 24px;
  background: #3182f6;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.3);
}

.share-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(49, 130, 246, 0.4);
}

.share-btn:active {
  transform: translateY(0);
}

/* 토스트 알림 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a202c;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .calculator-area {
    padding-bottom: 2rem;
  }

  .info-area {
    padding: 2rem 1rem 3rem;
  }

  .info-section {
    padding-bottom: 2rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-lead {
    font-size: 0.9375rem;
  }

  .related-tools-area {
    padding: 2rem 1rem;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .tooltip-left .tooltip-content {
    left: 0;
    right: auto;
    transform: none;
    width: 240px;
  }

  .tooltip-left .tooltip-content::after,
  .tooltip-left .tooltip-content::before {
    left: 12px;
    right: auto;
    transform: none;
  }

  .tooltip-right .tooltip-content {
    left: auto;
    right: 0;
    transform: none;
    width: 240px;
  }

  .tooltip-right .tooltip-content::after,
  .tooltip-right .tooltip-content::before {
    left: auto;
    right: 12px;
    transform: none;
  }

  .card {
    padding: 20px;
  }

  .result-amount {
    font-size: 2rem;
  }

  .result-main-message {
    font-size: 1.1rem;
  }

  .result-sub-message {
    font-size: 0.9rem;
  }

  .result-icon {
    font-size: 4rem;
  }

  .rent-input-group {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
