/*
 * 하단 빠른 상담신청 바(section/quick/quick-contact.php, 2026-10-21).
 * 사이트처럼 검정 바탕·각진 모서리·사이트 레드(#C23A31). 상단 메뉴(#header, z-index 4)보다 아래 층(3)에 두어 메뉴를 가리지 않는다.
 * PC(1025px 이상): 한 줄 바에 입력칸을 바로 둔다. 휴대폰·태블릿: [빠른 상담신청][전화] 두 버튼만 두고, 누르면 입력칸이 아래에서 올라온다.
 * 이 파일은 add_stylesheet()로 넣지 않는다(테마 헤드에서 빠진다, .claude/rules/10-theme.md). quick-contact.php가 <link>를 직접 출력한다.
 */
/* 사이트 @font-face는 굵기마다 이름이 달라 font-weight로 고를 수 없어 굵기별로 다시 묶는다(sub/lecture/lecture.css와 같은 방식) */
@font-face { font-family: "QC Pretendard"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../theme/ybusiness_1/fonts/Pretendard-Regular.woff2") format("woff2"), url("../../theme/ybusiness_1/fonts/Pretendard-Regular.woff") format("woff"); }
@font-face { font-family: "QC Pretendard"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../theme/ybusiness_1/fonts/Pretendard-SemiBold.woff2") format("woff2"), url("../../theme/ybusiness_1/fonts/Pretendard-SemiBold.woff") format("woff"); }
@font-face { font-family: "QC Pretendard"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../theme/ybusiness_1/fonts/Pretendard-Bold.woff2") format("woff2"), url("../../theme/ybusiness_1/fonts/Pretendard-Bold.woff") format("woff"); }

.qc, .qc-space {
  --qc-red: #C23A31;
  --qc-red-dark: #A52F27;
  --qc-line: rgba(255, 255, 255, 0.28);
  --qc-muted: rgba(255, 255, 255, 0.6);
  --qc-h: 92px;
}
.qc-space { height: var(--qc-h); background: #1e1f23; }
.qc { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); border-top: 2px solid var(--qc-red); background: rgba(14, 15, 18, 0.96); color: #FFFFFF; font-family: "QC Pretendard", sans-serif; letter-spacing: -0.02em; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25); }
.qc { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
/* 문의 폼이 있는 페이지에서 그 폼이 화면에 보이는 동안은 바를 내린다(quick-contact.js) */
.qc.is-away { transform: translateY(110%); }
.qc *, .qc *::before, .qc *::after { box-sizing: border-box; }
.qc p { margin: 0; }
.qc__bar { --qc-gap: 28px; display: flex; align-items: center; gap: var(--qc-gap); max-width: 1320px; min-height: calc(var(--qc-h) - 2px); margin: 0 auto; padding: 0 max(16px, 3.3vw); }
@media (min-width: 1400px) { .qc__bar { padding: 0; } }
.qc__title { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; line-height: 1.3; }
.qc__title strong { font-size: 20px; font-weight: 700; }
.qc__title span { font-size: 13px; font-weight: 400; color: var(--qc-muted); }

/* 입력칸 줄 */
.qc__form { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 1 1 auto; min-width: 0; margin: 0; }
.qc__head, .qc__open, .qc__label { display: none; }
.qc__field { flex: 1 1 0; min-width: 0; max-width: 220px; margin: 0; }
.qc .qc__field input { width: 100%; height: 50px; margin: 0; padding: 0 16px; border: 1px solid var(--qc-line) !important; border-radius: 0; background: rgba(255, 255, 255, 0.04); box-shadow: none; font: inherit; font-size: 15px; color: #FFFFFF; transition: border-color 0.2s, background-color 0.2s; }
.qc .qc__field input::placeholder { color: rgba(255, 255, 255, 0.45); }
/* 테마의 input:focus가 테두리를 !important로 지우므로 같은 강도로 되살린다 */
.qc .qc__field input:focus { outline: 0; border-color: #FFFFFF !important; background: rgba(255, 255, 255, 0.08); box-shadow: none !important; }

/* 동의: 체크박스 + 보기 */
.qc__agree { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0 6px 0 8px; }
.qc__check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.85); white-space: nowrap; cursor: pointer; }
.qc__check input { position: relative; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.qc__check input:checked { border-color: var(--qc-red); background: var(--qc-red); }
.qc__check input:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.qc__check input:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.qc__more { padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--qc-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.qc__more:hover { color: #FFFFFF; }

/* 버튼 */
.qc__submit, .qc__go, .qc__open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; height: 50px; margin: 0; padding: 0 32px; border: 0; border-radius: 0; background: var(--qc-red); font: inherit; font-size: 16px; font-weight: 600; color: #FFFFFF; white-space: nowrap; cursor: pointer; transition: background-color 0.2s; }
.qc__open { display: none; }
.qc a.qc__go, .qc a.qc__go:hover { color: #FFFFFF; text-decoration: none; }
.qc__submit:hover, .qc__go:hover, .qc__open:hover { background: var(--qc-red-dark); }
.qc__submit[disabled] { opacity: 0.6; cursor: default; }
/* 폼으로 가는 버튼: 아래 화살표 */
.qc__go::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border: solid #FFFFFF; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.qc--cta .qc__go { margin-left: auto; }
.qc__tel { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; height: 50px; padding: 0 22px; border: 1px solid var(--qc-line); font-size: 15px; font-weight: 600; color: #FFFFFF; white-space: nowrap; transition: border-color 0.2s, background-color 0.2s; }
.qc a.qc__tel, .qc a.qc__tel:hover { color: #FFFFFF; text-decoration: none; }
.qc__tel::before { content: ""; flex: 0 0 15px; height: 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Cpath d='M5 3h4l2 5-2.5 1.5a11 11 0 0 0 6 6L16 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.qc__tel:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.qc__tel-text { color: var(--qc-muted); font-weight: 400; }
/* PC: 신청 버튼(또는 폼으로 가는 버튼) 바로 옆에 전화 버튼을 붙인다. 바의 간격만큼 당긴다 */
@media (min-width: 1025px) {
  .qc__tel { margin-left: calc(-1 * var(--qc-gap)); border-left: 0; }
}
.qc button:focus-visible, .qc a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

/* 동의 문구: 바 위로 펼쳐진다 */
.qc__terms { position: absolute; left: 0; right: 0; bottom: 100%; max-height: min(320px, 60vh); overflow-y: auto; padding: 18px max(16px, 3.3vw) 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); background: #16171b; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, 0.75); }
.qc__terms[hidden] { display: none; }
.qc__terms p { max-width: 1320px; margin: 0 auto 8px; }
.qc__terms a { display: block; max-width: 1320px; margin: 0 auto; color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* PC 폭이 좁으면 설명 줄·전화 앞 글자를 먼저 줄인다 */
@media (max-width: 1280px) and (min-width: 1025px) {
  .qc__title span, .qc__tel-text { display: none; }
  .qc__bar { --qc-gap: 18px; }
  .qc__form { gap: 8px; }
  .qc__submit { padding: 0 22px; }
}

/* 휴대폰·태블릿: 두 버튼만 보이고, [빠른 상담신청]을 누르면 입력칸이 아래에서 올라온다 */
@media (max-width: 1024px) {
  .qc, .qc-space { --qc-h: 74px; }
  .qc__bar { gap: 10px; padding: 0 16px; }
  .qc__title { display: none; }
  .qc__open, .qc__go { display: inline-flex; flex: 1 1 auto; height: 50px; }
  .qc--cta .qc__go { margin-left: 0; }
  .qc__tel { flex: 0 0 auto; height: 50px; padding: 0 18px; }
  .qc__tel-text { display: none; }
  /* 펼쳤을 때 뒤를 어둡게 */
  .qc.is-open::before { content: ""; position: fixed; z-index: 0; inset: 0; background: rgba(0, 0, 0, 0.55); }
  .qc__form { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 16px; max-height: calc(100vh - 60px); overflow-y: auto; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 2px solid var(--qc-red); background: #121317; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5); transform: translateY(105%); visibility: hidden; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.3s; }
  .qc.is-open .qc__form { transform: none; visibility: visible; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .qc__head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
  .qc__close { position: relative; width: 36px; height: 36px; margin-right: -8px; border: 0; background: none; cursor: pointer; }
  .qc__close::before, .qc__close::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 1.6px; background: #FFFFFF; transform: rotate(45deg); }
  .qc__close::after { transform: rotate(-45deg); }
  .qc__label { display: block; margin-bottom: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
  .qc__field { flex: none; max-width: none; }
  .qc .qc__field input { height: 48px; font-size: 16px; }
  .qc__agree { justify-content: space-between; margin: 4px 0 0; }
  .qc__submit { height: 52px; font-size: 17px; }
  .qc__terms { position: static; max-height: none; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.12); }
}
@media (prefers-reduced-motion: reduce) {
  .qc__form { transition: none !important; }
}
