/* 表单弹窗样式 - 从 homeFrom.scss 转换 */
.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.page-container {
  position: absolute;
  z-index: 99;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 420px;
}
.title-section {
  width: 100%;
  text-align: center;
  margin-bottom: 1.25rem;
}
.title-section .main-title {
  font-size: calc(var(--content-subhea) - 6px);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.375rem;
}
.title-section .iconfont {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 22px;
  opacity: 0.6;
  z-index: 10;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.title-section .sub-title {
  color: var(--text-color2);
  font-size: 0.75rem;
}
.form-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 1.125rem;
  padding-top: 2rem;
  max-width: 420px;
  width: 420px;
  max-height: 85vh;
  position: relative;
  overflow-y: auto;
  color: #000;
}
@media (max-width: 768px) {
  .page-container {
    width: 92vw;
  }
  
  .form-card {
    padding: 0.75rem;
    padding-top: 1.75rem;
    width: 100% !important;
    max-height: 88vh;
  }
  
  .title-section {
    margin-bottom: 0.75rem;
  }
  
  .title-section .main-title {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
  }
  
  .title-section .sub-title {
    font-size: 0.6875rem;
  }
  
  .title-section .iconfont {
    top: 0.375rem;
    right: 0.375rem;
    font-size: 18px;
    width: 24px;
    height: 24px;
  }
}
.form-section {
  margin-top: 1rem;
}
.form-section.section-divider {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}
.form-section .section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 0.625rem;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .platform-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .platform-grid {
    gap: 0.3125rem;
  }
  
  .form-section {
    margin-top: 0.625rem;
  }
  
  .form-section.section-divider {
    padding-top: 0.625rem;
  }
  
  .form-section .section-title {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
}
.platform-card {
  display: block;
  cursor: pointer;
}
.card-select {
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.5rem 0.375rem;
  min-height: 2.5rem;
}
.card-select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.card-select.selected {
  border-color: var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  background-color: var(--primary-color);
  color: #fff;
}
.platform-name {
  text-align: center;
  font-size: 0.75rem;
}
.business-type-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .business-type-container { flex-direction: row; }
}
.business-type-card {
  display: block;
  cursor: pointer;
  flex: 1;
}
.btn-select {
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.625rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}
.btn-select:hover {
  border-color: var(--primary-color);
}
.btn-select.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-select .type-name {
  font-weight: 600;
  font-size: 0.8125rem;
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-group .form-label {
  display: block;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}
.appeal-type-container,
.ip-type-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3125rem;
  margin-bottom: 0.125rem;
}
.appeal-type-tag,
.ip-type-tag {
  cursor: pointer;
  min-width: 6.25rem;
}
.tag-select {
  flex: 1;
  display: block;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  transition: all 0.3s ease;
  font-size: calc(var(--font-size-base) - 4px);
  font-weight: 500;
  text-align: center;
}
.tag-select:hover {
  border-color: var(--primary-color);
}
.tag-select.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
}
.text-area,
.text-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-size: 0.75rem;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
  .card-select {
    padding: 0.375rem 0.25rem;
    min-height: 2.125rem;
    border-radius: 0.375rem;
  }
  
  .platform-name {
    font-size: 0.6875rem;
  }
  
  .business-type-container {
    gap: 0.375rem;
  }
  
  .btn-select {
    padding: 0.5rem 0.375rem;
    border-radius: 0.375rem;
  }
  
  .btn-select .type-name {
    font-size: 0.75rem;
  }
  
  .form-group {
    margin-bottom: 0.625rem;
  }
  
  .form-group .form-label {
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
  }
  
  .tag-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }
  
  .text-area,
  .text-input {
    padding: 0.375rem 0.625rem;
    font-size: 0.6875rem;
    border-radius: 0.3125rem;
  }
}
.text-area:focus,
.text-input:focus {
  outline: none;
  border: 2px solid var(--primary-color);
}
.text-area {
  resize: vertical;
  min-height: 4.375rem;
}
.lawsuit-response-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.lawsuit-response-card {
  display: block;
  cursor: pointer;
}
.response-name {
  text-align: center;
  font-size: 0.75rem;
}
.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1rem;
}
.submit-btn span {
  font-weight: 600 !important;
}
.submit-btn:hover {
  background-color: var(--primary-color-hover);
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
  .text-area {
    min-height: 3.75rem;
  }
  
  .lawsuit-response-grid {
    gap: 0.375rem;
    margin-bottom: 1rem;
  }
  
  .response-name {
    font-size: 0.6875rem;
  }
  
  .submit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    margin-top: 0.75rem;
    border-radius: 0.3125rem;
    gap: 0.25rem;
  }
}

/* ========== 新增：业务咨询表单样式 ========== */
.popup-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  cursor: pointer;
}

.consult-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-top: 10px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  line-height: 1.4;
}

.field-required {
  color: #ff4d4f;
  margin-left: 2px;
}

.field-input {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #1f2937;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.field-input:focus {
  border-color: #fe9906;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(254, 153, 6, 0.1);
}

.field-input::placeholder {
  color: #94a3b8;
}

.field-select {
  position: relative;
  width: 100%;
}

.field-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.field-select.open .field-select-trigger {
  border-color: #fe9906;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(254, 153, 6, 0.1);
}

.field-select-text {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-select-text.placeholder {
  color: #94a3b8;
}

.field-select-arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.field-select.open .field-select-arrow {
  transform: rotate(180deg);
  color: #fe9906;
}

.field-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  max-height: 240px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}

.field-select.open .field-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.field-select-option {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.field-select-option:hover {
  background: #fff7e8;
  color: #fe9906;
}

.field-select-option.selected {
  background: linear-gradient(135deg, #ffb84d, #fe9906);
  color: #fff;
}

/* 案件编号组合样式 */
.case-number-group {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.5fr 1.35fr;
  gap: 5px;
  align-items: stretch;
}

.case-number-group .case-picker,
.case-number-group .case-fixed-type,
.case-number-group .case-number-input {
  height: 38px;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-sizing: border-box;
  min-width: 0;
}

.case-picker {
  flex: 0 0 auto;
  width: auto;
}

.case-picker-zone {
  min-width: 0;
}

.case-picker-zone .field-select-trigger {
  padding: 0 5px;
}

.case-picker-zone .field-select-text {
  font-size: 10px;
}

.case-picker-year {
  min-width: 0;
}

.case-fixed-type {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.case-fixed-type-short {
  min-width: 0;
  padding: 0 5px;
}

.case-number-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
  text-align: center;
}

.case-number-input-wide {
  flex: 1 1 0;
}

.case-number-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

/* 按钮组 */
.form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.form-btn {
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.form-btn-reset {
  color: #fe9906;
  background-color: #fff7e8;
}

.form-btn-reset:hover {
  background-color: #ffedd5;
}

.form-btn-submit {
  color: #fff;
  background: linear-gradient(90deg, #ffad33 0%, #fe9906 100%);
  box-shadow: 0 5px 12px rgba(254, 153, 6, 0.28);
}

.form-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(254, 153, 6, 0.35);
}

.form-btn-submit:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(254, 153, 6, 0.22);
}

.form-btn-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: 0 5px 12px rgba(254, 153, 6, 0.18);
}

.form-status {
  min-height: 28px;
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
  text-align: center;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: 12px;
}

.form-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-status.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

/* 响应式布局 */
@media (max-width: 1180px) {
  .form-row,
  .form-row-3,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .case-number-group {
    grid-template-columns: 0.8fr 1.2fr 0.5fr 1.35fr;
  }
}
