/**
 * GSH Developers Real Estate Marketplace
 * Core Stylesheet: Multivendor Dashboard, Comparison Table, Favorites, and Badges
 */

/* DASHBOARD LAYOUT */
.gsh-dashboard-container {
  display: flex;
  gap: 30px;
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0F172A;
}

.gsh-dash-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px -2px rgba(11, 25, 44, 0.06);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.gsh-user-profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 20px;
}

.user-avatar img {
  border-radius: 50%;
  border: 2px solid #C5A880;
}

.user-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #0B192C;
}

.user-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: #F1F5F9;
  color: #475569;
  border-radius: 10px;
}

.gsh-agent-code-badge {
  display: block;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(197, 168, 128, 0.55);
  border-radius: 5px;
  background: #fffaf2;
  color: #0b192c;
  font-size: 11px;
  font-weight: 800;
}

.gsh-dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dash-nav-link:hover {
  background: #F8FAFC;
  color: #0B192C;
}

.dash-nav-link.active {
  background: #0B192C;
  color: #FFFFFF;
  font-weight: 600;
}

.dash-nav-link .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.dash-nav-link .badge {
  margin-left: auto;
  background: #E2E8F0;
  color: #0F172A;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.dash-nav-link.active .badge {
  background: #1E3E62;
  color: #FFFFFF;
}

.dash-nav-link .badge.highlight {
  background: #C5A880;
  color: #FFFFFF;
}

.dash-nav-link.logout-link {
  margin-top: 20px;
  border-top: 1px solid #E2E8F0;
  padding-top: 15px;
  color: #DC2626;
}

.dash-nav-link.logout-link:hover {
  background: #FEF2F2;
}

/* MAIN DASHBOARD CONTENT */
.gsh-dash-main {
  flex: 1;
  min-width: 0;
}

.gsh-tab-content {
  display: none;
}

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

.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.dash-top-bar h2,
.dash-top-bar h3 {
  margin: 0 0 6px 0;
  color: #0B192C;
  font-weight: 700;
}

.dash-top-bar .subtitle {
  margin: 0;
  color: #64748B;
  font-size: 14px;
}

