/* ========================================
   Dr.Safety - 도입 문의 (페이지 인라인 폼)
   contact.html 전용
   ======================================== */

/* 2단 레이아웃: 왼쪽 입력폼 / 오른쪽 연락처 */
.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ----- 입력 폼 카드 ----- */
.ci-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 36px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.ci-form-title {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--dark);
}
.ci-form-desc {
  font-size: .875rem;
  color: var(--gray);
  margin: 0 0 24px;
}

.ci-field { margin-bottom: 18px; }
.ci-field label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.ci-field label .req  { color: var(--accent); margin-left: 2px; }
.ci-field label .opt  {
  margin-left: 6px;
  font-size: .75rem;
  font-weight: 400;
  color: var(--gray);
}

.ci-field input[type="text"],
.ci-field input[type="email"],
.ci-field input[type="tel"],
.ci-field select,
.ci-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .9375rem;
  font-family: inherit;
  background: #fff;
  color: var(--dark);
  transition: border-color .15s, box-shadow .15s;
}
.ci-field input::placeholder,
.ci-field textarea::placeholder { color: #a3a8b3; }
.ci-field input:focus,
.ci-field select:focus,
.ci-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, .12);
}
.ci-field textarea {
  resize: vertical;
  min-height: 120px;
}

/* 2열 배치 (업체명/담당자명) */
.ci-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* 파일 첨부 영역 */
.ci-file-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.ci-file-area:hover,
.ci-file-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.ci-file-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.ci-file-area > .ci-file-icon,
.ci-file-area > .ci-file-text,
.ci-file-area > .ci-file-hint {
  pointer-events: none;
}
.ci-file-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  line-height: 1;
}
.ci-file-text {
  font-size: .875rem;
  color: var(--dark);
  margin-bottom: 4px;
}
.ci-file-hint {
  font-size: .75rem;
  color: var(--gray);
}
.ci-file-selected {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 8px;
  margin-top: 10px;
}
.ci-file-selected.show { display: flex; }
.ci-file-selected .ci-file-name {
  font-size: .8125rem;
  color: var(--primary);
  font-weight: 600;
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ci-file-remove {
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.ci-file-remove:hover { background: rgba(25, 118, 210, .15); }

/* 상담 방식 라디오 */
.ci-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 4px;
}
.ci-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  margin: 0;
}
.ci-radio-group input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* 약관 동의 */
.ci-agree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .8125rem;
  color: var(--dark);
}
.ci-agree-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.ci-agree-row label {
  margin: 0;
  cursor: pointer;
  font-weight: 400;
}
.ci-agree-row .ci-agree-view {
  margin-left: auto;
  font-size: .75rem;
  color: var(--gray);
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
}
.ci-agree-row .ci-agree-view:hover { color: var(--primary); }

/* 제출 버튼 */
.ci-submit-area {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ci-submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.ci-submit-btn:hover { background: var(--primary-dark); }
.ci-submit-btn:active { transform: translateY(1px); }
.ci-submit-btn:disabled {
  background: var(--gray-light);
  cursor: not-allowed;
}
.ci-submit-hint {
  margin-top: 12px;
  font-size: .8125rem;
  color: var(--gray);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ci-submit-hint strong { color: var(--dark); }

/* ----- 오른쪽 연락처 사이드 ----- */
.contact-sidebar { display: flex; flex-direction: column; gap: 24px; }
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: .9375rem;
}
.info-item .i-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.info-item .i-label { font-size: .75rem; color: var(--gray); }
.info-item .i-value { font-weight: 600; }

/* ----- 반응형 ----- */
@media (max-width: 1024px) {
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .ci-form-card { padding: 24px 20px 20px; }
  .ci-row-2 { grid-template-columns: 1fr; }
  .info-card { padding: 20px; }
  .info-item { font-size: .875rem; }
}

/* ----- 약관 보기 미니 모달 ----- */
.ci-policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10010;
  padding: 20px;
}
.ci-policy-overlay.open { display: flex; }
.ci-policy-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ci-policy-modal h4 {
  margin: 0;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.ci-policy-modal .ci-policy-body {
  padding: 18px 22px;
  font-size: .8125rem;
  color: var(--dark);
  line-height: 1.7;
  overflow-y: auto;
  white-space: pre-line;
}
.ci-policy-modal .ci-policy-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.ci-policy-modal button {
  padding: 8px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
}

/* ----- 토스트 (간단) ----- */
.ci-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  z-index: 10020;
  transition: opacity .2s, transform .2s;
  max-width: 90%;
  text-align: center;
}
.ci-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ci-toast.error   { background: #d32f2f; }
.ci-toast.success { background: #2e7d32; }

/* ----- 제출 완료 카드 (폼 교체 표시) ----- */
.ci-success {
  text-align: center;
  padding: 60px 24px;
}
.ci-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
}
.ci-success h3 {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--dark);
}
.ci-success p {
  font-size: .9375rem;
  color: var(--gray);
  margin: 0 0 24px;
  line-height: 1.6;
}
.ci-success .ci-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.ci-success .ci-btn-secondary {
  padding: 12px 24px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.ci-success .ci-btn-secondary:hover { background: var(--primary-light); }
