/* ==========================================================================
   Property Chat & 5-Step Journey Styles
   ========================================================================== */

:root {
  --pc-bg: #0f0e13;
  --pc-surface: #17151f;
  --pc-surface-2: #211d2b;
  --pc-border: rgba(255, 255, 255, 0.08);
  --pc-border-focus: rgba(165, 144, 123, 0.45);
  --pc-accent: #a5907b;
  --pc-accent-light: #baa48b;
  --pc-text: #f3f3f5;
  --pc-text-muted: #9590a5;
  --pc-step-1: #2563eb;
  --pc-step-2: #3b82f6;
  --pc-step-3: #10b981;
  --pc-step-4: #ef4444;
  --pc-step-5: #8b5cf6;
  --pc-step-6: #ef4444;
  --pc-step-7: #8b5cf6;
}

/* Header Avatar Badge & Pips */
.nav-user-avatar {
  position: relative;
}

.nav-user-unread-pip {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: #ef4444;
  border: 2px solid var(--pc-bg, #0f0e13);
  border-radius: 50%;
  animation: pcPulse 2s infinite;
}

.nav-chat-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.2;
  margin-left: auto;
}

.profile-chat-badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: auto;
}

@keyframes pcPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   Chat Page Layout & Containers
   ========================================================================== */

.pc-page {
  min-height: calc(100vh - 80px);
  padding: 24px 0 40px;
  background: radial-gradient(circle at 15% 15%, rgba(165, 144, 123, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.04) 0%, transparent 60%),
              var(--pc-bg);
  color: var(--pc-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pc-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Back & Property Header */
.pc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pc-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--pc-border);
  transition: all 0.2s ease;
}

.pc-back-link:hover {
  color: var(--pc-text);
  border-color: var(--pc-border-focus);
  background: rgba(255, 255, 255, 0.06);
}

.pc-property-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pc-property-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--pc-border);
}

.pc-property-meta h1 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #fff;
  letter-spacing: -0.01em;
}

.pc-property-sub {
  font-size: 13px;
  color: var(--pc-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 2-Column Main Workspace */
.pc-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .pc-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Left Column: 5-Step Property Journey
   ========================================================================== */

.pc-journey-panel {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 90px;
}

.pc-journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pc-journey-title {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pc-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pc-step-3), var(--pc-step-5) 50%, var(--pc-accent) 100%);
  transition: width 0.4s ease;
}

/* Step Accordions / Cards matching user's image */
.pc-steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pc-step-card {
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.25s ease;
  position: relative;
}

.pc-step-card.is-active {
  border-color: rgba(165, 144, 123, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, rgba(33, 29, 43, 0.95), rgba(23, 21, 31, 0.95));
}

.pc-step-card.is-completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.pc-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pc-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.pc-step-card[data-step="3"] .pc-step-badge { background: var(--pc-step-3); box-shadow: 0 0 14px rgba(37,99,235,0.4); }
.pc-step-card[data-step="4"] .pc-step-badge { background: var(--pc-step-4); box-shadow: 0 0 14px rgba(59,130,246,0.4); }
.pc-step-card[data-step="5"] .pc-step-badge { background: var(--pc-step-5); box-shadow: 0 0 14px rgba(16,185,129,0.4); }
.pc-step-card[data-step="6"] .pc-step-badge { background: var(--pc-step-6); box-shadow: 0 0 14px rgba(239,68,68,0.4); }
.pc-step-card[data-step="7"] .pc-step-badge { background: var(--pc-step-7); box-shadow: 0 0 14px rgba(139,92,246,0.4); }

.pc-step-info {
  flex: 1;
  margin-left: 10px;
}

.pc-step-info h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.pc-step-info p {
  font-size: 11.5px;
  color: var(--pc-text-muted);
  margin: 2px 0 0;
}

.pc-step-status-chip {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--pc-text-muted);
}

.pc-step-card.is-active .pc-step-status-chip {
  background: rgba(165, 144, 123, 0.2);
  color: var(--pc-accent-light);
  border: 1px solid rgba(165, 144, 123, 0.4);
}

.pc-step-card.is-completed .pc-step-status-chip {
  background: rgba(16, 185, 129, 0.15);
  color: var(--pc-step-5);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Step checklist sub-items */
.pc-step-items {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.pc-step-item-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--pc-text-muted);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-step-item-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.pc-item-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pc-step-item-btn.is-checked {
  color: #fff;
  background: rgba(16, 185, 129, 0.08);
}

.pc-step-item-btn.is-checked .pc-item-icon {
  background: var(--pc-step-5);
  border-color: var(--pc-step-5);
  color: #fff;
}

/* Quick Action Shortcuts inside Journey Panel */
.pc-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--pc-border);
}

