/* ========================================
   MOCK CHAT SECTION - NEW DESIGN
   ======================================== */

.mock-chat-section {
  padding-top: var(--spacing-xl);
  padding-bottom: 0;
  max-width: calc(var(--section-width) + 100px);
  margin: 0 auto;
}

/* Header */
.mock-chat-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.mock-chat-badge {
  display: inline-block;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #6c757d;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

/* Container */
.mock-chat-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

/* Steps Sidebar */
.mock-chat-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.mock-chat-step {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  border: 1px solid #e9ecef;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  min-height: 6rem;
}

.mock-chat-step:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--text-primary);
}

.mock-chat-step.active {
  background: #fff;
  color: #111;
  border-color: #333;
}

.mock-chat-step.completed {
  background: transparent;
  color: #111;
  border-color: #bbb;
  opacity: 1;
}

.mock-chat-step.inactive {
  background: transparent;
  color: #666;
  border-color: #e0e0e0;
  opacity: 0.8;
}
.mock-chat-step:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--text-primary);
}

.mock-chat-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--border-radius-full);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
}

.mock-chat-step-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  position: absolute;
  transition: all 0.3s ease;
}

.mock-chat-step-icon .section-icon,
.mock-chat-step-icon .check-icon {
  opacity: 0;
  transform: scale(0.8);
}

.mock-chat-step.active .mock-chat-step-icon .section-icon,
.mock-chat-step.inactive .mock-chat-step-icon .section-icon {
  opacity: 1;
  transform: scale(1);
}

.mock-chat-step.completed .mock-chat-step-icon .check-icon {
  opacity: 1;
  transform: scale(1);
}

.mock-chat-step.active .mock-chat-step-icon {
  background: #333;
}

.mock-chat-step.completed .mock-chat-step-icon {
  background: #333;
}

.mock-chat-step.inactive .mock-chat-step-icon {
  background: #e0e0e0;
}

.mock-chat-step-icon .icon {
  filter: brightness(0) invert(1);
}

.mock-chat-step.inactive .mock-chat-step-icon .icon {
  filter: brightness(0) opacity(0.4);
}

/* Icon paths */
.icon-message-circle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z'/%3E%3C/svg%3E");
}

.icon-file-text {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
}

.icon-check {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.icon-check-circle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
}

.icon-messages-square {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='16' x='4' y='4' rx='2'/%3E%3Cpath d='M4 13h16'/%3E%3Cpath d='M4 9h16'/%3E%3Cpath d='M4 17h10'/%3E%3C/svg%3E");
}

.icon-calendar-check {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='16' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E");
}

.icon-message-chat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v5Z'/%3E%3Cpath d='M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1'/%3E%3C/svg%3E");
}

.icon-check-square {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.mock-chat-step-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: block;
  position: absolute;
  transition: all 0.3s ease;
}

.mock-chat-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.mock-chat-step-title {
  font-weight: 600;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.2;
}

.mock-chat-step-desc {
  font-size: 1rem;
  opacity: 0.8;
  line-height: 1.4;
  margin: 0;
}

/* Chat Interface */
.mock-chat-interface {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: var(--spacing-md);
  box-sizing: border-box;
  /* Set exact height to match user's specification */
  max-height: 666px;
  min-height: 666px;
}

/* Remove the old tabs container styles since it's merged */
.mock-chat-tabs-container {
  /* This class is no longer used */
}

/* Chat Content */
.mock-chat-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.mock-chat-window {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Messages Container */
.mock-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md) var(--spacing-sm);
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  min-height: 16rem;
  max-height: 100%;
}

.mock-chat-messages::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Remove the last-child margin since padding handles it now */
.mock-chat-message:last-child {
  margin-bottom: 0;
}

.mock-chat-message {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-sm);
  animation: messageSlideIn 0.5s ease-out;
  width: 100%;
  font-size: var(--text-sm) !important;
}

.mock-chat-message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.mock-chat-message.consul {
  flex-direction: row;
  justify-content: flex-start;
}

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

.mock-chat-message-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.mock-chat-message-avatar img {
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
}

.mock-chat-message.consul .mock-chat-message-avatar {
  background: #000;
  /* padding: 0.375rem; */
  box-sizing: content-box;
}

.mock-chat-message.consul .mock-chat-message-avatar img {
  width: 0.9rem;
  height: 0.9rem;
  filter: brightness(0) invert(1);
  padding-left: 2px;
}

.mock-chat-message-content {
  max-width: 70%;
  font-size: var(--text-sm) !important;
}

.mock-chat-bubble {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 20px;
  font-size: var(--text-sm) !important;
  line-height: 1.4;
  font-weight: 500;
}

.mock-chat-bubble.user {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  margin-left: auto;
  border-radius: 20px 20px 0 20px;
  text-align: left;
  font-size: var(--text-sm) !important;
}

.mock-chat-bubble.consul {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  text-align: left;
  border-radius: 20px 20px 20px 0;
  font-size: var(--text-sm) !important;
}

.mock-chat-bubble p {
  margin: 0;
  font-size: var(--text-sm) !important;
}

/* User avatar styles */
.mock-chat-message.user .mock-chat-message-avatar {
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mock-chat-message.user .mock-chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Time Skip Indicator */
.mock-chat-time-skip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: calc(var(--spacing-md) * 0.1);
}

