/* GC Entry 신청 폼 — Uncode 등 테마 간섭 차단용 스코프 스타일 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

.gc-scope { font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; -webkit-font-smoothing: antialiased; }
.gc-scope, .gc-scope * { box-sizing: border-box; }
.gc-scope input::placeholder { color: #9DAAA0; }
.gc-scope input, .gc-scope select, .gc-scope button, .gc-scope label { line-height: normal; }
.gc-scope h1, .gc-scope h2, .gc-scope h3, .gc-scope p, .gc-scope ul { text-transform: none; }

/* 풀블리드 — 테마(Uncode 등)의 콘텐츠 컬럼 폭을 뚫고 화면 전체로 펼친다.
   --gc-vw 는 form.js가 스크롤바를 제외한 실제 뷰포트 폭으로 채운다 (미설정 시 100vw 폴백). */
.gc-root {
  position: relative;
  width: var(--gc-vw, 100vw);
  max-width: var(--gc-vw, 100vw);
  margin-left: calc(50% - var(--gc-vw, 100vw) / 2);
  margin-right: calc(50% - var(--gc-vw, 100vw) / 2);
}

/* 기본 배경 위 골프 코스 컨투어 라인 패턴 (업로드 이미지가 없을 때만 보임) */
.gc-root::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='0.05' stroke-width='1.5'%3E%3Cpath d='M420 560c-60-70-40-150 20-190s90-110 60-180'/%3E%3Cpath d='M460 560c-50-60-30-130 25-170s85-100 58-165'/%3E%3Cpath d='M500 560c-40-50-22-110 28-148s78-92 55-150'/%3E%3Cpath d='M60 0c50 60 34 130-18 172S-30 274-8 336'/%3E%3Cpath d='M110 0c44 54 30 118-16 156S24 250 42 306'/%3E%3Cpath d='M160 0c38 48 26 106-14 140S78 226 92 276'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 560px 560px;
}
.gc-root > * { position: relative; }

