/* =============================================
   북클래스 — 상담 신청 슬라이드 패널
   주 색상: #005f3d
   ============================================= */

/* ── 오버레이 ── */
.bc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.bc-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── 슬라이드 패널 (오른쪽에서 진입) ── */
.bc-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  z-index: 901;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bc-panel.open {
  transform: translateX(0);
}

/* ── 패널 헤더 ── */
.bc-panel-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid #e8f2ed;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}
.bc-panel-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bc-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eaf4ef;
  color: #004d31;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 10px;
  width: fit-content;
}
.bc-panel-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #005f3d;
}
.bc-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-top: 6px;
  line-height: 1.3;
}
.bc-panel-sub {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}
.bc-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #888;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.15s;
}
.bc-close:hover { color: #111; }

/* ── 패널 본문 ── */
.bc-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── 폼 필드 ── */
.bc-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bc-label {
  font-size: 13px;
  font-weight: 600;
  color: #222;
}
.bc-label span {
  color: #005f3d;
  margin-left: 2px;
}
.bc-input,
.bc-select {
  width: 100%;
  height: 46px;
  border: 1.5px solid #d4e6db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  color: #111;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.bc-input:focus,
.bc-select:focus {
  border-color: #005f3d;
  box-shadow: 0 0 0 3px rgba(0, 95, 61, 0.12);
}
.bc-input.error,
.bc-select.error {
  border-color: #d84040;
  box-shadow: 0 0 0 3px rgba(216, 64, 64, 0.1);
}
.bc-select-wrap {
  position: relative;
}
.bc-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #888;
  pointer-events: none;
}
.bc-field-error {
  font-size: 12px;
  color: #d84040;
  display: none;
}
.bc-field-error.show { display: block; }

/* ── 안심 문구 ── */
.bc-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f5faf7;
  border: 1px solid #c2dfd1;
  border-radius: 10px;
  padding: 12px 14px;
}
.bc-privacy-icon {
  font-size: 15px;
  color: #005f3d;
  flex-shrink: 0;
  margin-top: 1px;
}
.bc-privacy-text {
  font-size: 12px;
  color: #4a7a62;
  line-height: 1.6;
}

/* ── 제출 버튼 ── */
.bc-submit {
  width: 100%;
  height: 52px;
  background: #005f3d;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.bc-submit:hover { background: #004d31; }
.bc-submit:active { transform: scale(0.98); }
.bc-submit:disabled {
  background: #a0c4b4;
  cursor: not-allowed;
  transform: none;
}
.bc-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bc-spin 0.7s linear infinite;
  display: none;
}
.bc-submit.loading .bc-spinner { display: block; }
.bc-submit.loading .bc-submit-text { display: none; }
@keyframes bc-spin {
  to { transform: rotate(360deg); }
}

/* ── 완료 화면 ── */
.bc-success {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  gap: 14px;
}
.bc-success.show { display: flex; }
.bc-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eaf4ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.bc-success-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}
.bc-success-sub {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}
.bc-success-note {
  font-size: 12px;
  color: #005f3d;
  background: #eaf4ef;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
}

/* ── 오류 토스트 ── */
.bc-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #222;
  color: #fff;
  font-size: 13px;
  border-radius: 10px;
  padding: 12px 20px;
  z-index: 999;
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.bc-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── 반응형 ── */
@media (max-width: 480px) {
  .bc-panel { width: 100vw; }
  .bc-panel-header { padding: 22px 20px 16px; }
  .bc-panel-body { padding: 20px; }
}
