/* Realtor Property Styles */

/* Base Styles */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #777;
  --text-color: #333;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --border-radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f9f9f9;
  padding: 0 20px 20px 20px; /* Top padding removed to allow floating bar at top */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.sticky-offer-summary {
  position: sticky;
  top: 80px;
  z-index: 15;
  background: #ffffff;
  border: 1px solid var(--medium-gray);
  border-radius: 10px;
  padding: 18px;
  margin: 20px 20px 0 20px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.offer-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.offer-summary-top h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin: 0;
}

.offer-summary-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  background: rgba(79, 70, 229, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.offer-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.offer-summary-item {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.offer-summary-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}

.offer-summary-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.offer-summary-item .value.accent {
  color: #2563eb;
}

.offer-summary-item .subtext {
  font-size: 0.75rem;
  color: #475569;
}

.holding-controls {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 12px;
}

.holding-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.holding-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.holding-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: white;
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.holding-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(37, 99, 235, 0.5);
}

.holding-btn.active {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.holding-summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

.holding-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 6px;
}

.offer-strategy-snippet {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.2);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  font-size: 0.85rem;
}

.offer-strategy-snippet strong {
  display: block;
  font-size: 0.9rem;
  color: #be185d;
}

h1,
h2,
h3,
h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: var(--primary-color);
  color: white;
}

header h1 {
  color: white;
  margin-bottom: 0;
  font-size: 1.8rem;
}

/* DOM Badge */
.dom-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  white-space: nowrap;
}

.dom-badge.fresh {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-color: #38f9d7;
}

.dom-badge.moderate {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  border-color: #fda085;
}

.dom-badge.stale {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f5576c;
}

.status-badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  background-color: var(--secondary-color);
}

.status-active {
  background-color: #27ae60;
}

.status-pending {
  background-color: #f39c12;
}

.status-sold {
  background-color: var(--accent-color);
}

.status-contingent {
  background-color: #9b59b6;
}

/* Property Gallery */
.property-gallery {
  position: relative;
  background-color: var(--light-gray);
}

.main-image-container {
  position: relative;
  height: 500px;
  overflow: hidden;
}

#mainImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#mainImage:hover {
  transform: scale(1.02);
}

.image-navigation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  pointer-events: none;
}

.nav-button {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.3s ease;
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.thumbnail-gallery {
  display: flex;
  overflow-x: auto;
  padding: 10px;
  background-color: var(--primary-color);
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) var(--primary-color);
}

.thumbnail-gallery::-webkit-scrollbar {
  height: 8px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
  background: var(--primary-color);
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  border-radius: 4px;
}

