/* =========================================================
   전문가 상가 의뢰 — 사이드 플로팅 버튼 + 의뢰 접수 모달
   (토큰은 style.css 의 :root 변수를 사용)
   ========================================================= */

/* ---------- 사이드 플로팅 버튼 (스크롤해도 화면에 고정) ---------- */
.side-store {
  position: fixed; right: 20px; top: 50%; z-index: 45;
  transform: translateY(-50%);
  width: 124px; padding: 20px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 27, 51, .14);
  transition: transform .2s, box-shadow .2s;
}
.side-store:hover { transform: translateY(calc(-50% - 3px)); box-shadow: 0 16px 36px rgba(15, 27, 51, .18); }
.side-store__badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 1px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--teal); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1.7;
}
.side-store__icon {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; background: var(--blue-50);
}
.side-store__title { margin-top: 2px; font-size: 14px; font-weight: 800; line-height: 1.35; color: var(--navy); letter-spacing: -0.02em; }
.side-store__short { display: none; }
.side-store__desc { font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.side-store__cta {
  margin-top: 4px; width: 100%; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 700;
}

/* 본문과 겹치는 폭에서는 화면 끝에 붙는 세로 탭으로 */
@media (max-width: 1399px) {
  .side-store {
    right: 0; width: 50px; padding: 14px 0 16px; gap: 10px;
    border-right: 0; border-radius: 14px 0 0 14px;
  }
  .side-store:hover { transform: translateY(-50%) translateX(-3px); }
  .side-store__badge, .side-store__desc, .side-store__cta { display: none; }
  .side-store__icon { width: 34px; height: 34px; font-size: 19px; }
  .side-store__title { margin: 0; writing-mode: vertical-rl; font-size: 13.5px; letter-spacing: .06em; color: var(--blue); }
  .side-store__title br { display: none; }
}

/* ---------- 모달 ---------- */
.modal--store .modal__dialog { max-width: 680px; padding: 0; border-radius: 20px; overflow: hidden; }
.store { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.store__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 32px 28px 8px; }
.store__head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); outline: none; }
.store__head p { margin-top: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.55; color: #5b6472; }

.sfield { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.sfield { margin-top: 24px; }
fieldset.sfield legend { padding: 0; margin-bottom: 8px; }
.sfield--full { grid-column: 1 / -1; }
.sfield__label { font-size: 13.5px; font-weight: 700; color: var(--ink); }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px;
  border: 1px solid #cfd6e0; border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
  transition: border-color .12s, background-color .12s, color .12s;
}
.radio-card:hover { border-color: #b9c9ea; }
.radio-card input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.store__grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.store .input, .store .select { height: 44px; padding: 0 14px; font-size: 14.5px; border-color: #cfd6e0; }
.store .select { padding-right: 40px; background-position: right 14px center; font-weight: 600; }
.store .textarea { min-height: 112px; padding: 12px 14px; font-size: 14.5px; border-color: #cfd6e0; }
.store .is-invalid { border-color: var(--danger); }
.store .is-invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }

.store__note { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.store__agree { margin-top: 16px; padding: 16px 18px; border: 1px solid #dfe5ee; border-radius: 12px; background: #f8fafc; transition: border-color .12s, background-color .12s; }
.store__agree .check span { font-size: 14px; font-weight: 700; color: var(--ink); }
.store__agree.is-invalid { border-color: var(--danger); background: #fff7f7; }
.store__terms { margin: 6px 0 0 32px; font-size: 12.5px; font-weight: 700; color: var(--blue); }
.store__terms:hover { text-decoration: underline; }
.store .form-error { margin-top: 12px; }

.store__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 24px; }
.store__foot .btn { height: 46px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.btn--soft { background: #eef1f6; color: var(--ink-2); }
.btn--soft:hover { background: #e3e7ee; color: var(--ink); }

.store-done { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 40px 28px 28px; text-align: center; }
.store-done .summary { margin-bottom: 22px; }

/* ---------- 모바일 ---------- */
@media (max-width: 640px) {
  .side-store {
    top: auto; bottom: calc(124px + env(safe-area-inset-bottom)); right: 12px;
    transform: none; width: auto; padding: 9px 14px 9px 10px; gap: 6px;
    flex-direction: row; border: 1px solid var(--line); border-radius: 999px;
  }
  .side-store:hover { transform: none; }
  .side-store__icon { width: 28px; height: 28px; font-size: 16px; }
  .side-store__title { display: none; }
  .side-store__short { display: block; font-size: 13px; font-weight: 800; color: var(--navy); white-space: nowrap; }

  .modal--store .modal__dialog { border-radius: 22px 22px 0 0; }
  .store__body { padding: 24px 18px 8px; }
  .store__head h2 { font-size: 22px; }
  .store__grid { grid-template-columns: 1fr; gap: 14px; }
  .store .input, .store .select, .store .textarea { font-size: 16px; } /* iOS 확대 방지 */
  .store__foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .store__foot .btn--soft { flex: 0 0 96px; }
  .store__foot .btn--primary { flex: 1; }
  .store-done { padding: 32px 18px calc(20px + env(safe-area-inset-bottom)); }
}
