/* artifacts/homeowner-portal/marketing/product-demo.css */
.demo-section {
  scroll-margin-top: 5rem;
  padding: 4rem 1.25rem;
  background-color: #0b0b0b;
  color: #f3f4f6;
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-section, .demo-section * {
  box-sizing: border-box;
}

.demo-header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 600px;
}

.demo-header h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #c9a84c; /* Gold */
  margin-bottom: 0.5rem;
  font-family: inherit; /* Inherits serif from site */
}

.demo-header p {
  color: #a1a1aa;
  font-size: 1.125rem;
  margin: 0;
}

.demo-project-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.demo-select {
  background: #262626;
  color: #fff;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  appearance: auto; /* native dropdown */
}
.demo-select:focus-visible {
  border-color: #c9a84c;
}

.demo-container {
  width: 100%;
  max-width: 375px; /* Mobile width app feel */
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
}

.demo-badge {
  background-color: #c9a84c;
  color: #0b0b0b;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  padding: 0.4rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.demo-role-toggle {
  display: flex;
  background-color: #262626;
  padding: 0.25rem;
  margin: 1rem 1rem 0;
  border-radius: 8px;
}

.demo-role-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #a1a1aa;
  padding: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-role-btn.active {
  background-color: #3f3f46;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.demo-app {
  display: flex;
  flex-direction: column;
  height: 600px;
}

.demo-tabs {
  display: flex;
  border-bottom: 1px solid #333;
  background-color: #111;
  margin: 1rem 0 0;
  padding: 0;
}

.demo-tab {
  flex: 1;
  background: none;
  border: none;
  color: #a1a1aa;
  padding: 1rem 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-align: center;
  margin: 0;
}

.demo-tab:hover {
  color: #e5e7eb;
}

.demo-tab.active {
  color: #c9a84c;
  border-bottom-color: #c9a84c;
}

.demo-tab:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: -2px;
}

.demo-content {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  background-color: #1a1a1a;
}

.demo-view {
  display: none;
  animation: demoFadeIn 0.3s ease;
}

.demo-view.active {
  display: block;
}

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

/* Project View */
.demo-job-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.demo-job-meta {
  font-size: 0.8125rem;
  color: #a1a1aa;
  margin: 0 0 1rem 0;
}

.demo-job-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.demo-scope-label {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background-color: #2a2a2a;
  border: 1px solid #3f3f46;
  border-radius: 16px;
  font-size: 0.7rem;
  color: #d1d5db;
}

.demo-job-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #d1d5db;
}
.demo-job-desc p {
  margin: 0 0 0.75rem 0;
}
.demo-schedule {
  color: #c9a84c;
}

/* Contractor Bid Form */
.demo-contractor-bid-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
}

.demo-contractor-bid-form h4 {
  font-size: 1rem;
  color: #fff;
  margin: 0 0 1rem 0;
}

.demo-input-group {
  margin-bottom: 1rem;
}

.demo-input-group label {
  display: block;
  font-size: 0.75rem;
  color: #a1a1aa;
  margin-bottom: 0.25rem;
}

.demo-fake-input, .demo-fake-textarea {
  background-color: #262626;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  color: #fff;
}
.demo-fake-textarea {
  min-height: 80px;
}


/* Bids View */
.demo-view-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem 0;
}

.demo-bid-card {
  background-color: #262626;
  border: 1px solid #3f3f46;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.demo-bid-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  outline: none;
  border-radius: 4px;
}

.demo-bid-header:hover .demo-bid-contractor strong {
  color: #c9a84c;
}

.demo-bid-header:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 4px;
}

.demo-bid-contractor {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding-right: 0.5rem;
}