.pc-quick-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(165, 144, 123, 0.12);
  border: 1px solid rgba(165, 144, 123, 0.3);
  color: var(--pc-accent-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.pc-quick-btn:hover {
  background: var(--pc-accent);
  color: #000;
  transform: translateY(-1px);
}

/* ==========================================================================
   Right Column: Real-time Chat & Drop Zone
   ========================================================================== */

.pc-chat-box {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  height: 740px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
}

.pc-chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--pc-border);
  background: rgba(23, 21, 31, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pc-agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pc-accent), var(--pc-accent-light));
  color: #000;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(165, 144, 123, 0.25);
  position: relative;
}

.pc-agent-avatar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid var(--pc-surface);
  border-radius: 50%;
}

.pc-agent-details strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.pc-agent-details span {
  font-size: 12px;
  color: var(--pc-text-muted);
}

.pc-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
}

.pc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pcPulse 2s infinite;
}

/* Chat Messages Stream */
.pc-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
}

.pc-messages-stream::-webkit-scrollbar {
  width: 6px;
}

.pc-messages-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* Message Bubbles */
.pc-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 82%;
  animation: pcMsgFadeIn 0.25s ease-out;
}

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

.pc-msg-row.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.pc-msg-row.is-agent {
  align-self: flex-start;
}

.pc-msg-row.is-system {
  align-self: center;
  max-width: 90%;
  margin: 6px 0;
}

.pc-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.pc-msg-row.is-user .pc-msg-bubble {
  background: linear-gradient(135deg, rgba(165, 144, 123, 0.35), rgba(165, 144, 123, 0.2));
  border: 1px solid rgba(165, 144, 123, 0.4);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.pc-msg-row.is-agent .pc-msg-bubble {
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  color: #eee;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.pc-msg-row.is-system .pc-msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--pc-text-muted);
  font-size: 12px;
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
}

.pc-msg-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--pc-accent-light);
  margin-bottom: 4px;
}

.pc-msg-time {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  text-align: right;
  display: block;
}

/* Attachments inside bubbles */
.pc-bubble-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.pc-att-image-thumb {
  max-width: 260px;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pc-att-image-thumb:hover {
  transform: scale(1.02);
}

.pc-att-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pc-att-file-pill:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: var(--pc-accent);
}

/* ==========================================================================
   Interactive Drop Zone & Composer
   ========================================================================== */

.pc-composer-area {
  background: var(--pc-surface);
  border-top: 1px solid var(--pc-border);
  padding: 14px 18px 16px;
  position: relative;
}

/* Drop Zone Staging Area */
.pc-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-dropzone.is-dragover {
  border-color: var(--pc-accent);
  background: rgba(165, 144, 123, 0.08);
  box-shadow: 0 0 20px rgba(165, 144, 123, 0.25);
  transform: scale(1.01);
}

.pc-dropzone-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--pc-text-muted);
}

.pc-dropzone-prompt strong {
  color: var(--pc-accent-light);
}

/* Staged Files Preview Strip */
.pc-staged-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pc-staged-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pc-surface-2);
  border: 1px solid rgba(165, 144, 123, 0.35);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12px;
  color: #fff;
  animation: pcMsgFadeIn 0.2s ease;
}

.pc-staged-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.pc-staged-remove {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}

.pc-staged-remove:hover {
  color: #ef4444;
}

/* Text Composer Row */
.pc-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.pc-input-wrapper {
  flex: 1;
  position: relative;
}

.pc-textarea {
  width: 100%;
  min-height: 48px;
  max-height: 140px;
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  line-height: 1.4;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pc-textarea:focus {
  border-color: var(--pc-border-focus);
  box-shadow: 0 0 12px rgba(165, 144, 123, 0.2);
}

.pc-attach-trigger-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pc-attach-trigger-btn:hover {
  color: #fff;
  border-color: var(--pc-border-focus);
  background: rgba(255, 255, 255, 0.08);
}

.pc-send-btn {
  background: linear-gradient(135deg, var(--pc-accent), var(--pc-accent-light));
  border: 0;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(165, 144, 123, 0.3);
}

.pc-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(165, 144, 123, 0.45);
}

.pc-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Step 3: "Enquire About This Property" Card for property show pages
   Matching the user's uploaded mockup
   ========================================================================== */

.pc-enquiry-card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-top: 18px;
}

.pc-enquiry-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.pc-enquiry-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pc-step-3);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
  flex-shrink: 0;
}

.pc-enquiry-title h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 2px;
  color: #fff;
}

.pc-enquiry-title p {
  font-size: 13px;
  color: var(--pc-text-muted);
  margin: 0;
}

.pc-enquiry-form .form-group {
  margin-bottom: 14px;
}

.pc-enquiry-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--pc-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pc-enquiry-form input,
.pc-enquiry-form select,
.pc-enquiry-form textarea {
  width: 100%;
  background: var(--pc-surface-2);
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pc-enquiry-form input:focus,
.pc-enquiry-form select:focus,
.pc-enquiry-form textarea:focus {
  border-color: var(--pc-border-focus);
  box-shadow: 0 0 10px rgba(165, 144, 123, 0.2);
}

.pc-enquiry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .pc-enquiry-row {
    grid-template-columns: 1fr;
  }
}

.pc-enquiry-submit-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.pc-enquiry-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}
