/* ================================================================
   Consultation Popup — Trademark Fortify
   ================================================================ */

/* ── Overlay ── */
.bk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.bk-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Card ── */
.bk-card {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0,0,0,0.04);
  transform: scale(0.88) translateY(24px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 94vh;
}
.bk-overlay.open .bk-card {
  transform: scale(1) translateY(0);
}

/* ── Scrollable body ── */
.bk-body {
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.bk-body::-webkit-scrollbar { width: 4px; }
.bk-body::-webkit-scrollbar-track { background: #f1f1f1; }
.bk-body::-webkit-scrollbar-thumb { background: #d0bafc; border-radius: 4px; }

/* ── Header ── */
.bk-header {
  background: linear-gradient(135deg, #3b0764 0%, #6200E0 100%);
  padding: 26px 28px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  flex-shrink: 0;
}
.bk-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.bk-header-text { flex: 1; }
.bk-header-text h2 {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin: 0 40px 5px 0;
  line-height: 1.3;
}
.bk-header-text p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
}
.bk-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.22s ease;
  flex-shrink: 0;
}
.bk-close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: rotate(90deg);
}

/* ── Form wrapper ── */
.bk-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Two-column row ── */
.bk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Field group ── */
.bk-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.bk-group:last-child { margin-bottom: 0; }

.bk-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #344054;
  letter-spacing: 0.01em;
}
.bk-req { color: #6200E0; }

/* ── Input with icon ── */
.bk-input-wrap { position: relative; }
.bk-input-wrap .bk-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #98A2B3;
  font-size: 13px;
  pointer-events: none;
  transition: color 0.2s ease;
}
.bk-input-wrap input,
.bk-input-wrap select {
  width: 100%;
  border: 1.5px solid #D0D5DD;
  border-radius: 9px;
  padding: 11px 14px 11px 38px;
  font-size: 14px;
  color: #101828;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  font-family: inherit;
  box-sizing: border-box;
  background: #FAFAFA;
  appearance: none;
  -webkit-appearance: none;
}
.bk-input-wrap input:focus,
.bk-input-wrap select:focus {
  border-color: #6200E0;
  box-shadow: 0 0 0 3px rgba(98, 0, 224, 0.1);
  background: #fff;
}
.bk-input-wrap:focus-within .bk-ico { color: #6200E0; }
.bk-input-wrap input::placeholder { color: #98A2B3; font-size: 13.5px; }

/* Select caret */
.bk-select-wrap { position: relative; }
.bk-select-wrap select {
  width: 100%;
  border: 1.5px solid #D0D5DD;
  border-radius: 9px;
  padding: 11px 38px 11px 14px;
  font-size: 14px;
  color: #101828;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  font-family: inherit;
  box-sizing: border-box;
  background: #FAFAFA;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.bk-select-wrap select:focus {
  border-color: #6200E0;
  box-shadow: 0 0 0 3px rgba(98, 0, 224, 0.1);
  background: #fff;
}
.bk-select-wrap::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #98A2B3;
  pointer-events: none;
  font-size: 13px;
}
.bk-select-wrap select option[value=""] { color: #98A2B3; }

/* ── Textarea ── */
.bk-textarea {
  width: 100%;
  border: 1.5px solid #D0D5DD;
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 14px;
  color: #101828;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
  box-sizing: border-box;
  background: #FAFAFA;
  line-height: 1.6;
}
.bk-textarea:focus {
  border-color: #6200E0;
  box-shadow: 0 0 0 3px rgba(98, 0, 224, 0.1);
  background: #fff;
}
.bk-textarea::placeholder { color: #98A2B3; font-size: 13.5px; }

/* ── Radio group ── */
.bk-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bk-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 9px 14px;
  border: 1.5px solid #D0D5DD;
  border-radius: 8px;
  background: #FAFAFA;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-size: 13.5px;
  color: #344054;
  font-weight: 500;
  flex: 1;
  min-width: 120px;
}
.bk-radio-label:hover {
  border-color: #9747E0;
  background: #FAF5FF;
}
.bk-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bk-radio-dot {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 2px solid #D0D5DD;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
  background: #fff;
}
.bk-radio-dot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6200E0;
  transform: scale(0);
  transition: transform 0.2s ease;
}
.bk-radio-label input:checked ~ .bk-radio-dot {
  border-color: #6200E0;
}
.bk-radio-label input:checked ~ .bk-radio-dot::after {
  transform: scale(1);
}
.bk-radio-label:has(input:checked) {
  border-color: #6200E0;
  background: #F5EDFF;
  box-shadow: 0 0 0 2px rgba(98, 0, 224, 0.08);
  color: #4a00b0;
  font-weight: 600;
}

/* urgency radios — stacked with different style */
.bk-urgency-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bk-urgency-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  border: 1.5px solid #D0D5DD;
  border-radius: 8px;
  background: #FAFAFA;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 13.5px;
  color: #344054;
  font-weight: 500;
}
.bk-urgency-label:hover {
  border-color: #9747E0;
  background: #FAF5FF;
}
.bk-urgency-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bk-urgency-label:has(input:checked) {
  border-color: #6200E0;
  background: #F5EDFF;
  color: #4a00b0;
  font-weight: 600;
}
.bk-urgency-dot {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 2px solid #D0D5DD;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
  background: #fff;
  flex-shrink: 0;
}
.bk-urgency-dot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6200E0;
  transform: scale(0);
  transition: transform 0.2s ease;
}
.bk-urgency-label input:checked ~ .bk-urgency-dot {
  border-color: #6200E0;
}
.bk-urgency-label input:checked ~ .bk-urgency-dot::after {
  transform: scale(1);
}
.bk-urgency-text { flex: 1; line-height: 1.3; }
.bk-urgency-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.bk-badge-urgent { background: #FEE2E2; color: #991B1B; }
.bk-badge-soon   { background: #FEF3C7; color: #92400E; }
.bk-badge-normal { background: #D1FAE5; color: #065F46; }
.bk-badge-info   { background: #E0F2FE; color: #0369A1; }

/* ── Checkboxes ── */
.bk-confirm-box {
  background: #F9F5FF;
  border: 1.5px solid #E9D7FE;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.bk-confirm-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #6200E0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.bk-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.bk-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bk-checkmark {
  width: 19px;
  height: 19px;
  min-width: 19px;
  border: 2px solid #C4B5FD;
  border-radius: 5px;
  margin-top: 1px;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
}
.bk-check-label input:checked ~ .bk-checkmark {
  background: #6200E0;
  border-color: #6200E0;
}
.bk-check-label input:checked ~ .bk-checkmark::after {
  content: '';
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}
.bk-check-text {
  font-size: 13px;
  color: #475467;
  line-height: 1.6;
}
.bk-check-text a {
  color: #6200E0;
  font-weight: 600;
  text-decoration: underline;
}
.bk-check-text a:hover { color: #4a00b0; }

/* ── Submit button ── */
.bk-submit-btn {
  width: 100%;
  background: #6200E0;
  border: 2px solid #6200E0;
  border-radius: 10px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease,
              box-shadow 0.25s ease, color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.bk-submit-btn:not(:disabled):hover {
  background: #4a00b0;
  border-color: #4a00b0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(98, 0, 224, 0.38);
}
.bk-submit-btn:disabled {
  background: #E4E7EC;
  border-color: #E4E7EC;
  color: #98A2B3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.bk-submit-btn.bk-success {
  background: #059669;
  border-color: #059669;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ── Shake animation on validation failure ── */
@keyframes bk-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.bk-group.bk-shake input,
.bk-group.bk-shake select,
.bk-group.bk-shake textarea,
.bk-group.bk-shake .bk-select-wrap select {
  animation: bk-shake 0.42s ease;
}

/* ── Validation error ── */
.bk-error {
  font-size: 12.5px;
  color: #D92D20;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  display: none;
}
.bk-group.bk-has-error input,
.bk-group.bk-has-error select,
.bk-group.bk-has-error textarea,
.bk-group.bk-has-error .bk-select-wrap select {
  border-color: #D92D20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}
.bk-group.bk-has-error .bk-error { display: flex; }

/* ── Success screen ── */
.bk-success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 36px;
  gap: 20px;
}
.bk-success-screen.visible { display: flex; }
.bk-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #059669;
  font-size: 30px;
  animation: bk-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes bk-pop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1);   opacity: 1; }
}
.bk-success-screen h2 {
  font-size: 24px;
  font-weight: 700;
  color: #101828;
  margin: 0;
}
.bk-success-screen p {
  font-size: 15px;
  color: #475467;
  line-height: 1.7;
  max-width: 400px;
  margin: 0;
}
.bk-success-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.bk-success-tag {
  background: #F9F5FF;
  border: 1px solid #DDD6FE;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: #5B21B6;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bk-success-btn {
  background: #6200E0;
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
  margin-top: 4px;
}
.bk-success-btn:hover { background: #4a00b0; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .bk-card { border-radius: 18px; max-height: 96vh; }
  .bk-header { padding: 20px; }
  .bk-header-text h2 { font-size: 18px; }
  .bk-form { padding: 20px; }
  .bk-row { grid-template-columns: 1fr; gap: 0; }
  .bk-radio-group { flex-direction: column; }
  .bk-radio-label { min-width: unset; flex: unset; }
  .bk-success-screen { padding: 40px 20px; }
}