.demo-avatar {
  width: 36px;
  height: 36px;
  background-color: #c9a84c;
  color: #0b0b0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.demo-bid-contractor > div {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-bid-contractor strong {
  display: block;
  font-size: 0.9375rem;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.demo-bid-label {
  font-size: 0.75rem;
  color: #a1a1aa;
}

.demo-bid-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.demo-bid-detail {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #3f3f46;
  font-size: 0.875rem;
  color: #d1d5db;
}

.demo-bid-detail p {
  margin: 0 0 0.75rem 0;
}

.demo-bid-card.expanded .demo-bid-detail {
  display: block;
  animation: demoFadeIn 0.2s ease;
}

/* Reviews Blur */
.demo-review-blur {
  position: relative;
  background: #1f1f1f;
  border: 1px solid #333;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.demo-review-content {
  color: transparent;
  text-shadow: 0 0 8px rgba(209, 213, 219, 0.8);
  user-select: none;
}

.demo-review-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 31, 31, 0.6);
  color: #c9a84c;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-revealed-reviews {
  background-color: #262626;
  border: 1px solid #3f3f46;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  animation: demoFadeIn 0.3s ease;
}

.demo-revealed-reviews h4 {
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 0.875rem;
}

.demo-fictitious-note {
  font-size: 0.7rem;
  color: #c9a84c;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.demo-revealed-text {
  font-size: 0.875rem;
  color: #d1d5db;
  line-height: 1.4;
  margin: 0;
}

.demo-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.demo-btn-accept {
  background-color: #c9a84c;
  color: #0b0b0b;
}

.demo-btn-accept:hover, .demo-btn-accept:focus-visible {
  background-color: #d4b86a;
}

.demo-rules-note {
  font-size: 0.7rem;
  color: #a1a1aa;
  margin-top: 0.75rem !important;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 0 !important;
}

/* Messages View */
.demo-messages-disclaimer {
  background-color: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.demo-messages-disclaimer p {
  font-size: 0.75rem;
  color: #d4b86a;
  line-height: 1.4;
  margin: 0;
}

.demo-chat-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.demo-message {
  display: flex;
  max-width: 85%;
}

.demo-message.homeowner {
  align-self: flex-end;
}

.demo-message.contractor {
  align-self: flex-start;
}

.demo-message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.demo-message.homeowner .demo-message-bubble {
  background-color: #c9a84c;
  color: #0b0b0b;
  border-bottom-right-radius: 4px;
}

.demo-message.contractor .demo-message-bubble {
  background-color: #333;
  color: #f3f4f6;
  border-bottom-left-radius: 4px;
}

.demo-chat-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-btn-canned {
  background-color: #3f3f46;
  color: #fff;
}

.demo-btn-canned:hover, .demo-btn-canned:focus-visible {
  background-color: #52525b;
}

.demo-btn-outline {
  background-color: transparent;
  border: 1px solid #52525b;
  color: #a1a1aa;
}

.demo-btn-outline:hover, .demo-btn-outline:focus-visible {
  background-color: #262626;
  color: #fff;
}

.demo-photo-gallery { margin-bottom: 1.5rem; }
.demo-photo-gallery h4 { margin: 0 0 .4rem; color: #f5f5f5; }
.demo-photo-note, .demo-photo-credit { font-size: .72rem; line-height: 1.5; color: #a1a1aa; }
.demo-photo-note { margin: 0 0 .75rem; }
.demo-photo-full { display: block; color: #d4b45c; text-decoration: none; font-size: .75rem; }
.demo-photo-main { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .5rem; }
.demo-photo-full > span { display: block; padding: .4rem 0; }
.demo-photo-thumbnails { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.demo-photo-thumbnails button { min-width: 0; padding: .25rem; border: 1px solid #444; border-radius: .4rem; background: #222; color: #ddd; cursor: pointer; text-align: left; }
.demo-photo-thumbnails button[aria-pressed="true"] { border-color: #d4b45c; background: #39311e; }
.demo-photo-thumbnails img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .2rem; }
.demo-photo-thumbnails span { display: block; padding: .35rem .1rem; font-size: .64rem; line-height: 1.3; }
.demo-photo-thumbnails button:focus-visible, .demo-photo-full:focus-visible { outline: 2px solid #d4b45c; outline-offset: 3px; }

/* Media Query */
@media (max-width: 340px) {
  .demo-bid-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  .demo-bid-price {
    align-self: flex-start;
    padding-left: 2.75rem;
  }
}