.thumbnail {
  flex: 0 0 auto;
  width: 80px;
  height: 60px;
  margin-right: 10px;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.thumbnail.active {
  border-color: var(--secondary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-images {
  color: white;
  padding: 10px;
  text-align: center;
}

/* Property Overview */
.property-overview {
  padding: 20px;
  border-bottom: 1px solid var(--medium-gray);
}

.price-section {
  margin-bottom: 15px;
}

.price-and-status {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.property-price {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0;
}

.price-history {
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.last-updated {
  font-size: 0.8rem;
  color: var(--dark-gray);
  margin-top: 5px;
  font-style: italic;
}

.key-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.detail-item i {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

/* Property Details Container */
.property-details-container {
  padding: 20px;
}

.property-location,
.property-details,
.property-description,
.agent-info {
  margin-bottom: 30px;
}

.address,
.neighborhood,
.county {
  margin-bottom: 5px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.detail-row {
  display: flex;
  border-bottom: 1px solid var(--medium-gray);
  padding-bottom: 5px;
}

.detail-label {
  font-weight: bold;
  min-width: 120px;
}

.description-text {
  line-height: 1.8;
  white-space: pre-line;
}

/* Agent Info */
.agent-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.agent-section,
.office-section,
.broker-section {
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.agent-name,
.office-name,
.broker-name {
  font-weight: bold;
  margin-bottom: 5px;
}

/* External Links */
.external-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background-color: var(--light-gray);
}

.external-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease;
}

.external-link i {
  margin-right: 8px;
}

.external-link:hover {
  background-color: #2980b9;
  text-decoration: none;
}

.property-page-button {
  background-color: #27ae60 !important;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  margin-left: 10px;
}

.property-page-button:hover {
  background-color: #219a52 !important;
}

.force-update-button {
  background-color: #f39c12 !important;
  margin-left: 10px;
}

.force-update-button:hover {
  background-color: #e67e22 !important;
}

.force-update-button:disabled {
  background-color: #bdc3c7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.force-update-button.updating {
  background-color: #27ae60 !important;
}

.force-update-button.updating i {
  animation: spin 1s linear infinite;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.modal.show {
  display: flex;
}

#loginModal {
  display: none;
}

#loginModal .modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  margin: 0 auto;
  position: relative;
}

#loginModal .close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 15px;
  top: 10px;
  cursor: pointer;
}

#loginModal .close:hover,
#loginModal .close:focus {
  color: #000;
  text-decoration: none;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

#loginForm input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#loginForm button {
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#loginForm button:hover {
  background-color: #0056b3;
}

/* Image Modal Styles */
#imageModal .modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

#modalCaption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Error Message */
.error-message {
  padding: 50px 20px;
  text-align: center;
}

.error-message h2 {
  color: var(--accent-color);
  margin-bottom: 20px;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 15px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: var(--border-radius);
}

.back-link:hover {
  background-color: #2980b9;
  text-decoration: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .main-image-container {
    height: 300px;
  }

  .price-and-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .property-price {
    font-size: 1.5rem;
  }

  .key-details {
    justify-content: space-between;
  }

  .detail-item {
    min-width: 70px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .agent-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-badge {
    margin-top: 10px;
  }

  .main-image-container {
    height: 200px;
  }

  .nav-button {
    width: 30px;
    height: 30px;
  }

  .external-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Add these styles at the end of your CSS file */

/* Property Analysis Styles */
.property-analysis-container {
  padding: 20px;
  border-top: 1px solid var(--medium-gray);
  margin-top: 20px;
}

.analysis-status {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: bold;
}

.analysis-status.completed {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.analysis-status.pending {
  background-color: #fff8e1;
  color: #f57f17;
}

.analysis-status.error {
  background-color: #ffebee;
  color: #c62828;
}

.analysis-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.analysis-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.analysis-score {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  color: white;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 50%;
  margin-bottom: 10px;
}

.score-label {
  text-align: center;
  font-weight: bold;
}

.analysis-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.summary-item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-label {
  font-weight: bold;
  min-width: 180px;
}

.analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--medium-gray);
}

.tab-button {
  padding: 10px 15px;
  background-color: var(--light-gray);
  border: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tab-button:hover {
  background-color: var(--medium-gray);
}

.tab-button.active {
  background-color: var(--secondary-color);
  color: white;
}

.analysis-content {
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: 0 var(--border-radius) var(--border-radius)
    var(--border-radius);
  padding: 12px 15px;
  margin: 0;
  min-height: 300px;
  margin-bottom: 15px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.analysis-text {
  line-height: 1.8;
  white-space: pre-line;
}

.analysis-date {
  text-align: right;
  font-style: italic;
  color: var(--dark-gray);
  font-size: 0.9rem;
}

/* Responsive styles for analysis section */
@media (max-width: 768px) {
  .analysis-overview {
    flex-direction: column;
    align-items: center;
  }

  .analysis-tabs {
    justify-content: center;
  }

  .tab-button {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .tab-button {
    flex: 0 0 calc(50% - 5px);
  }
}

/* Concise Summary Tab Styles */
.concise-summary-content {
  padding: 10px;
}

.concise-summary-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.concise-summary-item {
  padding: 12px;
  border-left: 4px solid var(--secondary-color);
  background-color: var(--light-gray);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.summary-item-label {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
  font-size: 0.95em;
}

.summary-item-value {
  line-height: 1.5;
  color: var(--dark-gray);
}

.no-concise-summary {
  text-align: center;
  padding: 40px 20px;
  color: var(--dark-gray);
}

.no-concise-summary h4 {
  margin: 10px 0;
  color: var(--dark-gray);
}

/* Property Details Tab Styles */
.property-details-content {
  padding: 10px;
}

.detail-section {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 15px;
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h5 {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.detail-list {
  margin: 0;
  padding-left: 20px;
}

.detail-list li {
  margin-bottom: 5px;
  line-height: 1.4;
}

.no-property-details {
  text-align: center;
  padding: 40px 20px;
  color: var(--dark-gray);
}

.no-property-details h4 {
  margin: 10px 0;
  color: var(--dark-gray);
}

/* Add these styles for the modal navigation buttons */
.modal-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 1010;
}

.modal-nav-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Add styles for the analysis error message */
.analysis-error {
  padding: 20px;
  background-color: #ffebee;
  border-radius: var(--border-radius);
  color: #c62828;
  margin-bottom: 20px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.summary-table th {
  width: 25%;
  text-align: left;
  padding: 8px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  vertical-align: top;
}

.summary-table td {
  padding: 8px;
  border: 1px solid #ddd;
  vertical-align: top;
}

.summary-table ul {
  margin: 0;
  padding-left: 20px;
}

.factors-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.positive-factors,
.negative-factors {
  flex: 1;
  padding: 15px;
  border-radius: 5px;
}

.positive-factors {
  background-color: #e8f5e9;
}

.negative-factors {
  background-color: #ffebee;
}

.positive-factors h4,
.negative-factors h4 {
  margin-top: 0;
}

.analysis-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.analysis-summary-table tr {
  border-bottom: 1px solid #eee;
}

.analysis-summary-table td {
  padding: 8px 12px;
}

.analysis-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.condition-score,
.trim-level,
.renovation-cost {
  padding: 8px 12px;
  background-color: #f8f8f8;
  border-radius: 4px;
  flex: 1;
  min-width: 200px;
}

/* Add these styles for the analysis images */
.analysis-image-gallery {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.analysis-image-gallery h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.analysis-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-image-container {
  flex: 0 0 calc(33.333% - 10px);
  max-width: calc(33.333% - 10px);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.analysis-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.analysis-image:hover {
  transform: scale(1.05);
}

/* Responsive styles for analysis images */
@media (max-width: 768px) {
  .analysis-image-container {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .analysis-image-container {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Add styles for the analysis header and run analysis button */
.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

/* Loading indicators for images */
.main-image-container.loading {
  position: relative;
}

.main-image-container.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.main-image-container.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  border: 4px solid #fff;
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  z-index: 3;
  animation: spin 1s linear infinite;
}

.thumbnail.loading {
  position: relative;
}

.thumbnail.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.thumbnail.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #fff;
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  z-index: 2;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.detail-row-full {
  grid-column: span 2;
}

.property-details-pre {
  white-space: pre-wrap;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 4px;
}

/* Renovations Tab Styles */
.renovations-content {
  padding: 20px 0;
}

.renovations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--medium-gray);
}

.renovations-header h4 {
  margin-bottom: 0;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.renovations-total {
  background-color: var(--light-gray);
  padding: 10px 15px;
  border-radius: var(--border-radius);
  border: 2px solid var(--secondary-color);
  font-weight: bold;
  color: var(--primary-color);
}

.renovations-total .cost-amount {
  color: #333;
  font-size: 1.1rem;
}

.renovations-list {
  display: grid;
  gap: 10px;
}

.renovation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: white;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition:
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

.renovation-item:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.renovation-item-info {
  flex: 1;
}

.renovation-item-name {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1rem;
}

.renovation-item-meta {
  font-size: 0.85rem;
  color: var(--dark-gray);
}

.renovation-item-cost {
  font-weight: bold;
  color: #333;
  font-size: 1.1rem;
  text-align: right;
  min-width: 120px;
}

.loading-text {
  text-align: center;
  color: var(--dark-gray);
  font-style: italic;
  padding: 40px 20px;
}

.no-renovations {
  text-align: center;
  color: var(--dark-gray);
  padding: 40px 20px;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  border: 1px dashed var(--medium-gray);
}

/* Responsive styles for renovations */
@media (max-width: 768px) {
  .renovations-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }

  .renovation-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .renovation-item-cost {
    text-align: center;
    font-size: 1.2rem;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .renovations-content {
    padding: 15px 0;
  }

  .renovation-item {
    padding: 12px;
  }

  .renovations-total {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Analysis Summary */
.analysis-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.summary-label {
  font-weight: 600;
  color: #333;
}

.summary-value {
  font-weight: 500;
  color: #007bff;
  text-align: right;
}

.calculation-method {
  font-size: 0.7rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.condition-description {
  font-size: 0.85rem;
  color: #007bff;
  font-weight: 600;
  margin-left: 0.5rem;
}

.trim-level-value {
  font-size: 0.85rem;
  color: #007bff;
  font-weight: 600;
  margin-left: 0.5rem;
}

.renovation-cost-value {
  font-size: 0.85rem;
  color: #007bff;
  font-weight: 600;
  margin-left: 0.5rem;
}

.calculation-method:empty,
.calculation-method:contains('--') {
  display: none;
}

/* ============================================================================
   Flip Analysis Tab Styles
   ============================================================================ */

.flip-analysis-content {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.flip-analysis-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--medium-gray);
}

.flip-analysis-header h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.analysis-subtitle {
  color: var(--dark-gray);
  font-size: 0.95rem;
}

.flip-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.flip-metric-card {
  background: white;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.flip-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flip-metric-card.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.flip-metric-card.highlight .metric-label,
.flip-metric-card.highlight .metric-value {
  color: white;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.flip-metric-card.highlight .metric-label {
  opacity: 0.9;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.metric-subtext {
  font-size: 0.75rem;
  color: var(--dark-gray);
  margin-top: 5px;
  opacity: 0.8;
}

.flip-metric-card.highlight .metric-subtext {
  color: white;
  opacity: 0.9;
}

/* ROI Color Classes - High specificity to override .financial-item .value */
.financial-item .value.roi-excellent,
span.roi-excellent,
.roi-excellent {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

.financial-item .value.roi-good,
span.roi-good,
.roi-good {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

.financial-item .value.roi-fair,
span.roi-fair,
.roi-fair {
  background: linear-gradient(135deg, #fdc830 0%, #f37335 100%) !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

.financial-item .value.roi-poor,
span.roi-poor,
.roi-poor {
  background: linear-gradient(135deg, #f85032 0%, #e73827 100%) !important;
  color: #ffffff !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

.roi-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: #1f2937;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.roi-pill.roi-excellent {
  background: rgba(17, 153, 142, 0.12) !important;
  color: #0f766e !important;
  border-color: rgba(17, 153, 142, 0.25);
}

.roi-pill.roi-good {
  background: rgba(79, 172, 254, 0.12) !important;
  color: #1d4ed8 !important;
  border-color: rgba(79, 172, 254, 0.25);
}

.roi-pill.roi-fair {
  background: rgba(253, 200, 48, 0.18) !important;
  color: #b45309 !important;
  border-color: rgba(253, 200, 48, 0.3);
}

.roi-pill.roi-poor {
  background: rgba(248, 80, 50, 0.15) !important;
  color: #b91c1c !important;
  border-color: rgba(248, 80, 50, 0.3);
}

.flip-property-details,
.flip-investment-summary {
  background: white;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.flip-property-details h4,
.flip-investment-summary h4 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-gray);
}

.property-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--light-gray);
}

.detail-label {
  font-weight: 600;
  color: var(--dark-gray);
}

.detail-value {
  color: var(--text-color);
}

.investment-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: var(--light-gray);
  border-radius: 4px;
  font-size: 1rem;
}

.breakdown-row.total {
  background: #e3f2fd;
  font-weight: 600;
  font-size: 1.1rem;
  border: 2px solid #2196f3;
}

.breakdown-row.arv {
  background: #f3e5f5;
  font-weight: 600;
  border: 2px solid #9c27b0;
}

.breakdown-row.profit {
  background: #e8f5e9;
  font-weight: bold;
  font-size: 1.2rem;
  border: 2px solid #4caf50;
}

.profit-positive {
  color: #2e7d32;
}

.profit-negative {
  color: #c62828;
}

.flip-analysis-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--medium-gray);
}

.btn-secondary:hover {
  background: var(--light-gray);
  border-color: var(--primary-color);
}

.blast-btn {
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.4);
  color: #4338ca;
}

.blast-btn:hover {
  background: #dbeafe;
  border-color: rgba(79, 70, 229, 0.6);
  color: #312e81;
}

.flip-analysis-disclaimer {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 15px;
  margin-top: 20px;
}

.flip-analysis-disclaimer p {
  color: #856404;
  font-size: 0.9rem;
  display: flex;
  align-items: start;
  gap: 10px;
}

.flip-analysis-disclaimer i {
  margin-top: 2px;
}

.flip-analysis-loading,
.flip-analysis-error {
  text-align: center;
  padding: 60px 20px;
}

.flip-analysis-loading i {
  color: var(--secondary-color);
}

.flip-analysis-error i {
  color: #ff6b6b;
}

.flip-analysis-error h4 {
  color: var(--primary-color);
  margin: 15px 0 10px;
}

.flip-analysis-error p {
  color: var(--dark-gray);
  margin-bottom: 10px;
}

.error-details {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin-top: 10px;
}

.run-analysis-btn {
  margin-top: 20px;
  padding: 12px 24px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.run-analysis-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

@media (max-width: 768px) {
  .flip-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .property-details-grid {
    grid-template-columns: 1fr;
  }
  
  .flip-analysis-actions {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Flip Analysis Sub-tabs Styles */
.flip-analysis-content {
  padding: 20px;
}

.flip-analysis-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--light-gray);
}

.flip-analysis-header h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.analysis-subtitle {
  color: var(--dark-gray);
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.analysis-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.analysis-meta span {
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.analysis-date {
  background-color: var(--light-gray);
  color: var(--text-color);
}

.deal-grade {
  color: white;
  font-weight: bold;
}

.grade-excellent { background-color: #27ae60; }
.grade-good { background-color: #f39c12; }
.grade-fair { background-color: #e67e22; }
.grade-poor { background-color: #e74c3c; }

/* Sub-tabs Navigation */
.flip-subtabs {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 0;
}

.flip-subtab-button {
  padding: 12px 20px;
  border: none;
  background-color: transparent;
  color: var(--dark-gray);
  cursor: pointer;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.flip-subtab-button:hover {
  background-color: var(--light-gray);
  color: var(--text-color);
}

.flip-subtab-button.active {
  background-color: var(--secondary-color);
  color: white;
  border-bottom: 2px solid var(--secondary-color);
}

.flip-subtab-button i {
  font-size: 0.9rem;
}

/* Sub-tab Content */
.flip-subtab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.flip-subtab-content.active {
  display: block;
}

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

/* Overview Tab Styles */
.flip-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.flip-metric-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid var(--secondary-color);
  transition: transform 0.2s ease;
}

.flip-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flip-metric-card.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left-color: #5a6fd8;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin-bottom: 8px;
  font-weight: 500;
}

.flip-metric-card.highlight .metric-label {
  color: rgba(255, 255, 255, 0.9);
}

.metric-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.flip-metric-card.highlight .metric-value {
  color: white;
}

.metric-subtext {
  font-size: 0.8rem;
  margin-top: 5px;
  opacity: 0.8;
}

.roi-excellent { color: #27ae60 !important; }
.roi-good { color: #f39c12 !important; }
.roi-fair { color: #e67e22 !important; }
.roi-poor { color: #e74c3c !important; }

.roi-comparison-note {
  font-size: 0.75rem;
  color: #64748b;
}

.roi-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: #1f2937;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.roi-pill.roi-excellent {
  background: rgba(39, 174, 96, 0.12) !important;
  color: #0f766e !important;
  border-color: rgba(39, 174, 96, 0.25);
}

.roi-pill.roi-good {
  background: rgba(243, 156, 18, 0.12) !important;
  color: #b45309 !important;
  border-color: rgba(243, 156, 18, 0.25);
}

.roi-pill.roi-fair {
  background: rgba(230, 126, 34, 0.15) !important;
  color: #9a3412 !important;
  border-color: rgba(230, 126, 34, 0.25);
}

.roi-pill.roi-poor {
  background: rgba(231, 76, 60, 0.15) !important;
  color: #b91c1c !important;
  border-color: rgba(231, 76, 60, 0.25);
}

/* Property Details */
.flip-property-details {
  margin-bottom: 30px;
}

.property-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.detail-label {
  font-weight: 500;
  color: var(--dark-gray);
}

.detail-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* Investment Summary */
.flip-investment-summary {
  margin-bottom: 30px;
}

.investment-breakdown {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--medium-gray);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--medium-gray);
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row.total {
  font-weight: bold;
  background-color: #e3f2fd;
  margin: 10px -20px;
  padding: 12px 20px;
  border-radius: var(--border-radius);
}

.breakdown-row.arv {
  font-weight: bold;
  background-color: #f3e5f5;
  margin: 10px -20px;
  padding: 12px 20px;
  border-radius: var(--border-radius);
}

.breakdown-row.profit {
  font-weight: bold;
  background-color: #e8f5e8;
  margin: 10px -20px;
  padding: 12px 20px;
  border-radius: var(--border-radius);
}

.profit-positive { color: #27ae60; }
.profit-negative { color: #e74c3c; }

/* Action Buttons */
.flip-analysis-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* Financial Tab Styles */
.financial-breakdown, .market-analysis, .comparables-analysis, .risk-analysis, .diligence-analysis {
  padding: 20px 0;
}

.financial-section, .market-section, .comps-section, .risk-section, .diligence-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
}

.financial-section h5, .market-section h5, .comps-section h5, .risk-section h5, .diligence-section h5 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.financial-grid, .market-grid, .comps-grid, .risk-grid, .tech-grid, .renovation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.financial-item, .market-item, .comp-item, .risk-item, .tech-item, .renovation-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--medium-gray);
}

.financial-item .label, .market-item .label, .comp-item .label, .risk-item .label, .tech-item .label, .renovation-item .label {
  font-weight: 500;
  color: var(--dark-gray);
}

.financial-item .value, .market-item .value, .comp-item .value, .risk-item .value, .tech-item .value, .renovation-item .value {
  font-weight: 600;
  color: var(--primary-color);
}

.financial-item .value.highlight {
  background-color: var(--secondary-color);
  color: white;
  padding: 4px 8px;
  border-radius: var(--border-radius);
}

.financial-item .value.profit {
  background-color: #27ae60;
}

/* Market Tab Styles */
.momentum-stable { color: #27ae60; }
.momentum-other { color: #f39c12; }
.trend-positive { color: #27ae60; }
.trend-negative { color: #e74c3c; }

/* Comparables Tab Styles */
.score-excellent { color: #27ae60; }
.score-good { color: #f39c12; }
.score-fair { color: #e67e22; }

/* Risk Tab Styles */
.risk-low { color: #27ae60; }
.risk-medium { color: #f39c12; }
.risk-high { color: #e74c3c; }

.risk-factors, .deal-strengths {
  margin-top: 15px;
}

.risk-factors ul, .deal-strengths ul {
  list-style: none;
  padding: 0;
}

.risk-factor, .deal-strength {
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: var(--border-radius);
  border-left: 4px solid;
}

.risk-factor {
  background-color: #fdf2f2;
  border-left-color: #e74c3c;
}

.deal-strength {
  background-color: #f0f9ff;
  border-left-color: #27ae60;
}

/* Due Diligence Tab Styles */
.executive-summary, .detailed-discussion {
  background-color: white;
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--medium-gray);
  line-height: 1.7;
}

.checklist {
  margin-top: 15px;
}

.checklist ul {
  list-style: none;
  padding: 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--medium-gray);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--secondary-color);
}

.checklist-item label {
  cursor: pointer;
  flex: 1;
}

/* Analysis Text */
.analysis-text {
  background-color: white;
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--medium-gray);
  line-height: 1.7;
}

.insights, .concerns {
  margin-top: 15px;
}

.insights ul, .concerns ul {
  margin-top: 10px;
  padding-left: 20px;
}

.insights li, .concerns li {
  margin-bottom: 8px;
}

/* Disclaimer */
.flip-analysis-disclaimer {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--border-radius);
  padding: 15px;
  margin-top: 30px;
  color: #856404;
}

.flip-analysis-disclaimer i {
  margin-right: 8px;
}

/* Error State */
.flip-analysis-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--dark-gray);
}

.flip-analysis-error h4 {
  color: var(--accent-color);
  margin-bottom: 15px;
}

.error-details {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin: 10px 0;
}

.run-analysis-btn {
  background-color: var(--secondary-color);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.run-analysis-btn:hover {
  background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
  .flip-subtabs {
    flex-direction: column;
    gap: 0;
  }
  
  .flip-subtab-button {
    border-radius: 0;
    justify-content: center;
  }
  
  .flip-metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .property-details-grid, .financial-grid, .market-grid, .comps-grid, .risk-grid, .tech-grid {
    grid-template-columns: 1fr;
  }
  
  .analysis-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .flip-analysis-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .breakdown-row {
    flex-direction: column;
    gap: 5px;
  }
}

/* ============================================================================
   WHOLESALE DECISION CARD STYLES
   ============================================================================ */

.wholesale-decision-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 2rem;
  margin: 0 0 2rem 0;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wholesale-decision-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.wholesale-decision-card h2 {
  color: #fff;
  margin: 0;
  font-size: 1.75rem;
}

.deal-grade-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 1.5rem;
  font-weight: bold;
  backdrop-filter: blur(10px);
}

.deal-grade-badge.grade-A {
  background: #28a745;
  color: #fff;
}

.deal-grade-badge.grade-B {
  background: #17a2b8;
  color: #fff;
}

.deal-grade-badge.grade-C {
  background: #ffc107;
  color: #000;
}

.deal-grade-badge.grade-D,
.deal-grade-badge.grade-F {
  background: #dc3545;
  color: #fff;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.metric-primary {
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.metric-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.metric-value {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.2;
}

.metric-value.profit {
  color: #4ade80;
}

.metric-value.roi {
  color: #60a5fa;
}

.metric-value.dom {
  color: #fbbf24;
}

.motivation-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.motivation-section h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.motivation-indicators {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.motivation-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.95rem;
}

.motivation-indicator .indicator-icon {
  font-size: 1.5rem;
}

.motivation-indicator.high {
  background: rgba(34, 197, 94, 0.2);
  border-left: 4px solid #22c55e;
}

.motivation-indicator.medium {
  background: rgba(251, 191, 36, 0.2);
  border-left: 4px solid #fbbf24;
}

.motivation-indicator.low {
  background: rgba(239, 68, 68, 0.2);
  border-left: 4px solid #ef4444;
}

.quick-decision {
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.decision-text {
  font-size: 1.125rem;
  line-height: 1.6;
  text-align: center;
}

.decision-text strong {
  color: #fbbf24;
}

.decision-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: #fff;
  color: #667eea;
}

.btn-primary:hover {
  background: #f0f0f0;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.loading-indicator {
  text-align: center;
  padding: 1rem;
  opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .wholesale-decision-card {
    padding: 1.5rem;
  }
  
  .wholesale-decision-card h2 {
    font-size: 1.5rem;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .decision-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   MARKET INTELLIGENCE CARD
   ============================================================================ */

.market-intel-card {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  color: #fff;
  margin: 2rem 1.5rem;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.market-intel-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.market-intel-card h2 {
  color: #fff;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.momentum-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.momentum-badge.warming {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f5576c;
}

.momentum-badge.cooling {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-color: #00f2fe;
}

.momentum-badge.stable {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-color: #38f9d7;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.intel-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.intel-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.intel-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.intel-summary {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #4facfe;
  backdrop-filter: blur(10px);
}

.intel-summary p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* Mobile Responsive for Market Intel Card */
@media (max-width: 768px) {
  .market-intel-card {
    padding: 1.5rem;
  }
  
  .market-intel-card h2 {
    font-size: 1.5rem;
  }
  
  .intel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .intel-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .intel-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   SELLER MOTIVATION CARD
   ============================================================================ */

.seller-motivation-card {
  background: linear-gradient(135deg, #fef5f5 0%, #fee 50%, #fdd 100%);
  color: #2c3e50;
  margin: 2rem 1.5rem;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #e74c3c;
}

.seller-motivation-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.seller-motivation-card h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.motivation-score-badge {
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.motivation-score-badge.high {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f5576c;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.motivation-score-badge.moderate {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  border-color: #fda085;
}

.motivation-score-badge.low {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-color: #00f2fe;
}

.motivation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.motivation-metric {
  background: rgba(231, 76, 60, 0.08);
  padding: 1.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 2px solid rgba(231, 76, 60, 0.2);
  transition: all 0.3s ease;
}

.motivation-metric:hover {
  background: rgba(231, 76, 60, 0.12);
  transform: translateY(-2px);
  border-color: rgba(231, 76, 60, 0.3);
}

.motivation-metric .metric-icon {
  font-size: 2rem;
  line-height: 1;
}

.motivation-metric .metric-content {
  flex: 1;
}

.motivation-metric .metric-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.motivation-metric .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.motivation-section {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(231, 76, 60, 0.15);
}

.motivation-section h3 {
  color: #2c3e50;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.listing-history-content {
  font-size: 0.95rem;
  line-height: 1.8;
}

.listing-attempt {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.listing-attempt:last-child {
  margin-bottom: 0;
}

.listing-attempt strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.negotiation-content {
  font-size: 0.95rem;
  line-height: 1.8;
}

.strategy-item {
  margin-bottom: 1.5rem;
}

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

.strategy-item strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.highlight-value {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.talking-points-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.talking-points-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
}

.talking-points-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: bold;
  color: #27ae60;
}

.motivation-summary {
  background: #fff9f9;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  border: 2px solid rgba(231, 76, 60, 0.2);
}

.motivation-summary p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Mobile Responsive for Seller Motivation Card */
@media (max-width: 768px) {
  .seller-motivation-card {
    padding: 1.5rem;
  }
  
  .seller-motivation-card h2 {
    font-size: 1.5rem;
  }
  
  .motivation-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .motivation-metric .metric-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .motivation-grid {
    grid-template-columns: 1fr;
  }
  
  .seller-motivation-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .motivation-score-badge {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================================
   WHOLESALER DECISION TOOLS
   ============================================================================ */

.wholesaler-tools-section {
  margin: 2rem 1.5rem;
}

.wholesaler-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.wholesaler-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.wholesaler-card h2 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Deal Verdict */
.deal-verdict-card {
  border-left: 5px solid #3498db;
}

.verdict-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verdict-badge.go {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.verdict-badge.no-go {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.verdict-badge.maybe {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  color: white;
}

.verdict-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.verdict-reasoning h3 {
  color: #2c3e50;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.verdict-reasoning ul {
  list-style: none;
  padding: 0;
}

.verdict-reasoning li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verdict-reasoning li:last-child {
  border-bottom: none;
}

.verdict-recommendation {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.verdict-recommendation p {
  margin: 0;
  line-height: 1.8;
  color: #2c3e50;
}

/* Wholesalability Score */
.wholesalability-card {
  border-left: 5px solid #9b59b6;
}

.score-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.score-bar-container {
  width: 100%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.score-bar {
  height: 100%;
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 50%, #43e97b 100%);
  transition: width 1s ease;
}

.score-factors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.score-factor {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #3498db;
}

.score-factor-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.score-factor-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3498db;
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Selling Points */
.selling-points-card {
  border-left: 5px solid #27ae60;
}

.points-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.points-list li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid currentColor;
  color: #27ae60;
}

.selling-points-card .points-list li {
  border-left-color: #27ae60;
}

.red-flags-card .points-list li {
  border-left-color: #e74c3c;
  color: #e74c3c;
}

.points-list li::before {
  content: '✓';
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.red-flags-card .points-list li::before {
  content: '⚠';
}

/* Red Flags */
.red-flags-card {
  border-left: 5px solid #e74c3c;
}

/* Calculator */
.calculator-card {
  border-left: 5px solid #f39c12;
}

.calculator-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-input-group label {
  font-weight: 600;
  color: #2c3e50;
}

.calc-result-inline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
}

.calc-result-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}

.calc-result-value-inline {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3498db;
}

.calc-input {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.calc-input:focus {
  outline: none;
  border-color: #3498db;
}

.calc-input:readonly {
  background: #f8f9fa;
  cursor: not-allowed;
}

.calculator-results {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.calc-result:last-child {
  border-bottom: none;
}

.calc-result strong {
  font-size: 1.25rem;
  color: #2c3e50;
}

.calc-action-btn {
  margin-left: 0.75rem;
  padding: 0.35rem 0.65rem;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.calc-action-btn:hover {
  background: #c7d2fe;
  transform: translateY(-1px);
}

.calc-action-btn:active {
  transform: translateY(0);
}

.calc-result-status {
  margin-top: 1rem;
  padding: 1.25rem 1rem;
  background: white;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-result-status.good {
  color: #27ae60;
  background: #f0fdf4;
  border: 2px solid #27ae60;
}

.calc-result-status.warning {
  color: #f39c12;
  background: #fffbeb;
  border-left: 4px solid #f39c12;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

.calc-result-status.bad {
  color: #e74c3c;
  background: #fef2f2;
  border-left: 4px solid #e74c3c;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

/* Competitive Positioning */
.positioning-card {
  border-left: 5px solid #1abc9c;
}

.positioning-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.positioning-metric {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.positioning-metric-label {
  font-size: 0.875rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.positioning-metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.positioning-metric-comparison {
  font-size: 0.875rem;
  font-weight: 600;
}

.positioning-metric-comparison.better {
  color: #27ae60;
}

.positioning-metric-comparison.worse {
  color: #e74c3c;
}

.positioning-metric-comparison.average {
  color: #95a5a6;
}

/* Objection Handlers */
.objections-card {
  border-left: 5px solid #e67e22;
}

.objections-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.objection-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 3px solid #e67e22;
}

.objection-question {
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.objection-answer {
  color: #2c3e50;
  line-height: 1.8;
}

/* Action Plan */
.action-plan-card {
  border-left: 5px solid #2ecc71;
}

.action-plan-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.action-item:hover {
  background: #e8f5e9;
}

.action-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #3498db;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.action-checkbox:checked {
  background: #2ecc71;
  border-color: #2ecc71;
}

.action-details {
  flex: 1;
}

.action-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.action-description {
  font-size: 0.875rem;
  color: #7f8c8d;
  line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .verdict-content {
    grid-template-columns: 1fr;
  }

  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .calculator-content {
    grid-template-columns: 1fr;
  }

  .wholesaler-card {
    padding: 1.5rem;
  }
}

/* ============================================================================
   ACTIVE COMPETITION TAB STYLES
   ============================================================================ */

.active-comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem 1.5rem;
}

.active-comp-card {
  background: #fff;
  border: 2px solid var(--medium-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.active-comp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.active-comp-card.competition-high {
  border-color: #e74c3c;
  border-width: 3px;
}

.active-comp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.active-comp-price {
  font-size: 1.5rem;
  font-weight: 700;
}

.active-comp-dom {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.active-comp-body {
  padding: 1rem;
}

.active-comp-address {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.active-comp-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.active-comp-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.95rem;
}

.active-comp-detail:last-child {
  border-bottom: none;
}

.active-comp-detail strong {
  color: var(--dark-gray);
  font-weight: 600;
}

.competition-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e74c3c;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .active-comp-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 1rem;
  }
}

/* ============================================================================
   RENTAL ANALYSIS STYLES (Within Wholesale Analysis Sub-tabs)
   ============================================================================ */

.rental-analysis-content {
  padding: 1.5rem;
}

.rental-subtitle {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.rental-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rental-metric {
  background: var(--light-gray);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.rental-metric .metric-label {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.rental-metric .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.rental-summary {
  background: #e8f5e9;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  margin-bottom: 1.5rem;
}

.rental-summary h5 {
  color: #2e7d32;
  margin-bottom: 0.5rem;
}

.rental-comps {
  margin-bottom: 1.5rem;
}

.rental-comps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.rental-comp-card {
  background: #fff;
  border: 2px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.2s;
}

.rental-comp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rental-comp-card .comp-rent {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.rental-comp-card .comp-details {
  font-size: 0.875rem;
  color: var(--dark-gray);
}

.rental-comp-card .comp-details div {
  margin-bottom: 0.25rem;
}

.rental-note {
  background: #fff3cd;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.rental-note i {
  color: #ff9800;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .rental-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .rental-comps-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   DOM PRICING ANALYSIS STYLES (Within Wholesale Analysis Sub-tabs)
   ============================================================================ */

.dom-pricing-content {
  padding: 1.5rem;
}

.dom-subtitle {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.dom-chart {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  background: var(--light-gray);
  border-radius: 8px;
  align-items: flex-end;
  min-height: 350px;
}

.dom-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.dom-bar-container.optimal {
  background: rgba(76, 175, 80, 0.1);
  padding: 1rem 0.5rem;
  border-radius: 8px;
  border: 2px solid #4caf50;
}

.dom-bar {
  width: 100%;
  background: linear-gradient(135deg, var(--secondary-color), #5dade2);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
  min-height: 40px;
  transition: all 0.3s;
  position: relative;
}

.dom-bar-container.optimal .dom-bar {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.dom-bar:hover {
  transform: scaleY(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dom-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  text-align: center;
}

.dom-label {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
}

.dom-label .price-range {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.dom-label .listing-count {
  color: var(--dark-gray);
  font-size: 0.7rem;
}

.optimal-badge {
  margin-top: 0.25rem;
  background: #4caf50;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.velocity-label {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--dark-gray);
  font-style: italic;
}

.adjusted-value {
  color: var(--secondary-color);
  font-weight: 600;
  margin-top: 0.25rem;
}

.dom-recommendation {
  background: #e3f2fd;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  margin-bottom: 1.5rem;
}

.dom-recommendation h5 {
  color: #1976d2;
  margin-bottom: 0.5rem;
}

.dom-note {
  background: #fff3cd;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.dom-note i {
  color: #ff9800;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .dom-chart {
    flex-wrap: wrap;
    min-height: auto;
  }
  
  .dom-bar-container {
    flex: 1 1 calc(50% - 0.5rem);
  }
  
  .dom-label .price-range {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .dom-bar-container {
    flex: 1 1 100%;
  }
}

/* ============================================================================
   QUICK ACTIONS BAR (Sticky Bottom)
   ============================================================================ */

.quick-actions-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--border-color);
  padding: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 600;
}

.action-btn i {
  font-size: 1.25rem;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-pipeline {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
  font-weight: 700;
}

.action-pipeline:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.action-watchlist:hover {
  background: #ffc107;
  border-color: #ffc107;
  color: #000;
}

.action-share:hover {
  background: #17a2b8;
  border-color: #17a2b8;
  color: #fff;
}

.action-contract:hover {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

.action-ignore:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.action-btn.active {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

/* Add padding to bottom of container to account for sticky bar */
.container {
  padding-bottom: 100px;
}

/* Mobile Responsive for Quick Actions */
@media (max-width: 768px) {
  .quick-actions-bar {
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
  }
  
  .action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
  }
  
  .action-btn i {
    font-size: 1rem;
  }
  
  .action-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .action-btn span {
    display: none;
  }
  
  .action-btn {
    padding: 0.75rem 0.5rem;
  }
  
  .action-btn i {
    font-size: 1.5rem;
  }
}

/* ============================================
   TAPPABLE CONTACT LINKS (Mobile-Friendly)
   ============================================ */

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-weight: 500;
  min-height: 44px; /* Touch-friendly target size */
  min-width: 44px;
}

.contact-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.contact-link i {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
}

/* Phone Link Styling */
.phone-link {
  color: #28a745;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.phone-link:hover {
  background: #c8e6c9;
  border-color: #28a745;
  color: #1e7e34;
}

.phone-link i {
  color: #28a745;
}

/* Email Link Styling */
.email-link {
  color: #007bff;
  background: #e7f3ff;
  border: 1px solid #b8daff;
}

.email-link:hover {
  background: #b8daff;
  border-color: #007bff;
  color: #0056b3;
}

.email-link i {
  color: #007bff;
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
  .contact-link {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin: 0.25rem 0;
  }
  
  .contact-link i {
    font-size: 1.25rem;
  }
}

/* Ensure proper spacing in contact info sections */
#agentEmail,
#agentPhone,
#officePhone,
#brokerEmail,
#brokerPhone {
  display: block;
  margin: 0.25rem 0;
}

/* ============================================
   SIMPLIFIED TAB STRUCTURE
   ============================================ */

.analysis-tabs {
  border-bottom: 2px solid var(--medium-gray);
  margin-bottom: 2rem;
  background: #fff;
}

.primary-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.primary-tabs::-webkit-scrollbar {
  display: none;
}

.primary-tabs .tab-button {
  flex: 0 1 auto;
  min-width: 100px;
  padding: 0.5rem 0.4rem;
  background: #fff;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.primary-tabs .tab-button .tab-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.primary-tabs .tab-button .tab-text {
  font-size: 0.75rem;
  line-height: 1.1;
  display: block;
}

.primary-tabs .tab-button:hover {
  background: #f0f8ff;
  color: var(--secondary-color);
}

.primary-tabs .tab-button.active {
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
  background: #f0f8ff;
}

.secondary-tabs {
  background: var(--light-gray);
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--medium-gray);
}

.secondary-tabs summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
  list-style: none;
  user-select: none;
  color: var(--text-color);
  transition: color 0.2s;
}

.secondary-tabs summary::-webkit-details-marker {
  display: none;
}

.secondary-tabs summary:hover {
  color: var(--secondary-color);
}

.secondary-tabs[open] summary {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.secondary-tabs-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--medium-gray);
}

.secondary-tabs-content .tab-button {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-weight: 500;
  color: var(--text-color);
}

.secondary-tabs-content .tab-button:hover {
  background: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.secondary-tabs-content .tab-button.active {
  background: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
}

/* Tab Content Styles */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* Overview Tab Specific Styles */
.overview-section {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
}

.overview-text {
  line-height: 1.8;
  color: var(--text-color);
}

/* Comps Tab Specific Styles */
.comps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns by 3 rows for 6 comps */
  gap: 1rem;
  margin-top: 1rem;
}

/* Contact Details Section */
.contact-details-section {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
}

.info-notice {
  background: #e7f3ff;
  border-left: 4px solid var(--secondary-color);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  color: var(--text-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .primary-tabs {
    flex-wrap: nowrap;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }
  
  .primary-tabs .tab-button {
    min-width: 90px;
    font-size: 0.8rem;
    padding: 0.6rem 0.4rem;
  }
  
  /* Secondary tabs already use flexbox column layout */
  
  .secondary-tabs summary {
    font-size: 0.95rem;
  }
  
  .comps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .primary-tabs .tab-button {
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.5rem 0.3rem;
  }
}

/* ============================================
   DEAL ANALYSIS SUB-TABS
   ============================================ */

.deal-analysis-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
}

.deal-subtab-button {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.deal-subtab-button:hover {
  background: #f1f5f9;
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.deal-subtab-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.deal-subtab-content {
  display: none;
  animation: fadeIn 0.3s ease;
  padding: 20px 0;
}

.deal-subtab-content.active {
  display: block;
}

/* Responsive sub-tabs */
@media (max-width: 768px) {
  .deal-subtab-button {
    min-width: 120px;
    font-size: 0.875rem;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .deal-subtab-button {
    flex: 1 0 calc(50% - 4px);
    min-width: auto;
    font-size: 0.8rem;
    padding: 8px 10px;
  }
}

/* ============================================
   NEW TAB CONTENT STYLING
   ============================================ */

/* Property Info Section Styles */
.property-info-section {
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.property-info-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--medium-gray);
  font-size: 1.2rem;
}

/* Property Overview Tab */
.property-overview-content {
  padding: 1rem;
}

.property-overview-content .overview-section {
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.property-overview-content .overview-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--medium-gray);
  font-size: 1.1rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.overview-item {
  padding: 0.75rem;
  background: var(--light-gray);
  border-radius: 4px;
  border-left: 3px solid var(--secondary-color);
}

.overview-item.full-width {
  grid-column: 1 / -1;
}

.overview-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.overview-description {
  line-height: 1.8;
  color: var(--text-color);
  padding: 1rem;
  background: var(--light-gray);
  border-radius: 4px;
}

/* Contact Info Tab */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-card h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-gray);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-card h4 i {
  color: var(--secondary-color);
}

.contact-details p {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.contact-details strong {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* Renovations Tab Styles */
.renovations-breakdown {
  padding: 1.5rem;
}

.renovation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.renovation-summary .summary-card {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  text-align: center;
}

.renovation-summary .summary-label {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.renovation-summary .summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.renovation-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.renovation-item-card {
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.renovation-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.renovation-item-card .item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.renovation-item-card .item-number {
  background: var(--secondary-color);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.renovation-item-card .item-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.renovation-item-card .item-cost {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
}

.renovation-item-card .item-description {
  margin: 0.75rem 0;
  padding-left: 3rem;
  color: var(--dark-gray);
  line-height: 1.6;
}

.renovation-item-card .item-meta {
  padding-left: 3rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.item-talking-point {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  padding-left: 3rem;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.talking-point-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #1d4ed8;
  letter-spacing: 0.5px;
}

.talking-point-text {
  font-size: 0.9rem;
  color: #1f2937;
  line-height: 1.4;
}

.renovation-item-card .item-category {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: var(--light-gray);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--dark-gray);
}

.renovation-item-card .item-category i {
  font-size: 0.75rem;
}

.no-renovations {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--dark-gray);
}

.no-renovations i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.no-renovations p {
  margin: 0.5rem 0;
}

.no-renovations .subtext {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin-top: 1rem;
}

/* Mobile Responsive for New Content */
@media (max-width: 768px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-info-grid {
    grid-template-columns: 1fr;
  }
  
  .property-overview-content .overview-section {
    padding: 1rem;
  }
  
  .contact-card {
    padding: 1rem;
  }
  
  .renovation-summary {
    grid-template-columns: 1fr;
  }
  
  .renovation-item-card .item-header {
    flex-wrap: wrap;
  }
  
  .renovation-item-card .item-cost {
    width: 100%;
    text-align: right;
    margin-top: 0.5rem;
  }
  
  .renovation-item-card .item-description,
  .renovation-item-card .item-meta {
    padding-left: 0;
  }
}

/* Market Comps Tab Styles */
.comps-header {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 8px;
}

.comps-header h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.comps-summary {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.comps-summary .summary-item {
  font-size: 1rem;
}

.comps-summary .summary-item strong {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.comps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns by 3 rows for 6 comps - matches ARV comps format */
  gap: 1.5rem;
  padding: 0;
  width: 100%; /* Ensure full width like ARV comps */
}

.comp-card {
  background: #fff;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.comp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--secondary-color), #5dade2);
  color: white;
}

.comp-rank {
  font-size: 1.2rem;
  font-weight: bold;
}

.comp-score {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.comp-body {
  padding: 1.25rem;
}

.comp-address {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.comp-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comp-detail {
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.comp-detail:last-child {
  border-bottom: none;
}

.comp-detail strong {
  color: var(--dark-gray);
  margin-right: 0.5rem;
  min-width: 120px;
  display: inline-block;
}

.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--dark-gray);
}

.no-comps,
.error-message {
  text-align: center;
  padding: 3rem;
  color: var(--dark-gray);
}

.no-comps i,
.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--secondary-color);
}

.error-message i {
  color: var(--accent-color);
}

.error-details {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .comps-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 1rem;
  }
  
  .comps-summary {
    flex-direction: column;
    gap: 1rem;
  }
  
  .comps-header {
    padding: 1rem;
  }
}

/* ============================================================================
   BUYER PRESENTATION SECTION
   ============================================================================ */

.buyer-presentation-section {
  background: white;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.presentation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid #3498db;
}

.presentation-header h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin: 0;
}

.presentation-actions {
  display: flex;
  gap: 1rem;
}

.presentation-actions .action-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: #3498db;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.presentation-actions .action-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.presentation-card {
  background: #f8f9fa;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  border-left: 4px solid #3498db;
}

.presentation-card h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.presentation-content {
  line-height: 1.8;
  color: #34495e;
}

.presentation-financials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.financial-metric {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.financial-metric-label {
  font-size: 0.875rem;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.financial-metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
}

.financial-metric-subtext {
  font-size: 0.875rem;
  color: #95a5a6;
  margin-top: 0.25rem;
}

.presentation-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.presentation-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.presentation-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
}

.presentation-highlights li {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #27ae60;
  color: #2c3e50;
  font-weight: 500;
}

.presentation-highlights li::before {
  content: '✓';
  color: #27ae60;
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.presentation-disclaimer {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #ecf0f1;
  border-radius: 8px;
  text-align: center;
}

.presentation-disclaimer p {
  margin: 0;
  color: #7f8c8d;
  line-height: 1.6;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  /* Hide non-printable elements */
  header,
  .primary-tabs,
  .presentation-actions,
  .action-btn,
  #wholesalerToolsSection,
  #sellerMotivationCard,
  #dealStatusCard,
  nav,
  .nav-bar,
  .sidebar,
  .modal,
  button:not(.print-only),
  .floating-status-bar-compact {
    display: none !important;
  }

  /* Hide Market Intelligence card in buyer presentation print (often not loaded) */
  #marketIntelCard {
    display: none !important;
  }
  
  /* Only show it in wholesaler print mode */
  body.print-wholesaler-only #marketIntelCard {
    display: block !important;
  }

  /* Reset page layout for print */
  body {
    background: white !important;
    margin: 0;
    padding: 0;
  }

  .buyer-presentation-section {
    max-width: 100%;
    margin: 0;
    padding: 15mm;
    box-shadow: none;
  }
  
  /* Optimize spacing for print */
  .presentation-card {
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
  
  /* Ensure property photos display properly */
  .property-image-gallery {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .property-image-gallery img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
  }

  /* Optimize for print */
  .presentation-card {
    page-break-inside: avoid;
    background: white;
    border: 1px solid #ddd;
    margin-bottom: 10mm;
  }

  .presentation-header {
    page-break-after: avoid;
  }

  .presentation-photos {
    grid-template-columns: repeat(3, 1fr);
    gap: 5mm;
  }

  .presentation-photo {
    height: 150px;
  }

  /* Ensure proper page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  /* Print-friendly colors */
  * {
    color: #000 !important;
    background: white !important;
    box-shadow: none !important;
  }

  .presentation-card h2 {
    border-bottom: 2px solid #000;
    padding-bottom: 5mm;
  }

  .financial-metric {
    border: 1px solid #ddd;
  }

  /* Add page numbers */
  @page {
    margin: 20mm;
    @bottom-right {
      content: "Page " counter(page) " of " counter(pages);
    }
  }
}

/* Mobile responsive for presentation */
@media (max-width: 768px) {
  .buyer-presentation-section {
    padding: 1.5rem;
    margin: 1rem;
  }

  .presentation-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .presentation-actions {
    flex-direction: column;
    width: 100%;
  }

  .presentation-actions .action-btn {
    width: 100%;
    justify-content: center;
  }

  .presentation-financials {
    grid-template-columns: 1fr;
  }

  .presentation-photos {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   WHOLESALER ANALYSIS CONTAINER (NEW - Top Priority Section)
   ============================================================================ */

/* Hide wholesaler container by default - content is shown in dedicated tab */
#wholesalerAnalysisContainer {
  display: none !important;
}

/* Show wholesaler container only when printing */
body.print-wholesaler-only #wholesalerAnalysisContainer {
  display: block !important;
}

.wholesaler-analysis-container {
  background: linear-gradient(135deg, #f8f9fe 0%, #f0f2ff 100%);
  margin: 1.5rem 1.5rem 2rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 3px solid #667eea;
}

.wholesaler-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: none;
  flex-wrap: wrap;
  gap: 1rem;
}

.wholesaler-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wholesaler-title h2 {
  color: white;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.private-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wholesaler-controls {
  display: flex;
  gap: 0.75rem;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.control-btn i {
  font-size: 1rem;
}

.control-btn.collapse-btn.collapsed i {
  transform: rotate(180deg);
}

.wholesaler-content {
  background: white;
  padding: 2rem;
  transition: all 0.3s ease;
}

.wholesaler-content.collapsed {
  max-height: 0;
  padding: 0 2rem;
  overflow: hidden;
}

.wholesaler-subsection {
  margin-bottom: 1.5rem;
}

/* Enhanced Deal Verdict Card - Most Prominent */
.verdict-primary {
  background: linear-gradient(135deg, #fef0f9 0%, #fde4f0 100%);
  color: #2c3e50;
  margin-bottom: 2rem;
  border: 3px solid #e91e63;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}

.verdict-header h2 {
  color: #2c3e50 !important;
  font-size: 1.5rem;
}

.verdict-badge-large {
  font-size: 1.1rem !important;
  padding: 10px 20px !important;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
}

.verdict-content {
  color: #2c3e50;
}

.verdict-content h3 {
  color: #2c3e50 !important;
  margin-top: 1rem;
}

.verdict-reasoning ul {
  list-style: none;
  padding: 0;
}

.verdict-reasoning li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(233, 30, 99, 0.15);
}

.verdict-reasoning li:last-child {
  border-bottom: none;
}

.verdict-recommendation {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
  border: 2px solid rgba(233, 30, 99, 0.2);
}

/* ========================================
   PRINT STYLES - COMPREHENSIVE FIX
   ======================================== */
@media print {
  /* DEFAULT: Hide Wholesaler Section AND All Analysis Tabs (for buyer presentation) */
  .wholesaler-analysis-container,
  .wholesaler-header,
  .wholesaler-content,
  .wholesaler-tools-section,
  .seller-motivation-card,
  #wholesalerAnalysisContainer,
  #wholesalerAnalysisContent,
  #aiValuationAssessment,
  #aiAnalysisSummary,
  .ai-valuation-card,
  .ai-analysis-summary-card,
  .primary-tabs,
  .tab-content,
  #analysis-content,
  .analysis-section,
  #valuation_analysisTab,
  #flip_analysisTab,
  #property_overviewTab,
  #market_compsTab,
  #owner_infoTab,
  #summaryTab,
  .container > .card,
  .main-content > *:not(.buyer-presentation-section) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
  }
  
  /* Show buyer presentation by default */
  .buyer-presentation-section,
  #buyerPresentationSection {
    display: block !important;
    visibility: visible !important;
  }
  
  /* ========================================
     WHOLESALER-ONLY PRINT MODE
     ======================================== */
  
  /* When printing wholesaler-only (internal notes) - FORCE VISIBILITY */
  body.print-wholesaler-only #wholesalerAnalysisContainer,
  body.print-wholesaler-only .wholesaler-analysis-container {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    page-break-before: auto !important;
    opacity: 1 !important;
  }
  
  body.print-wholesaler-only #wholesalerAnalysisContent,
  body.print-wholesaler-only .wholesaler-content {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
  }
  
  body.print-wholesaler-only .wholesaler-header,
  body.print-wholesaler-only .wholesaler-tools-section,
  body.print-wholesaler-only #sellerMotivationCard,
  body.print-wholesaler-only .seller-motivation-card,
  body.print-wholesaler-only #aiValuationAssessment,
  body.print-wholesaler-only .ai-valuation-card,
  body.print-wholesaler-only #aiAnalysisSummary,
  body.print-wholesaler-only .ai-analysis-summary-card,
  body.print-wholesaler-only .ai-analysis-content,
  body.print-wholesaler-only .wholesaler-card,
  body.print-wholesaler-only .wholesaler-subsection,
  body.print-wholesaler-only .deal-verdict-card,
  body.print-wholesaler-only .verdict-primary,
  body.print-wholesaler-only .positioning-card,
  body.print-wholesaler-only .objections-card,
  body.print-wholesaler-only .action-plan-card,
  body.print-wholesaler-only .motivation-grid,
  body.print-wholesaler-only .motivation-metric,
  body.print-wholesaler-only .positioning-content,
  body.print-wholesaler-only .objections-content,
  body.print-wholesaler-only .action-items {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
  }
  
  /* Hide all non-wholesaler content when print-wholesaler-only class is active */
  /* This applies in BOTH screen and print modes */
  body.print-wholesaler-only #buyerPresentationSection,
  body.print-wholesaler-only .buyer-presentation-section,
  body.print-wholesaler-only .presentation-card,
  body.print-wholesaler-only header,
  body.print-wholesaler-only nav,
  body.print-wholesaler-only .floating-status-bar-compact,
  body.print-wholesaler-only .primary-tabs,
  body.print-wholesaler-only .tab-content,
  body.print-wholesaler-only .property-overview,
  body.print-wholesaler-only .property-details-grid,
  body.print-wholesaler-only .property-header,
  body.print-wholesaler-only .analysis-section:not(#wholesalerAnalysisContainer) {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Force wholesaler container to be visible and expanded */
  body.print-wholesaler-only #wholesalerAnalysisContainer {
    display: block !important;
    visibility: visible !important;
  }
  
  body.print-wholesaler-only .wholesaler-analysis-container,
  body.print-wholesaler-only .wholesaler-content {
    display: block !important;
    visibility: visible !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Ensure wholesaler content is fully expanded */
  body.print-wholesaler-only .wholesaler-content {
    max-height: none !important;
    height: auto !important;
  }
  
  /* Make sure ALL children of wholesaler container are visible */
  body.print-wholesaler-only .wholesaler-analysis-container * {
    visibility: visible !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Better page breaks */
  body.print-wholesaler-only .wholesaler-subsection {
    page-break-inside: avoid;
  }
  
  /* Eliminate blank first page in wholesaler print */
  body.print-wholesaler-only .wholesaler-analysis-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  body.print-wholesaler-only .wholesaler-header {
    margin-top: 0 !important;
    page-break-before: avoid !important;
  }
  
  /* Compact print layout for wholesaler */
  body.print-wholesaler-only .wholesaler-content {
    padding: 15px !important;
  }
  
  body.print-wholesaler-only .wholesaler-card {
    margin-bottom: 15px !important;
    page-break-inside: avoid;
  }
  
  body.print-wholesaler-only .card-header {
    padding: 10px 15px !important;
  }
}

/* Buyer presentation: Start content immediately (no blank page) */
@media print {
  .buyer-presentation-section .presentation-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    page-break-before: avoid !important;
  }
  
  /* Ensure first page has content */
  .presentation-card:first-of-type {
    margin-top: 0 !important;
  }
  
  /* Better control over page breaks */
  .presentation-card {
    page-break-before: auto;
    page-break-after: auto;
    page-break-inside: avoid;
  }
  
  /* Allow large sections to break if necessary */
  .presentation-card.large-content {
    page-break-inside: auto;
  }
}

/* Mobile Responsiveness for Wholesaler Container */
@media (max-width: 768px) {
  .wholesaler-analysis-container {
    margin: 1rem 0.5rem;
    border-radius: 12px;
  }
  
  .wholesaler-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
  }
  
  .wholesaler-title h2 {
    font-size: 1.4rem;
  }
  
  .wholesaler-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .control-btn {
    flex: 1;
    justify-content: center;
  }
  
  .wholesaler-content {
    padding: 1.5rem 1rem;
  }
  
  .verdict-primary {
    margin-bottom: 1.5rem;
  }
  
  .verdict-header h2 {
    font-size: 1.3rem;
  }
  
  .verdict-badge-large {
    font-size: 0.95rem !important;
    padding: 8px 14px !important;
  }
  
  .verdict-recommendation {
    font-size: 1rem;
    padding: 1rem;
  }
}



/* Wholesaler Analysis Tab Styles */
.wholesaler-tab-wrapper {
  padding: 0;
}

.wholesaler-tab-header {
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
}

.wholesaler-tab-header h2 {
  margin: 0 0 5px 0;
  font-size: 1.5rem;
  color: white;
}

.wholesaler-tab-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.wholesaler-tab-content {
  background: white;
}

.wholesaler-tab-content .wholesaler-subsection {
  margin-bottom: 1.5rem;
}

/* =================================================================== */
/* VALUATION ANALYSIS TAB STYLES                                     */
/* =================================================================== */

.valuation-analysis-container {
  padding: 20px;
}

.valuation-summary-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.summary-item {
  text-align: center;
}

.summary-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 2rem;
  font-weight: bold;
}

.valuation-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.valuation-section h3 {
  margin-top: 0;
  color: #667eea;
  border-bottom: 2px solid #e0e7ff;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.classification-grid,
.market-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.classification-item,
.market-data-item {
  padding: 12px;
  background: #f8f9ff;
  border-radius: 8px;
  border-left: 3px solid #667eea;
}

.classification-item strong,
.market-data-item strong {
  display: block;
  color: #4a5568;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.badge {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

.badge + small {
  display: block;
  margin-top: 5px;
  color: #718096;
  font-size: 0.85rem;
}

.highlight {
  color: #e53e3e;
  font-weight: 600;
}

.approaches-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.approach-card {
  border: 2px solid #e0e7ff;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.approach-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.approach-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.approach-header h4 {
  margin: 0;
  color: #2d3748;
}

.approach-weight {
  background: #48bb78;
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.approach-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.approach-metric strong {
  display: block;
  color: #718096;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.approach-metric span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
}

.comps-table-wrapper {
  overflow-x: auto;
}

.comps-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.comps-table th {
  background: #667eea;
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.comps-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.comps-table tbody tr:hover {
  background: #f7fafc;
}

.adjustments-cell {
  max-width: 250px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.adjusted-value {
  font-weight: 600;
  color: #48bb78;
}

.warnings-section {
  background: #fff5f5;
  border-left: 4px solid #fc8181;
}

.warnings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warning-item {
  display: flex;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  gap: 10px;
}

.warning-item.error {
  background: #fff5f5;
  border-left: 3px solid #fc8181;
}

.warning-item.warning {
  background: #fffaf0;
  border-left: 3px solid #f6ad55;
}

.warning-item.info {
  background: #ebf8ff;
  border-left: 3px solid #63b3ed;
}

.warning-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.warning-message {
  flex: 1;
  line-height: 1.5;
}

.explanation-text {
  line-height: 1.6;
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 20px;
}

.spread-analysis {
  background: #f7fafc;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.spread-analysis h4 {
  margin-top: 0;
  color: #2d3748;
  font-size: 1rem;
}

.spread-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.spread-stats div {
  font-weight: 500;
  color: #4a5568;
}

.valuation-analysis-loading,
.valuation-analysis-error {
  text-align: center;
  padding: 60px 20px;
}

.valuation-analysis-loading i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 20px;
}

.valuation-analysis-error i {
  color: #fc8181;
}

.valuation-analysis-error h4 {
  color: #742a2a;
  margin: 20px 0;
}

.valuation-analysis-error p {
  color: #c53030;
  margin-bottom: 20px;
}

.run-analysis-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.run-analysis-btn:hover {
  background: #5568d3;
}

@media (max-width: 768px) {
  .summary-row,
  .classification-grid,
  .market-data-grid,
  .approaches-list {
    grid-template-columns: 1fr;
  }
  
  .approach-details {
    grid-template-columns: 1fr;
  }
  
  .comps-table {
    font-size: 0.85rem;
  }
  
  .comps-table th,
  .comps-table td {
    padding: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* EXPERT WHOLESALER NEGOTIATION TIERS */
/* ═══════════════════════════════════════════════════════════════ */

.wholesale-tier {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #3498db;
}

.wholesale-tier h4 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Tier 1: Primary Deal Structure */
.tier-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-left: 4px solid #764ba2;
}

.tier-primary h4,
.tier-primary h5,
.tier-primary strong {
  color: white;
}

.deal-math {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.math-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 1rem;
}

.math-line.total-line {
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.1rem;
}

.math-line strong {
  font-size: 1.1rem;
}

.math-line .negative {
  color: #ffcccb;
}

.math-line .highlight {
  color: #ffd700;
  font-size: 1.3rem;
}

.offer-structure {
  margin: 1.5rem 0;
}

.offer-structure h5 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.offer-tier {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.offer-tier:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.offer-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tier-icon {
  font-size: 1.2rem;
}

.offer-details {
  text-align: right;
}

.offer-amount {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffd700;
}

.fee-info {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.assignment-summary {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.summary-line.highlight {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.05rem;
}

/* Tier 2: Warning/Gap Analysis */
.tier-warning {
  background: #fff9f0;
  border-left: 4px solid #ff9800;
}

.tier-warning h4 {
  color: #e65100;
}

.gap-analysis {
  background: white;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.gap-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 1rem;
}

.gap-line.highlight-danger {
  border-top: 2px solid #ffebee;
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
}

.strategy-alert {
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.alert-high {
  background: #ffebee;
  border-left: 4px solid #e53935;
  color: #b71c1c;
}

.alert-medium {
  background: #fff3e0;
  border-left: 4px solid #fb8c00;
  color: #e65100;
}

.alert-low {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  color: #2e7d32;
}

.negotiation-tactics {
  margin-top: 1.5rem;
}

.negotiation-tactics h5 {
  margin-bottom: 0.75rem;
  color: #e65100;
}

.tactic-list {
  list-style: none;
  padding: 0;
}

.tactic-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  line-height: 1.6;
}

.tactic-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4caf50;
  font-weight: bold;
}

.tactic-list .warning-tactic {
  color: #d32f2f;
  font-weight: 500;
}

.tactic-list .warning-tactic:before {
  content: '⚠';
  color: #ff9800;
}

/* Tier 3: Motivation Bonus */
.tier-bonus {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  border-left: 4px solid #ee5a6f;
}

.tier-bonus h4,
.tier-bonus h5,
.tier-bonus strong {
  color: white;
}

.motivation-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.score-label {
  font-size: 1rem;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}

.score-extreme {
  color: #ffd700;
  animation: pulse 2s infinite;
}

.score-high {
  color: #ffeb3b;
}

.score-moderate {
  color: #fff;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.score-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.bonus-opportunity {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.bonus-math {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bonus-math div {
  padding: 0.25rem 0;
}

.bonus-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.motivation-factors {
  margin: 1rem 0;
}

.motivation-factors ul {
  list-style: none;
  padding-left: 0;
}

.motivation-factors li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
}

.motivation-factors li:before {
  content: '🔥';
  position: absolute;
  left: 0;
}

.warning-box {
  background: rgba(255, 193, 7, 0.2);
  border: 2px solid #ffd54f;
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1.5rem;
  color: #fff;
}

.warning-box strong {
  color: #ffd54f;
}

/* Compact Floating Status Bar (Sticky at Top-Right) - NEW */
.floating-status-bar-compact {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  padding: 10px 20px;
  margin-bottom: 10px;
  pointer-events: none;
}

.floating-status-content-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.floating-status-btn-compact {
  padding: 6px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 5px;
  background: white;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.floating-status-btn-compact:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.floating-status-btn-compact.active {
  border-width: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.floating-btn-interested.active {
  background: #d1fae5;
  border-color: #10b981;
  color: #10b981;
}

.floating-btn-skip.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

.floating-btn-undecided.active {
  background: #f1f5f9;
  border-color: #64748b;
  color: #64748b;
}

.floating-status-indicator-compact {
  font-weight: 600;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
  white-space: nowrap;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.floating-status-indicator-compact.status-interested {
  background: #d1fae5;
  color: #065f46;
  border-color: #10b981;
}

.floating-status-indicator-compact.status-skip {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}

.floating-status-indicator-compact.status-undecided {
  background: #f1f5f9;
  color: #475569;
  border-color: #94a3b8;
}

@media (max-width: 768px) {
  .floating-status-bar-compact {
    padding: 8px 10px;
  }

  .floating-status-content-compact {
    padding: 5px 8px;
    gap: 6px;
  }

  .floating-status-btn-compact {
    padding: 5px 10px;
    font-size: 11px;
  }

  .floating-status-indicator-compact {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* OLD - Floating Status Bar (Sticky at Top) - DEPRECATED */
.floating-status-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 0 0 8px 8px;
}

.floating-status-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.floating-status-label {
  color: white;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.floating-status-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.floating-status-btn {
  padding: 8px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.floating-status-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.floating-status-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.floating-btn-interested.active {
  color: #10b981;
}

.floating-btn-skip.active {
  color: #ef4444;
}

.floating-btn-undecided.active {
  color: #64748b;
}

.floating-status-indicator {
  color: white;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.floating-status-indicator.status-interested {
  background: rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.floating-status-indicator.status-skip {
  background: rgba(239, 68, 68, 0.3);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.floating-status-indicator.status-undecided {
  background: rgba(100, 116, 139, 0.3);
  border: 1px solid rgba(100, 116, 139, 0.5);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .floating-status-content {
    gap: 10px;
    padding: 8px 10px;
  }

  .floating-status-label {
    font-size: 12px;
  }

  .floating-status-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .floating-status-indicator {
    font-size: 11px;
    padding: 3px 10px;
  }
}

/* ============================================
   DEAL VERDICT BANNER (NEW - Above the fold)
   ============================================ */
.deal-verdict-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 20px 15px 20px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  color: white;
}

.verdict-banner-header {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.verdict-badge-large {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 24px;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.verdict-badge-large .verdict-icon {
  font-size: 24px;
}

.verdict-badge-large .verdict-text {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verdict-badge-large .verdict-score {
  font-size: 20px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 8px;
}

.verdict-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.verdict-banner-item {
  background: rgba(255, 255, 255, 0.12);
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.verdict-banner-item .item-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.verdict-banner-item .item-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.verdict-banner-item .item-value.highlight {
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.verdict-banner-item .item-value.profit {
  color: #10b981;
  text-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.verdict-banner-item .item-value.roi {
  color: #60a5fa;
  text-shadow: 0 2px 8px rgba(96, 165, 250, 0.4);
}

@media (max-width: 768px) {
  .verdict-banner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .verdict-badge-large .verdict-text {
    font-size: 16px;
  }
  
  .verdict-banner-item .item-value {
    font-size: 18px;
  }
}

/* ============================================
   SELLER MOTIVATION COMPACT (NEW - Quick view)
   ============================================ */
.seller-motivation-compact {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border-radius: 10px;
  padding: 12px 24px;
  margin: 0 20px 15px 20px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.motivation-compact-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0;
}

.motivation-compact-header .motivation-icon {
  font-size: 20px;
}

.motivation-compact-header .motivation-label {
  font-weight: 600;
}

.motivation-compact-header .motivation-score-compact {
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 18px;
}

.motivation-compact-header .motivation-level {
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.motivation-compact-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  opacity: 0.95;
}

.motivation-compact-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.motivation-compact-stats .stat-item strong {
  font-size: 18px;
  font-weight: 800;
}

.motivation-compact-stats .stat-divider {
  opacity: 0.5;
  font-weight: 300;
}

@media (max-width: 768px) {
  .seller-motivation-compact {
    padding: 14px 18px;
  }
  
  .motivation-compact-header {
    flex-wrap: wrap;
    font-size: 14px;
  }
  
  .motivation-compact-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .motivation-compact-stats .stat-divider {
    display: none;
  }
}

/* ============================================
   PROPERTY BASICS CARD (NEW - Essential specs)
   ============================================ */
.property-basics-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin: 0 20px 20px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.basics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.basics-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  transition: all 0.2s;
}

.basics-item:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.basics-item i {
  font-size: 24px;
  color: #667eea;
}

.basics-item > span:nth-child(2) {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
}

.basics-item .basics-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .basics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .basics-item {
    padding: 10px;
  }
  
  .basics-item > span:nth-child(2) {
    font-size: 18px;
  }
}

/* ============================================
   PHOTO GALLERY CONTAINER (Collapsible)
   ============================================ */
.property-gallery-container {
  margin: 0 20px 20px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
}

.gallery-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.gallery-header h3 i {
  color: #667eea;
}

.gallery-header .photo-count {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-left: 4px;
}

.toggle-gallery-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-gallery-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.toggle-gallery-btn i {
  transition: transform 0.3s;
}

.toggle-gallery-btn.expanded i {
  transform: rotate(180deg);
}

.property-gallery {
  padding: 20px;
}

@media (max-width: 768px) {
  .gallery-header {
    padding: 12px 16px;
  }
  
  .gallery-header h3 {
    font-size: 14px;
  }
  
  .toggle-gallery-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Map Modal Styles */
.map-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.map-modal-content {
  background: white;
  border-radius: 10px;
  width: 95%;
  max-width: 1400px;
  height: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.map-modal-header {
  padding: 20px 30px;
  border-bottom: 2px solid var(--medium-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.map-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--text-color);
}

.map-close-button {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  line-height: 1;
}

.map-close-button:hover {
  background: var(--light-gray);
  color: var(--text-color);
}

.map-modal-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 0; /* Allow flex shrinking */
}

.map-modal-footer {
  padding: 15px 30px;
  border-top: 2px solid var(--medium-gray);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.map-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-view-btn {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.map-view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* ═══════════════════════════════════════════════════════════════ */
/* BIRD'S EYE VIEW IMAGES TAB                                      */
/* ═══════════════════════════════════════════════════════════════ */

.birdseye-images-content {
  padding: 20px;
}

.birdseye-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.birdseye-image-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.birdseye-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.birdseye-image-card h4 {
  margin: 0;
  padding: 15px 20px;
  background: #3b82f6;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.birdseye-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 aspect ratio */
  background: #f5f5f5;
  overflow: hidden;
}

.birdseye-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.birdseye-image-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #999;
  padding: 20px;
}

.birdseye-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.birdseye-loading .spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.birdseye-error {
  text-align: center;
  padding: 40px;
  color: #e74c3c;
}

.birdseye-generate-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.birdseye-generate-btn:hover {
  background: #2563eb;
}

.birdseye-generate-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Location highlight in comp cards */
.comp-detail.location-highlight {
  background: #e0f2fe;
  border-left: 3px solid #0284c7;
  padding: 4px 8px;
  margin: 4px -8px;
  border-radius: 4px;
  font-weight: 500;
  color: #075985;
}

/* Comp map thumbnails */
.comp-map-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.comp-map-thumbnails:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.comp-map-thumb {
  flex: 1;
  min-width: 0;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comp-map-thumb:hover {
  border-color: #3b82f6;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.comp-map-thumb.comp-map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  cursor: default;
}

.comp-map-thumb.comp-map-loading:hover {
  transform: none;
  box-shadow: none;
}

.comp-map-thumb .loading-text,
.comp-map-thumb .error-text {
  text-align: center;
  padding: 8px;
}

.comp-map-thumb .error-text {
  color: #dc2626;
}
