/* styles.css */
/* 基础样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f7fa;
}

.action-box {
  /* 确保父容器没有额外的内边距或边框 */
  padding: 0px;
  border: 0;
  width: 100%; /* 确保父容器宽度为100% */
}

.hidden {
    display: none;
}
        
.text-center {
    text-align: center; /* 水平居中对齐 */
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-box-root {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 计算器盒子 */
.calculator-box {
    background: white;
    border-radius: 12px;
    padding: 0 20px 20px 20px;
    /*box-shadow: 0 4px 6px rgba(0,0,0,0.1);*/
}


.image-container {
    width: 100%; /* 图片容器宽度占满父容器 */
    height: auto; /* 高度自适应 */
    overflow: hidden; /* 隐藏超出部分 */
}

.image-container img {
    width: 100%; /* 图片宽度占满容器 */
    height: auto; /* 图片高度自适应 */
    /*display: block;*/ /* 去除图片底部的空白间隙 */
}
/* 表单元素 */
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.question {
    margin-bottom: 20px;
}

div.question>label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/*.question input:not([type="radio"]) {
    width: 100%;
    height: 40px;
    padding-left: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}*/

.question input:not([type="radio"]) {
    width: 100%;
    height: 40px;
    padding-left: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.question input[type="radio"] {
    /*width: auto;*/
    height: 100%;
    padding-left: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

/* 按钮样式 */
.btn {
    display: block;
    font-size: 18px;
    padding: 12px 0px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    width: 100%;
    text-align: center; 
}

.btn-primary {
    background: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
}

/* 结果展示 */
.result-box {
    margin-top: 0px;
    padding: 5px;
    border-radius: 8px;
    width: 100%
    text-align: center; 
}

.success {
    background: #e6fff2;
    border: 1px solid #00cc88;
}

.error {
    background: #ffe6e6;
    border: 1px solid #ff4444;
}

.h3-title {
    font-size: 24px;
    font-weight: bold;
    margin: 16px;
    color: #007bff;
    text-align: center; 
}

.amount {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    color: #007bff;
}

.formula {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
/*@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .calculator-box {
        padding: 20px;
    }
    
    .question input {
        padding: 10px;
    }
}*/

/* styles.css 新增样式 */
.form-section-title {
  color: #2c7be5;
  border-left: 4px solid #2c7be5;
  padding-left: 1rem;
  margin: 2rem 0 1rem;
}

.radio-group,
.checkbox-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  /*justify-content: space-around;*/
}

.form-check {
  display: flex;
  align-items: center;
  min-width: 12px; /* 防止内容挤压 */
  white-space: nowrap; /* 禁止文字换行 */
  gap: 0.5rem;
}

/* 标签样式优化 */
/*.form-check-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 20px;
}*/

.query-type-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0;
}

.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0;
}

/* 复选框垂直排列 */
.checkbox-group.vertical {
  flex-direction: column;
}


.footer-note {
    font-size: 0.8em; /* 设置字体大小为默认字体大小的80% */
    color: #666; /* 设置字体颜色为灰色 */
    text-align: center; /* 文本居中对齐 */
    margin-top: 20px; /* 与上方内容的间距 */
    padding: 10px; /* 内边距 */
    /*background-color: #f9f9f9; /* 背景颜色 */*/
    border-top: 1px solid #ddd; /* 顶部边框 */
}


/* styles.css新增 */
.custom-dialog {
  border: none;
  border-radius: 12px;
  padding: 10px;
  width: min(70vw, 600px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.custom-dialog::backdrop {
  background: rgba(0,0,0,0.5);
}

.dialog-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  /*margin-top: 2rem;*/
}