/* =========================================================
   youtube2026 - 반응형 설문 폼 스타일
   ========================================================= */

:root {
  --navy: #0b2e4f;
  --navy-dark: #071e35;
  --accent: #ffb400;
  --gray-text: #444;
  --gray-border: #d8d8d8;
  --bg: #f5f6f8;
  --error: #d0342c;
  --radius: 8px;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: "맑은 고딕", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--gray-text);
  line-height: 1.6;
}

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* 상단 배너 이미지 */
.banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* 폼 영역 */
.survey {
  padding: 24px 20px 8px;
}

.field-group {
  margin-bottom: 22px;
}

.field-group h5 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-dark);
}

.field-group h5 .required {
  color: var(--error);
  margin-right: 2px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-row.two-col > * {
  flex: 1 1 200px;
}

input[type="text"],
input[type="url"],
input[type="file"],
select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
  color: var(--gray-text);
}

input[type="file"] {
  height: auto;
  padding: 10px 12px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 46, 79, 0.12);
}

input[readonly] {
  background: #f2f2f2;
}

/* 전화번호 */
.tel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tel-row select {
  flex: 0 0 92px;
}

.tel-row input {
  flex: 1 1 80px;
  min-width: 70px;
  text-align: center;
}

.tel-row span.dash {
  color: #999;
}

/* 주소 */
.address-zip-row {
  display: flex;
  gap: 8px;
}

.address-zip-row input {
  flex: 1;
}

.btn-zip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.address-sub-row {
  margin-top: 8px;
}

/* 파일 안내문구 */
.field-hint {
  font-size: 12.5px;
  color: #888;
  margin-top: 6px;
}

/* 유튜브 URL 필드 */
.field-optional-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 인라인 에러 메시지 */
.field-error {
  display: none;
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
}

.field-group.has-error input,
.field-group.has-error select {
  border-color: var(--error);
}

.field-group.has-error .field-error {
  display: block;
}

/* 개인정보 동의 */
.agreement {
  margin: 8px 20px 0;
  padding: 16px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  background: #fafafa;
  max-height: 220px;
  overflow-y: auto;
  font-size: 12.5px;
  color: #555;
  white-space: pre-line;
}

.agreement b {
  color: #222;
}

.agreement-check {
  margin: 14px 20px 0;
  font-size: 14px;
}

.agreement-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.agreement-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* 제출 버튼 */
.submit-btn-wrap {
  padding: 24px 20px 8px;
}

.submit-btn {
  display: block;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:active {
  background: var(--navy-dark);
}

/* 전국영업망 */
.branch-info {
  margin: 32px 0 0;
  padding: 20px;
  background: #f7f7f9;
}

.branch-info .tit {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--navy-dark);
}

.branch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 13px;
}

.branch-grid .branch-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e5e5e5;
}

.branch-grid .branch-item .name {
  color: #666;
}

.branch-grid .branch-item .num {
  font-weight: 600;
  color: #222;
}

@media (min-width: 560px) {
  .branch-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
}

/* 다음 우편번호 팝업 레이어 */
.layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.layer .bg {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: .5;
}

.layer .pop-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.pop-layer .pop_top {
  flex: 0 0 auto;
}

#MpostArea {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

#MpostArea iframe {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  border: none;
}

.pop-layer .pop_top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.pop-layer .pop_top h2 {
  font-size: 16px;
  margin: 0;
}

.pop-layer .pop_top .close img {
  width: 18px;
  display: block;
}

/* 완료 페이지 */
.complete-wrap {
  padding: 60px 24px;
  text-align: center;
}

.complete-wrap h2 {
  color: var(--navy-dark);
}

.complete-wrap a.back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--navy);
  font-weight: 600;
}
