/* ===== 성공 레이어 전체 ===== */
.success-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
}

.success-layer[hidden] {
    display: none !important;
}

.success-layer.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.success-card {
  background: #ffffff;
  width: min(92%, 360px);
  padding: 36px 28px 28px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== 체크 아이콘 ===== */
.check {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
}

.check .ring {
  fill: none;
  stroke: #0f172a;
  stroke-width: 4;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  animation: drawRing 0.6s ease-out forwards;
}

.check .mark {
  fill: none;
  stroke: #0f172a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.35s ease-out forwards;
  animation-delay: 0.45s;
}

/* ===== 텍스트 ===== */
.success-card .msg {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 22px;
}

.success-card .msg b {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
  color: #111827;
}

/* ===== 버튼 ===== */
.success-card .btn {
  width: 100%;
  padding: 12px 0;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.success-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
}

.success-card .btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes drawRing {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ===== 모바일 미세 조정 ===== */
@media (max-width: 480px) {
  .success-card {
    padding: 32px 22px 24px;
  }

  .success-card .msg {
    font-size: 14px;
  }
}

/* ===== 폼 래퍼 ===== */
#contactForm {
  background: #ffffff;
  padding: 32px 28px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 960px; margin: 0 auto;
}

/* ===== 인풋 공통 ===== */
#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}

#contactForm textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== 포커스 ===== */
#contactForm input:focus,
#contactForm textarea:focus {
  outline: none;
  border-color: #22c55e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

/* ===== placeholder ===== */
#contactForm ::placeholder {
  color: #9ca3af;
}

/* ===== 버튼 ===== */
#contactForm button[type="submit"] {
  padding: 14px 0;
  border-radius: 14px;
  border: none;
  background: linear-gradient(180deg, #00425f, #0f172a);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width:45%; margin: 6px auto;
}

#contactForm button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(34, 197, 94, 0.35);
}

#contactForm button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ===== 모바일 대응 ===== */
@media (max-width: 480px) {
  #contactForm {
    padding: 26px 20px;
    border-radius: 16px;
  }
}

/* ===== 필드 래퍼 ===== */
.field label {
  display: inline-flex;
  align-items: center
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

/* ===== 필수 별표 ===== */
.required {
  color: #ef4444;
  font-weight: 700;
  margin-right: 2px;
  display: inline;
}

/* ===== 개인정보 동의 ===== */
.agree {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

.agree label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.agree input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #22c55e;
}

/* ===== honeypot 숨김 ===== */
.hidden {
  display: none;
}

/* ===== CAPTCHA ===== */
.captcha {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* 라벨 고정폭 */
.captcha label {
  width: 200px;          /* ← 여기서 정렬이 결정됨 */
  font-size: 16px;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex; 
  gap: 6px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#captchaInput {width:600px !important; flex:0;}
#captchaCanvas {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
}

.captcha-refresh {
  border: none;
  background: #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
}

.captcha-row input {
  flex: 1;
}

/* ===== 개인정보 ===== */
.privacy {
  display: flex;
  gap: 12px;
  font-size: 14px;
  align-items: flex-start;
}

.privacy-box {
  max-height: 78px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 4px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  line-height: 1.9;
  width: 100%;
  margin-bottom: 17px;
}

.privacy-agree {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

.privacy-agree input {
  accent-color: #22c55e;
}

/* ===== 가로형 필드 ===== */
.field.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 라벨 고정폭 */
.field.row label {
  width: 200px;          /* ← 여기서 정렬이 결정됨 */
  font-size: 16px;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex; 
  gap: 6px;
}

/* input / textarea */
.field.row input,
.field.row textarea {
  flex: 1;
}

/* 모바일에서는 다시 세로 */
@media (max-width: 640px) {
  .field.row {
    flex-direction: column;
    align-items: stretch;
	margin-bottom: 10px;
  }
  
  .captcha {
    flex-direction: column;
    align-items: stretch;
  }

  .captcha label {
    width: 100%;
  }
  
  
  #captchaInput {width:125px !important}
}