/* 좌측 상단 브랜드 로고 */
/* 흐름에서 분리해 좌측 상단에 고정 — top 값은 form.js가 메인 로고 상단선에 맞춰 조정 */
.gc-scope .gc-corner-logo {
  position: absolute;
  top: 48px;
  left: 24px;
  z-index: 3;
  text-align: left;
  line-height: 0;
}
.gc-scope .gc-corner-logo img {
  width: auto;
  max-width: 260px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.gc-scope .gc-corner-logo a { display: inline-block; line-height: 0; }
@media (max-width: 640px) {
  .gc-scope .gc-corner-logo { top: 40px; left: 14px; }
  .gc-scope .gc-corner-logo img { max-width: 150px; max-height: 30px; }
}

/* 대회요강 다운로드 버튼 */
.gc-scope .gc-rules-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid #CBD8CE;
  border-radius: 12px;
  background: #FFFFFF;
  color: #0C5B3B !important;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s;
}
.gc-scope .gc-rules-btn:hover { background: #EAF2EA; border-color: #0C5B3B; }
.gc-scope .gc-rules-ico { font-size: 16px; line-height: 1; }
.gc-scope button.gc-rules-btn { width: 100%; font-family: inherit; cursor: pointer; }

/* 대회요강 팝업 */
.gc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.gc-modal.gc-hide { display: none !important; }
.gc-modal-bg { position: absolute; inset: 0; background: rgba(8, 20, 14, 0.72); }
.gc-modal-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border-top: 6px solid #4CA36A;
  display: flex;
  flex-direction: column;
}
.gc-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.92); color: #122B1F;
  font-size: 24px; line-height: 1; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.gc-modal-close:hover { background: #FFFFFF; }
.gc-modal-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gc-modal-banner { line-height: 0; background: #0E0E10; }
.gc-modal-banner img { width: 100%; height: auto; display: block; }
.gc-modal-banner .gc-banner-mo { display: none; }
.gc-modal-body { padding: 30px 34px 36px; font-size: 13.5px; line-height: 1.7; color: #333333; }
.gc-modal-body h3 {
  font-size: 16px; font-weight: 800; color: #0A3D24;
  border-bottom: 2px solid #0C5B3B; padding: 0 0 8px; margin: 32px 0 14px;
}
.gc-modal-body h3:first-child { margin-top: 0; }
.gc-modal-body h4 { font-size: 14.5px; font-weight: 800; color: #0C5B3B; margin: 22px 0 8px; }
.gc-modal-body p { margin: 0 0 10px; }
.gc-modal-body img { max-width: 100%; height: auto; border: 1px solid #E5E5E0; border-radius: 8px; display: block; }
/* 요강 본문 보조 클래스 — 관리자가 붙여넣는 HTML에서 사용 */
.gc-modal-body .gc-note { display: block; color: #888888; font-size: 12.5px; margin-top: 4px; }
.gc-modal-body .gc-box { background: #F6F7F5; border-radius: 10px; padding: 16px 18px; margin: 12px 0 14px; }
.gc-modal-body .gc-box p:last-child { margin-bottom: 0; }
.gc-modal-body .gc-lead { font-size: 12px; letter-spacing: 2.5px; font-weight: 700; color: #C9A227; margin-bottom: 10px; }
.gc-modal-body .gc-intro-title { font-size: 24px; font-weight: 800; line-height: 1.3; color: #0A3D24; margin: 0 0 10px; }
.gc-modal-body .gc-intro-meta { font-size: 13px; color: #555555; margin-bottom: 26px; }
.gc-modal-body .gc-prize {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #F9F9F7; border: 1px solid #E5E5E0; border-radius: 8px;
  padding: 12px 16px; margin: 0 0 8px;
}
.gc-modal-body .gc-prize.gc-top { background: linear-gradient(90deg, #FAF6E8, #FFFFFF); border-color: #E8DDB8; }
.gc-modal-body .gc-prize b { white-space: nowrap; }
.gc-modal-body .gc-contact { background: #F6F7F5; border-radius: 10px; padding: 16px 18px; margin-top: 22px; }
@media (max-width: 640px) {
  .gc-modal-body .gc-prize { display: block; }
  .gc-modal-body .gc-prize span + span { display: block; margin-top: 4px; }
  .gc-modal-body .gc-intro-title { font-size: 20px; }
}
.gc-modal-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.gc-modal-body th, .gc-modal-body td { border: 1px solid #D8DFD8; padding: 8px; }
.gc-modal-body th { background: #EFF3EF; }
.gc-modal-body ul, .gc-modal-body ol { margin: 0 0 12px; padding-left: 20px; }
.gc-modal-actions { margin-top: 34px; text-align: center; }
.gc-rules-dl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 300px; padding: 16px 28px; border-radius: 10px;
  background: #4CA36A; color: #FFFFFF !important;
  font-size: 15px; font-weight: 800; text-decoration: none !important;
}
.gc-rules-dl:hover { background: #3E8B58; }
body.gc-modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .gc-modal { padding: 12px 10px; }
  .gc-modal-box { max-height: 92vh; border-radius: 12px; }
  .gc-modal-banner .gc-banner-pc { display: none; }
  .gc-modal-banner .gc-banner-mo { display: block; }
  .gc-modal-body { padding: 20px 18px 26px; font-size: 13.5px; }
  .gc-rules-dl { min-width: 0; width: 100%; padding: 15px 18px; }
}

/* 세그먼트 탭 활성/비활성 */
.gc-scope .gc-tab { background: #FFFFFF; box-shadow: 0 1px 3px rgba(18,43,31,0.08); }
.gc-scope .gc-tab .gc-tab-num { background: #E7EEE8; color: #5C7166; }
.gc-scope .gc-tab .gc-tab-title { color: #44584C; }
.gc-scope .gc-tab .gc-tab-sub { color: #94A79B; }
.gc-scope .gc-tab.is-active { background: #0C5B3B; box-shadow: 0 8px 18px rgba(12,91,59,0.35); }
.gc-scope .gc-tab.is-active .gc-tab-num { background: #FFFFFF; color: #0C5B3B; }
.gc-scope .gc-tab.is-active .gc-tab-title { color: #FFFFFF; }
.gc-scope .gc-tab.is-active .gc-tab-sub { color: rgba(255,255,255,0.75); }

/* 참가자 패널 */
.gc-scope .gc-panel { display: none; }
.gc-scope .gc-panel.is-on { display: block; }

/* 기타 신청경로 */
.gc-scope .gc-etc { display: none; }
.gc-scope .gc-etc.is-on { display: block; }

/* 오류 배너 */
.gc-scope .gc-hide { display: none !important; }

/* 포커스 링 (인라인 스타일 위에 얹기) */
.gc-scope input:focus, .gc-scope select:focus {
  border-color: #0C5B3B !important;
  box-shadow: 0 0 0 3px rgba(12,91,59,0.12) !important;
}

/* 버튼 호버 */
.gc-scope #gc-submit:hover { background: #0A4A30 !important; }
.gc-scope button[data-gc="tab"]:not(.gc-tab):hover { background: #EAF2EA !important; }

/* 완료 화면 */
.gc-scope .gc-summary-section { border: 1px solid #E8EEE9; border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; }
.gc-scope .gc-summary-section h3 { margin: 0 0 14px; font-size: 15px; font-weight: 800; color: #122B1F; }
.gc-scope .gc-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.gc-scope .gc-sum-item { min-width: 0; }
.gc-scope .gc-sum-item.gc-wide { grid-column: 1 / -1; }
.gc-scope .gc-sum-label { display: block; font-size: 12px; font-weight: 600; color: #71857A; margin-bottom: 3px; }
.gc-scope .gc-sum-value { display: block; font-size: 14.5px; font-weight: 600; color: #17281F; word-break: break-all; }
.gc-scope .gc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.gc-scope .gc-actions button { padding: 15px; border: none; border-radius: 12px; background: #0C5B3B; color: #FFF; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.gc-scope .gc-actions button:hover { background: #0A4A30; }
.gc-scope .gc-actions button.gc-secondary { background: #F4F8F4; color: #0C5B3B; border: 1px solid #CBD8CE; }
.gc-scope .gc-actions button.gc-secondary:hover { background: #EAF2EA; }

/* 제출 중 상태 */
.gc-scope #gc-submit:disabled { opacity: 0.6; cursor: wait; }

/* 모바일 */
@media (max-width: 640px) {
  .gc-root { padding-left: 10px !important; padding-right: 10px !important; }
  .gc-root::before { display: none; }
  .gc-scope #gc-card { padding: 26px 16px 30px !important; }
  .gc-scope .gc-summary-grid { grid-template-columns: 1fr; }
  /* 좁은 화면에서 버튼이 밀려 넘치지 않도록 (우편번호 찾기 등) */
  .gc-scope button[data-gc="zip"] { padding: 13px 14px !important; white-space: nowrap; }
  .gc-scope .gc-actions { grid-template-columns: 1fr; }
}
/* 좁은 화면에서는 2열 입력(성명/생년월일, 부서/직위 등)을 세로로 편다 */
@media (max-width: 480px) {
  .gc-scope [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .gc-scope .gc-tabbar { grid-template-columns: 1fr !important; }
}
@media (max-width: 400px) {
  .gc-scope button[data-gc="zip"] { padding: 13px 10px !important; font-size: 13px !important; }
  /* 아주 좁은 화면: 우편번호 입력칸 아래로 버튼을 내려 글자가 잘리지 않게 */
  .gc-scope div:has(> button[data-gc="zip"]) { flex-direction: column; }
  .gc-scope div:has(> button[data-gc="zip"]) button[data-gc="zip"] { width: 100%; padding: 13px !important; }
}
/* 어떤 폭에서도 폼 요소가 컨테이너를 넘지 않게 */
.gc-scope input, .gc-scope select, .gc-scope textarea { max-width: 100%; min-width: 0; }
