/* 育儿补贴计算器样式 */
:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --primary-light: rgba(16, 185, 129, 0.3);
  --primary-dark: #059669;
  --success: #10b981;
  --success-hover: #059669;
}

/* ==================== 输入区域样式 ==================== */
.calc-input-section {
  margin-bottom: 32px;
}

.calc-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calc-card-header {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 24px 32px;
}

.calc-card-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #ffffff;
}

.calc-card-header p {
  font-size: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.calc-card-body {
  padding: 32px;
}

/* 表单区域 */
.form-section {
  margin-bottom: 28px;
}

.form-section:last-of-type {
  margin-bottom: 24px;
}

.form-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--success);
  border-radius: 2px;
}

/* 表单网格 */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-group-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.03);
  border-bottom: 1px solid var(--border);
}

.form-group-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group-card-badge {
  font-size: 12px;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 8px;
}

.input-with-unit {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.input-with-unit:focus-within {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-with-unit input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  font-size: 15px;
  background: transparent;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.input-with-unit input::placeholder {
  color: var(--text-light);
}

.input-with-unit .unit {
  font-size: 13px;
  color: var(--text-light);
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.02);
  border-left: 1px solid var(--border);
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* 补贴标准展示 */
.subsidy-standard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.standard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.standard-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.standard-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 12px;
  color: var(--success);
  flex-shrink: 0;
}

.standard-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.standard-title {
  font-size: 13px;
  color: var(--text-light);
}

.standard-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.standard-desc {
  font-size: 12px;
  color: var(--text-light);
}

/* 操作按钮 */
.calc-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-lg {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-primary.btn-lg {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
}

.btn-primary.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-outline.btn-lg {
  border-width: 2px;
}

.btn-outline.btn-lg:hover {
  background: var(--bg);
}

/* ==================== 结果区域样式 ==================== */
.calc-result-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

/* 结果概览卡片 */
.result-overview-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-overview-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

.result-overview-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
}

.result-overview-header p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

.result-overview-body {
  padding: 32px;
}

/* 补贴总额高亮显示 */
.result-highlight {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
  border-radius: 12px;
}

.result-highlight-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.result-highlight-label {
  font-size: 14px;
  color: var(--text-light);
}

.result-highlight-value {
  font-size: 42px;
  font-weight: 700;
  color: var(--success);
  line-height: 1.1;
  letter-spacing: -1px;
}

.result-highlight-unit {
  font-size: 14px;
  color: var(--text-light);
}

/* 结果网格 */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.result-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 10px;
  color: var(--success);
  flex-shrink: 0;
}

.result-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.result-item-label {
  font-size: 13px;
  color: var(--text-light);
}

.result-item-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.result-item-unit {
  font-size: 12px;
  color: var(--text-light);
}

/* 详情区域 */
.detail-section {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-toggle {
  padding: 20px 32px;
  text-align: center;
}

.detail-toggle .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.detail-toggle .btn:hover {
  background: var(--bg);
}

.detail-toggle .btn.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: var(--success);
}

.detail-toggle .btn .arrow-icon {
  transition: transform 0.3s ease;
}

.detail-toggle .btn.active .arrow-icon {
  transform: rotate(180deg);
}

.detail-table-wrapper {
  border-top: 1px solid var(--border);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: rgba(0, 0, 0, 0.02);
}

.detail-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-scroll {
  max-height: 400px;
  overflow-y: auto;
  padding: 0 32px 32px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.detail-table th,
.detail-table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.detail-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-table td {
  color: var(--text);
}

.detail-table tbody tr {
  transition: background 0.2s ease;
}

.detail-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
}

.detail-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================== 信息区域样式 ==================== */
.info-section {
  margin-top: 32px;
}

.info-section > h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}

.info-content {
  display: grid;
  gap: 24px;
}

.info-block {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.info-block h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--success);
  display: inline-block;
}

.info-block p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

.info-block ol {
  padding-left: 24px;
  margin: 0;
}

.info-block ul {
  padding-left: 20px;
  margin-top: 8px;
}

.info-block li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 12px;
  padding-left: 4px;
}

.info-block li::marker {
  color: var(--success);
  font-weight: 600;
}

/* 政策图片 */
.policy-image {
  text-align: center;
  margin: 16px 0;
}

.policy-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 注意事项 */
.notice-text {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  padding: 16px;
  border-radius: 0 8px 8px 0;
  margin: 0;
  color: #92400e;
}

/* 资源链接 */
.resource-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.resource-link:hover {
  border-color: var(--success);
  color: var(--success);
  background: rgba(16, 185, 129, 0.05);
  transform: translateX(4px);
}

.resource-link svg {
  color: var(--success);
  flex-shrink: 0;
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
  .subsidy-standard {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .calc-card-header {
    padding: 20px 24px;
  }

  .calc-card-body {
    padding: 24px;
  }

  .subsidy-standard {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .standard-item {
    flex-direction: column;
    text-align: center;
  }

  .calc-actions {
    gap: 12px;
  }

  .result-overview-header,
  .result-overview-body,
  .detail-header,
  .detail-toggle {
    padding-left: 24px;
    padding-right: 24px;
  }

  .table-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }

  .info-block {
    padding: 24px;
  }

  .resource-links {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .calc-card-header {
    padding: 16px 20px;
  }

  .calc-card-header h2 {
    font-size: 18px;
  }

  .calc-card-body {
    padding: 20px;
  }

  .form-section h3 {
    font-size: 15px;
  }

  .result-highlight-value {
    font-size: 32px;
  }

  .result-item {
    padding: 16px;
  }

  .result-item-value {
    font-size: 18px;
  }

  .detail-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
  }

  .detail-toggle {
    padding: 16px 20px;
  }

  .detail-toggle .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn-small {
    width: 100%;
    justify-content: center;
  }

  .table-scroll {
    padding: 0 12px 16px;
  }

  .detail-table th,
  .detail-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .resource-link {
    padding: 12px 16px;
    font-size: 13px;
  }
}
