/* ==========================================================================
   CORPORATEMART: BUSINESS SETUP ARCHITECT MODAL (CASHIFY MOMENT)
   Dedicated Modal-Type Conversational Chatbot
   ========================================================================== */

/* Modal Backdrop & Outer Wrapper */
.biz-planner-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10070;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.biz-planner-modal.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

body.biz-planner-open {
  overflow: hidden !important;
}

body.biz-planner-open #onLoadDualModal,
body.biz-planner-open .dual-popup-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.biz-planner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

/* Modal Dialog Window */
.biz-planner-dialog {
  position: relative;
  width: min(860px, 96vw);
  height: min(780px, 92vh);
  max-height: 92vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.biz-planner-modal.is-open .biz-planner-dialog {
  transform: scale(1) translateY(0);
}

/* Header */
.biz-planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 16px;
  flex-shrink: 0;
}

.biz-planner-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.biz-planner-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.biz-planner-avatar-badge {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.biz-planner-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.biz-planner-titles {
  min-width: 0;
}

.biz-planner-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #1d4ed8;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.biz-planner-tag {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  font-weight: 800;
}

.biz-planner-titles h2 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.biz-planner-titles p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-planner-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.biz-planner-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.biz-planner-action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.biz-planner-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.biz-planner-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* Chat Body */
.biz-planner-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  scroll-behavior: smooth;
}

.biz-planner-body::-webkit-scrollbar {
  width: 6px;
}

.biz-planner-body::-webkit-scrollbar-track {
  background: transparent;
}

.biz-planner-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.biz-planner-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Messages */
.biz-planner-msg-row {
  display: flex;
  gap: 12px;
  max-width: 86%;
  animation: bpMsgFadeIn 0.25s ease-out;
}

@keyframes bpMsgFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.biz-planner-msg-row.bot {
  align-self: flex-start;
}

.biz-planner-msg-row.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.biz-planner-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.biz-planner-bubble {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1e293b;
  position: relative;
  word-break: break-word;
}