.mock-chat-time-skip::before,
.mock-chat-time-skip::after {
  content: '';
  flex: 0 0 100px;
  height: 1px;
  background: linear-gradient(to right, transparent, #ccc 20%, #ccc 80%, transparent);
  background-image: repeating-linear-gradient(
    to right,
    #ccc 0,
    #ccc 4px,
    transparent 4px,
    transparent 8px
  );
}

.mock-chat-time-skip::before {
  margin-right: var(--spacing-md);
}

.mock-chat-time-skip::after {
  margin-left: var(--spacing-md);
}

.mock-chat-time-skip-text {
  font-size: var(--text-xs);
  color: #bbb;
  white-space: nowrap;
  font-style: italic;
  font-weight: 400;
}

/* Documents */
.mock-chat-documents {
  margin-top: var(--spacing-xs);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  text-align: left;
  font-size: var(--text-sm) !important;
}

.mock-chat-document {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm) var(--spacing-sm);
  transition: all 0.2s ease;
  animation: documentSlideIn 0.3s ease-out;
  font-size: var(--text-sm) !important;
}

@keyframes documentSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mock-chat-document svg {
  width: 0.9rem;
  height: 0.9rem;
}

.mock-chat-document span {
  font-size: var(--text-sm) !important;
  font-weight: 500;
  color: #333;
  flex: 1;
}

/* Typing Indicator */
.mock-chat-typing {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
}

.mock-chat-typing-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #6c757d;
  border-radius: var(--border-radius-full);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.mock-chat-typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.mock-chat-typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Progress Indicator */
.mock-chat-progress {
  position: absolute;
  bottom: calc(-1 * var(--spacing-lg));
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: var(--spacing-sm);
}

.mock-chat-progress-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--border-radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mock-chat-progress-dot:hover {
  transform: scale(1.25);
}

.mock-chat-progress-dot.active {
  background: #333;
}

.mock-chat-progress-dot.completed {
  background: #6c757d;
}

.mock-chat-progress-dot:not(.active):not(.completed) {
  background: #e9ecef;
}

.mock-chat-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-direction: column;
  margin-top: var(--spacing-md);
}

.mock-chat-actions .btn {
  font-size: var(--text-base);
  padding: 0.6em 1em !important;
  white-space: nowrap;
  position: relative; /* Ensure proper positioning context for the badge */
}

/* Ensure WhatsApp button with coming-soon badge has same height as Telegram button */
.mock-chat-actions .btn:has(.coming-soon-badge) {
  /* padding-top: 0.8em !important; /* Extra padding to account for badge space */
  /* padding-bottom: 0.8em !important; */
  min-height: 3.1em; /* Ensure minimum height matches other buttons */
  border-color: #cbcdcf;
}

/* Adjust coming-soon badge positioning within mock-chat-actions */
.mock-chat-actions .coming-soon-badge {
  top: -8px !important; /* Slightly less negative to keep within button bounds */
}

/* Platform Actions - Hero Style Buttons */
.mock-chat-tab-content .hero-actions {
  margin-top: 1rem;
  flex-shrink: 0;
  display: flex;
  gap: var(--spacing-md);
  flex-direction: column;
}

.mock-chat-tab-content .hero-actions button {
  flex: 1;
}

/* ========================================
   MOCK CHAT SECTION - MEDIA QUERIES
   ======================================== */

/* Medium devices (1100px and down) */
@media (max-width: 1100px) {
  .mock-chat-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .mock-chat-steps {
    order: 1;
  }

  .mock-chat-interface {
    order: 2;
    /* Maintain exact height on medium screens */
    max-height: 666px;
    min-height: 666px;
  }

  .mock-chat-messages {
    min-height: 14rem;
  }
}

/* Mobile (640px and down) */
@media (max-width: 640px) {
  .mock-chat-section {
    padding-top: var(--spacing-xl);
    padding-bottom: 0;
    padding-left: var(--content-padding-mobile);
    padding-right: var(--content-padding-mobile);
  }

  .mock-chat-header {
    margin-bottom: var(--spacing-xl);
  }

  .mock-chat-interface {
    /* Maintain exact height on mobile */
    max-height: 610px;
    min-height: 610px;
  }

  .mock-chat-step {
    padding: var(--spacing-md);
  }

  .mock-chat-step-icon {
    width: 2rem;
    height: 2rem;
  }

  .mock-chat-step-icon i {
    width: 1rem;
    height: 1rem;
  }

  .mock-chat-tab-content .hero-actions {
    margin-top: 1rem;
    flex-direction: column;
    /* gap: var(--spacing-sm); */
  }

  .mock-chat-tab-content .hero-actions button {
    font-size: 0.875rem;
    width: 100%;
  }

  .mock-chat-messages {
    padding: var(--spacing-md) var(--spacing-sm);
    min-height: 12rem;
  }

  .mock-chat-message {
    font-size: var(--text-sm) !important;
  }

  .mock-chat-message-content {
    font-size: var(--text-sm) !important;
  }

  .mock-chat-bubble {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--text-sm) !important;
  }

  .mock-chat-bubble p {
    font-size: var(--text-sm) !important;
  }

  .mock-chat-documents {
    font-size: var(--text-sm) !important;
  }

  .mock-chat-document {
    padding: var(--spacing-sm);
    font-size: var(--text-sm) !important;
  }

  .mock-chat-document span {
    font-size: var(--text-sm) !important;
  }

  .mock-chat-progress {
    bottom: calc(-1 * var(--spacing-md));
    padding: var(--spacing-xs) var(--spacing-md);
  }

  .mock-chat-progress-dot {
    width: 0.375rem;
    height: 0.375rem;
  }

  /* Mobile-specific styling for Online badge */
  .platform-status {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 14px !important; /* Half of height (4px padding * 2 + ~6px text height) */
  }

  .platform-status > div {
    width: 6px !important;
    height: 6px !important;
    margin-right: 4px !important;
  }

  .platform-status span {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }
}