/* STATS GRID */
.gsh-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.stat-icon .dashicons { font-size: 24px; width: 24px; height: 24px; }
.bg-navy { background: #0B192C; }
.bg-green { background: #10B981; }
.bg-amber { background: #F59E0B; }
.bg-red { background: #EF4444; }
.bg-gold { background: #C5A880; }

.stat-num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #0B192C;
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}

/* WORKFLOW BANNER */
.gsh-workflow-banner {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 22px;
  margin-top: 30px;
}

.gsh-workflow-banner h4 {
  margin: 0 0 15px 0;
  color: #0B192C;
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-steps-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.wf-step {
  flex: 1;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px;
}

.wf-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0B192C;
  color: #fff;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.wf-step strong { display: block; font-size: 14px; color: #0B192C; margin-bottom: 4px; }
.wf-step p { margin: 0; font-size: 12px; color: #64748B; line-height: 1.4; }
.wf-arrow { font-size: 20px; color: #CBD5E1; font-weight: bold; }

/* DASHBOARD TABLES */
.gsh-table-responsive {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.gsh-dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.gsh-dash-table th {
  background: #F8FAFC;
  padding: 14px 16px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #E2E8F0;
}

.gsh-dash-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.table-prop-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.table-thumb-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}

.prop-code-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #0B192C;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.prop-table-price {
  font-weight: 700;
  color: #0B192C;
  margin-top: 3px;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-approved { background: #DEF7EC; color: #03543F; }
.status-sold_out { background: #FEE2E2; color: #B91C1C; }
.status-pending_review { background: #FEF3C7; color: #92400E; }
.status-rejected { background: #FDE8E8; color: #9B1C1C; }
.status-draft { background: #F1F5F9; color: #475569; }

.rejection-note {
  margin-top: 4px;
  font-size: 11px;
  color: #9B1C1C;
  background: #FFF5F5;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #FED7D7;
}

.action-btn-view {
  display: inline-block;
  padding: 6px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  color: #0B192C;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

.action-btn-view:hover {
  background: #0B192C;
  color: #fff;
}

/* WIZARD STEP INDICATOR */
.wizard-steps-indicator {
  display: flex;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 25px;
}

.wz-step-item {
  flex: 1;
  padding: 12px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  background: #F8FAFC;
  border-right: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wz-step-item:last-child { border-right: none; }

.wz-step-item span {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #CBD5E1;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
}

.wz-step-item.active {
  background: #FFFFFF;
  color: #0B192C;
  border-bottom: 2px solid #C5A880;
}

.wz-step-item.active span {
  background: #0B192C;
}

.wz-step-item.completed span {
  background: #10B981;
}

/* WIZARD PANES & FORMS */
.gsh-wizard-form {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.wz-pane { display: none; }
.wz-pane.active { display: block; }
.wz-pane-title { margin: 0 0 20px 0; color: #0B192C; font-size: 18px; border-bottom: 1px solid #E2E8F0; padding-bottom: 12px; }

.gsh-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gsh-input, .gsh-select, .gsh-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 14px;
  color: #0F172A;
}

.gsh-input:focus, .gsh-select:focus, .gsh-textarea:focus {
  outline: none;
  border-color: #0B192C;
  box-shadow: 0 0 0 3px rgba(11, 25, 44, 0.1);
}

.wz-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.gsh-btn {
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gsh-btn-primary { background: #0B192C; color: #FFFFFF; }
.gsh-btn-primary:hover { background: #1E3E62; }
.gsh-btn-secondary { background: #F1F5F9; color: #334155; }
.gsh-btn-secondary:hover { background: #E2E8F0; }
.gsh-btn-outline { background: transparent; border: 1px solid #CBD5E1; color: #475569; padding: 8px 16px; border-radius: 6px; cursor: pointer; }

/* AMENITIES CHECKBOXES */
.gsh-amenities-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gsh-amenities-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  background: #F8FAFC;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  cursor: pointer;
}

/* WIZARD REVIEW SUMMARY */
.wz-review-summary {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  font-size: 14px;
}

/* COMPARISON TABLE */
.gsh-compare-table-wrapper {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-top: 25px;
}

.gsh-compare-scroll-hint {
  display: none;
}

.gsh-compare-table {
  width: 100%;
  min-width: 100%;
  max-width: none !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.gsh-compare-table th, .gsh-compare-table td {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  overflow-wrap: anywhere;
  white-space: normal !important;
  vertical-align: middle;
}

.gsh-compare-table th:last-child, .gsh-compare-table td:last-child {
  border-right: none;
}

.gsh-compare-table .spec-label {
  background: #F8FAFC;
  font-weight: 700;
  color: #0B192C;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.compare-card-head {
  position: relative;
  text-align: center;
}

.compare-card-head img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.compare-code {
  display: inline-block;
  background: #0B192C;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.gsh-compare-table .compare-card-head h4 {
  box-sizing: border-box;
  max-width: 100%;
  margin: 6px 0;
  font-size: 14px;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.gsh-compare-table .compare-card-head h4 a {
  display: block;
  max-width: 100%;
  color: #0B192C;
  text-decoration: none;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.gsh-compare-table .compare-price {
  font-weight: 800;
  color: #C5A880;
  font-size: 16px;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.remove-compare-col {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EF4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 768px) {
  .gsh-compare-page-container {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .gsh-compare-scroll-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 18px 0 -13px;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
  }

  .gsh-compare-scroll-hint .dashicons {
    flex: 0 0 auto;
    color: #9a762e;
  }

  .gsh-compare-table th,
  .gsh-compare-table td {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
  }

  .gsh-compare-table[data-property-count="1"] {
    width: 342px !important;
  }

  .gsh-compare-table[data-property-count="2"] {
    width: 552px !important;
  }

  .gsh-compare-table .spec-label {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    padding: 12px 10px;
  }

  .gsh-compare-table .compare-card-head img {
    height: 112px;
  }

  .gsh-compare-table .compare-card-head h4 {
    font-size: 13px;
    line-height: 1.4;
  }

  .gsh-compare-table .compare-price {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .gsh-compare-table .remove-compare-col {
    right: -5px;
  }
}

/* EMPTY STATES */
.empty-state-box, .gsh-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
}

.empty-state-box p, .gsh-empty-state p {
  color: #64748B;
  font-size: 15px;
  margin-bottom: 20px;
}

.gsh-testimonials { max-width: 1120px; margin: 0 auto; color: #334155; }
.gsh-testimonials-summary { display: flex; align-items: center; gap: 16px; max-width: 350px; margin: 0 0 34px; padding: 20px 22px; border: 1px solid #e2e8f0; border-radius: 12px; background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); box-shadow: 0 14px 34px rgba(11,25,44,.07); }
.gsh-testimonials-summary-star { color: #d99a12; font-size: 36px; line-height: 1; }
.gsh-testimonials-average { color: #0b192c; font-size: 30px; }
.gsh-testimonials-out-of { color: #64748b; }
.gsh-testimonials-summary p { display: inline; margin: 0 0 0 8px; color: #475569; }
.gsh-testimonials-summary small { display: block; margin-top: 4px; color: #64748b; }
.gsh-testimonials-heading { margin: 0 0 20px; }
.gsh-testimonials-heading h2, .gsh-testimonial-form-section h2 { margin: 0 0 8px; color: #0b192c; font-size: 25px; }
.gsh-testimonials-heading p, .gsh-testimonial-form-section > p { margin: 0; color: #64748b; line-height: 1.65; }
.gsh-testimonial-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gsh-testimonial-item { min-width: 0; padding: 22px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(11,25,44,.045); }
.gsh-testimonial-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gsh-testimonial-reviewer { display: flex; min-width: 0; align-items: center; gap: 12px; }
.gsh-testimonial-avatar { display: block; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.gsh-testimonial-reviewer h3 { margin: 0 0 3px; color: #0b192c; font-size: 15px; }
.gsh-testimonial-item time { color: #64748b; font-size: 12px; }
.gsh-testimonial-stars { flex: 0 0 auto; color: #d99a12; white-space: nowrap; }
.gsh-testimonial-item > p { margin: 17px 0 0; color: #475569; line-height: 1.75; overflow-wrap: anywhere; }
.gsh-testimonials-empty { padding: 28px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; text-align: center; }
.gsh-testimonial-form-section { max-width: 760px; margin-top: 48px; padding: 30px; border: 1px solid #e2e8f0; border-radius: 14px; background: linear-gradient(145deg, #fff 0%, #f8fafc 100%); box-shadow: 0 16px 38px rgba(11,25,44,.06); }
.gsh-testimonial-form { display: grid; gap: 18px; margin-top: 22px; }
.gsh-testimonial-form > label:not(.gsh-testimonial-consent) { display: grid; gap: 8px; color: #334155; font-size: 14px; font-weight: 650; }
.gsh-testimonial-form textarea { width: 100%; min-height: 150px; box-sizing: border-box; padding: 13px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; font: inherit; resize: vertical; }
.gsh-testimonial-form textarea:focus-visible { outline: 3px solid rgba(197,168,128,.24); border-color: #c5a880; }
.gsh-testimonial-account { display: flex; align-items: center; gap: 13px; margin-top: 22px; padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.gsh-testimonial-account div { display: grid; gap: 3px; }
.gsh-testimonial-account span { color: #64748b; font-size: 12px; }
.gsh-testimonial-account strong { color: #0b192c; font-size: 15px; }
.gsh-testimonial-login-prompt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 22px; padding: 20px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.gsh-testimonial-login-prompt > .dashicons { color: #c5a880; font-size: 26px; }
.gsh-testimonial-login-prompt strong { color: #0b192c; }
.gsh-testimonial-login-prompt p { margin: 5px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.gsh-testimonial-rating-field { margin: 0; padding: 0; border: 0; }
.gsh-testimonial-rating-field legend { margin-bottom: 7px; color: #334155; font-size: 14px; font-weight: 600; }
.gsh-testimonial-rating-options { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 5px; }
.gsh-testimonial-rating-options label { color: #cbd5e1; font-size: 30px; line-height: 1; cursor: pointer; }
.gsh-testimonial-rating-options input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.gsh-testimonial-rating-options label:has(input:checked), .gsh-testimonial-rating-options label:has(input:checked) ~ label, .gsh-testimonial-rating-options label:hover, .gsh-testimonial-rating-options label:hover ~ label { color: #d99a12; }
.gsh-testimonial-rating-options input:focus-visible + span { outline: 2px solid #0b192c; outline-offset: 2px; }
.gsh-testimonial-consent { display: flex; align-items: flex-start; gap: 9px; color: #475569; font-size: 13px; line-height: 1.5; }
.gsh-testimonial-consent input { margin-top: 3px; }
.gsh-testimonial-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.gsh-testimonial-feedback { margin-top: 14px; padding: 11px 13px; border-radius: 6px; font-size: 14px; }
.gsh-testimonial-feedback.is-success { background: #f0fdf4; color: #166534; }
.gsh-testimonial-feedback.is-error { background: #fef2f2; color: #991b1b; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .gsh-dashboard-container {
    flex-direction: column;
  }
  .gsh-dash-sidebar {
    width: 100%;
    position: static;
  }
  .wizard-steps-indicator {
    display: none;
  }
  .gsh-testimonial-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .gsh-testimonial-form-section { margin-top: 34px; padding: 20px 16px; }
  .gsh-testimonial-item { padding: 18px 15px; }
  .gsh-testimonial-login-prompt { grid-template-columns: auto 1fr; gap: 12px; padding: 16px; }
  .gsh-testimonial-login-prompt .gsh-btn { grid-column: 1 / -1; width: 100%; box-sizing: border-box; justify-content: center; }
  .gsh-testimonial-item-heading { gap: 8px; }
  .gsh-testimonial-stars { font-size: 13px; }
}