.biz-planner-msg-row.bot .biz-planner-bubble {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.biz-planner-msg-row.user .biz-planner-bubble {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.biz-planner-msg-time {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.biz-planner-msg-row.user .biz-planner-msg-time {
  text-align: right;
  color: #94a3b8;
}

/* Quick Select Category Chips Container */
.biz-planner-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.biz-planner-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  padding: 7px 13px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.biz-planner-chip:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.biz-planner-chip:active {
  transform: translateY(0);
}

.biz-planner-chip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.biz-planner-chip.selected {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Typing row */
.biz-planner-typing-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.biz-planner-typing-bubble {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  border-top-left-radius: 4px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.biz-planner-dot {
  width: 7px;
  height: 7px;
  background: #94a3b8;
  border-radius: 50%;
  animation: bpDotPulse 1.2s infinite ease-in-out both;
}

.biz-planner-dot:nth-child(1) { animation-delay: -0.32s; }
.biz-planner-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bpDotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; background: #2563eb; }
}

/* -------------------------------------------------------------------------
   BUSINESS BLUEPRINT CARD
   ------------------------------------------------------------------------- */
.biz-planner-msg-row.blueprint-row {
  max-width: 100% !important;
  width: 100%;
}

.bp-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.bp-card-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
  color: #ffffff;
  padding: 18px 22px;
  position: relative;
}

.bp-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.bp-timeline {
  font-size: 12px;
  font-weight: 600;
  color: #dbeafe;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bp-card-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  color: #ffffff;
}

.bp-card-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bp-section {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.bp-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.bp-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bp-sec-title {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bp-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.bp-item:last-child {
  margin-bottom: 0;
}

.bp-item.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.bp-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.bp-item-head strong {
  font-size: 13px;
  color: #0f172a;
  font-weight: 750;
  line-height: 1.3;
}

.bp-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.bp-tag.mandatory {
  background: #fee2e2;
  color: #b91c1c;
}

.bp-tag.state {
  background: #fef3c7;
  color: #b45309;
}

.bp-tag.essential {
  background: #e0e7ff;
  color: #3730a3;
}

.bp-tag.crucial {
  background: #dcfce7;
  color: #15803d;
}

.bp-item p {
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  margin: 0;
}

/* Actions in the blueprint card */
.bp-card-actions {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
  box-sizing: border-box;
}

.bp-btn.quote-btn {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
}

.bp-btn.quote-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.bp-btn.pdf-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.bp-btn.pdf-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.bp-btn.wa-btn {
  background: #25d366;
  color: #ffffff !important;
}

.bp-btn.wa-btn:hover {
  background: #20bd5a;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.bp-btn.reset-btn {
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px;
}

.bp-btn.reset-btn:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* Modal Footer & Input */
.biz-planner-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.biz-planner-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.biz-planner-input {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  padding: 0 16px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s ease;
  font-family: inherit;
}

.biz-planner-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.biz-planner-send-btn {
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.biz-planner-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.42);
}

.biz-planner-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
  color: #64748b;
}

/* -------------------------------------------------------------------------
   DARK MODE ADAPTATION
   ------------------------------------------------------------------------- */
body.dark-mode .biz-planner-dialog {
  background: #0f172a;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px #1e293b;
}

body.dark-mode .biz-planner-header {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

body.dark-mode .biz-planner-titles h2 {
  color: #f8fafc;
}

body.dark-mode .biz-planner-titles p {
  color: #94a3b8;
}

body.dark-mode .biz-planner-action-btn {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .biz-planner-action-btn:hover {
  background: #334155;
  color: #ffffff;
}

body.dark-mode .biz-planner-close-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .biz-planner-body {
  background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
}

body.dark-mode .biz-planner-msg-row.bot .biz-planner-bubble {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .biz-planner-chip {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .biz-planner-chip:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

body.dark-mode .bp-card {
  background: #111c30;
  border-color: #2b3a51;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .bp-sec-title {
  color: #93c5fd;
}

body.dark-mode .bp-item {
  background: #172642;
  border-color: #243552;
}

body.dark-mode .bp-item.highlight {
  background: #1a2f55;
  border-color: #3b82f6;
}

body.dark-mode .bp-item-head strong {
  color: #f1f5f9;
}

body.dark-mode .bp-item p {
  color: #94a3b8;
}

body.dark-mode .bp-section {
  border-bottom-color: #1e2e4a;
}

body.dark-mode .bp-card-actions {
  background: #0f192b;
  border-top-color: #1e2e4a;
}

body.dark-mode .bp-btn.pdf-btn {
  background: #172642;
  color: #e2e8f0;
  border-color: #2e4468;
}

body.dark-mode .bp-btn.pdf-btn:hover {
  background: #1e3156;
}

body.dark-mode .biz-planner-footer {
  background: #0f172a;
  border-top-color: #1e293b;
}

body.dark-mode .biz-planner-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .biz-planner-input:focus {
  background: #17223b;
  border-color: #3b82f6;
}

body.dark-mode .biz-planner-footer-note {
  color: #64748b;
}

/* -------------------------------------------------------------------------
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .biz-planner-modal {
    padding: 0;
  }

  .biz-planner-dialog {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .biz-planner-header {
    padding: 12px 16px;
  }

  .biz-planner-titles h2 {
    font-size: 15px;
  }

  .biz-planner-action-btn span {
    display: none;
  }

  .biz-planner-body {
    padding: 16px;
  }

  .biz-planner-msg-row {
    max-width: 95%;
  }

  .biz-planner-footer {
    padding: 12px 16px;
  }

  .biz-planner-send-text {
    display: none;
  }

  .biz-planner-send-btn {
    padding: 0 14px;
  }
}

/* -------------------------------------------------------------------------
   PLANS SECTION CTA BUTTON GROUP & AI BADGE
   ------------------------------------------------------------------------- */
.bp-badge.hf-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(234, 88, 12, 0.4) 100%);
  border: 1px solid rgba(254, 215, 170, 0.6);
  color: #fff7ed;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.plans-custom-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.plans-custom-btn.plans-ai-planner-btn {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #0284c7 100%);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
  position: relative;
}

.plans-custom-btn.plans-ai-planner-btn:hover {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 50%, #0369a1 100%);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.42);
  transform: translateY(-2px);
}

.plans-btn-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

body.dark-mode .plans-custom-btn.plans-ai-planner-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
}

