/*
Theme Name: RealtyBasicPro
Theme URI: https://example.com/realtybasicpro
Author: ChatGPT for Nithin
Author URI: https://example.com
Description: Lightweight real estate listing theme with Property CPT, filters, and Customizer color controls.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: realtybasicpro
Tags: real-estate, responsive, grid-layout, custom-colors
*/

/* Basic reset & CSS variables (colors controlled by Customizer) */
:root {
  --rbp-primary: #4f46e5;
  --rbp-secondary: #14b8a6;
  --rbp-text: #111827;
  --rbp-muted: #6b7280;
  --rbp-bg: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--rbp-text);
  background: var(--rbp-bg);
  line-height: 1.6;
}
a { color: var(--rbp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.header { position: relative; z-index: 50; background: #fff; border-bottom: 1px solid #eee; }
.header.transparent { background: transparent; border-bottom: 0; position: absolute; width: 100%; }
.nav { display: flex; gap: 16px; align-items: center; }
.nav a { padding: 10px 8px; font-weight: 600; color: #111827; }
.nav a:hover { color: var(--rbp-primary); }
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.brand-title { font-size: 20px; font-weight: 800; }

.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--rbp-primary); color: #fff; font-weight: 700; }
.btn.secondary { background: var(--rbp-secondary); }
.btn.ghost { background: transparent; border: 1px solid var(--rbp-primary); color: var(--rbp-primary); }
/* Desktop: keep menu horizontal */
.nav > ul{
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav > ul > li{
  border: 0;               /* ensure no dividers on desktop */
}
.nav > ul > li > a{
  display: inline-block;    /* classic inline look on desktop */
  padding: 10px 8px;
}

.hero {
  position: relative; isolation: isolate;
  background: #0f172a;
  color: #fff;
  min-height: 420px;
  display: grid; place-items: center; text-align: center; padding: 80px 16px;
}
.hero.bg {
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.55));
  z-index: -1;
}
.hero h1 { font-size: 42px; margin: 0 0 8px; }
.hero p { font-size: 18px; opacity: .95; }
.hero .actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.section { padding: 56px 0; }
.section h2 { margin: 0 0 12px; font-size: 28px; }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.card { border: 1px solid #eee; border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card .p { padding: 14px; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--rbp-muted); font-size: 14px; }
.price { font-size: 20px; font-weight: 800; color: var(--rbp-primary); }

.filter-bar { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.filter-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.filter-row .field { display: flex; flex-direction: column; gap: 6px; }
.filter-row input, .filter-row select { padding: 10px; border-radius: 10px; border: 1px solid #e5e7eb; }
@media (max-width: 1024px){ .filter-row { grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 640px){ .filter-row { grid-template-columns: 1fr; } }

.footer { background: #0b1020; color: #cbd5e1; padding: 28px 0; margin-top: 56px; }
.footer a { color: #a5b4fc; }

/* Utility */
.m-0 { margin:0; }
.mt-0{ margin-top:0;}
.mt-2{ margin-top:8px;}
.mt-3{ margin-top:12px;}
.mt-4{ margin-top:16px;}
.mt-6{ margin-top:24px;}
.text-center{ text-align:center; }

/* Floral hero */
.hero.floral {
  min-height: 520px;
  background: #10172a;
  display: grid;
  place-items: center;
  padding: 120px 16px 80px;
  text-align: center;
}
.hero.floral .overlay { position:absolute; inset:0; background:rgba(0,0,0,0.4); }
.hero.floral .container { position:relative; z-index:10; }
.hero.floral h1 { font-size:48px; margin-bottom:12px; }
.hero.floral p { font-size:20px; max-width:640px; margin:0 auto; }
.hero .eyebrow { letter-spacing:.25em; text-transform:uppercase; font-size:12px; color:#c7d2fe; }
.hero .display { font-family:'Playfair Display',serif; font-weight:700; font-size:clamp(40px,6vw,64px); margin:8px 0 6px; }
.hero .script { font-family:'Great Vibes',cursive; font-size:clamp(36px,5vw,56px); color:var(--rbp-secondary); display:block; line-height:1; margin-top:4px; }
.hero .subtle { color:#e5e7eb; max-width:840px; margin:10px auto 0; font-size:18px; }
.hero .actions{margin-top:20px;}
.hero.floral::before{content:"";position:absolute;inset:0;background-image:radial-gradient(circle at 10% 10%,rgba(79,70,229,.25),transparent 35%),radial-gradient(circle at 90% 20%,rgba(20,184,166,.25),transparent 40%);z-index:-2;}
.hero.floral::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.6));z-index:-1;}

/* Logo and header adjustments */
.custom-logo { width:100px!important; height:100px!important; object-fit:contain; }
.home .header.transparent .nav a { color:#fff!important; }
.home .header.transparent .nav a:hover { color:var(--rbp-secondary)!important; }
.home .header.transparent .brand-title { color:#fff!important; }
:not(.home) .header .brand-title { color:#111827!important; }
.custom-logo-link { display:block; margin:0!important; padding:0!important; line-height:0!important; }
.custom-logo { display:block; margin:0!important; padding:0!important; }
.header .container { display:flex; align-items:center; justify-content:space-between; max-width:1200px; margin:0 auto; padding:0 16px; }
.header .brand { display:flex; align-items:center; gap:6px; }
.brand-title { margin-left:8px; font-size:20px; font-weight:700; line-height:1.2; }

/* Property details layout */
.prop-layout { display:grid; grid-template-columns:3fr 2fr; gap:22px; align-items:start; }
@media (max-width:960px){ .prop-layout{grid-template-columns:1fr;} }
.rbp-slider{position:relative;overflow:hidden;border-radius:14px;border:1px solid #eee;background:#000;}
.rbp-slides{display:flex;transition:transform .35s ease;will-change:transform;}
.rbp-slide{min-width:100%;user-select:none;}
.rbp-slide img{width:100%;height:520px;object-fit:cover;display:block;}
@media (max-width:640px){.rbp-slide img{height:360px;}}
.rbp-prev,.rbp-next{position:absolute;top:50%;translate:0 -50%;border:0;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.85);display:grid;place-items:center;cursor:pointer;}
.rbp-prev{left:10px;} .rbp-next{right:10px;}
.rbp-prev:hover,.rbp-next:hover{background:#fff;}
.prop-details{list-style:none;padding:0;margin:0;}
.prop-details li{padding:8px 0;border-bottom:1px solid #eee;}
.prop-details li:last-child{border-bottom:0;}
.prop-features{list-style:disc;padding-left:18px;margin:8px 0 0;}
.prop-header{margin-bottom:12px;}
.prop-desc{border-top:1px solid #eee;padding-top:18px;}

/* Dashboard */
.dashboard-wrap{display:grid;grid-template-columns:240px 1fr;gap:22px;}
@media (max-width:960px){.dashboard-wrap{grid-template-columns:1fr;}}
.dash-menu{border:1px solid #e5e7eb;background:#fff;border-radius:14px;padding:16px;position:sticky;top:80px;height:fit-content;}
.dash-brand{font-weight:800;margin-bottom:10px;font-size:18px;}
.dash-nav{display:grid;gap:6px;margin-bottom:10px;}
.dash-nav a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:#111827;text-decoration:none;border:1px solid transparent;}
.dash-nav a:hover{background:#f8fafc;border-color:#e5e7eb;}
.dash-nav a.active{background:#eef2ff;border-color:#c7d2fe;color:#111827;}
.dash-meta{display:grid;gap:6px;margin-top:4px;}
.dash-meta a{color:#6b7280;text-decoration:none;font-size:14px;}
.dash-meta a:hover{color:#111827;}
.dash-content{border:1px solid #e5e7eb;background:#fff;border-radius:14px;padding:16px;}
.dash-header{border-bottom:1px solid #e5e7eb;padding-bottom:12px;margin-bottom:14px;}

/* Buyers table */
.rbp-table-wrap{overflow:auto;}
.rbp-table{width:100%;border-collapse:collapse;border:1px solid #e5e7eb;background:#fff;border-radius:12px;overflow:hidden;}
.rbp-table th,.rbp-table td{padding:10px 12px;border-bottom:1px solid #e5e7eb;text-align:left;white-space:nowrap;}
.rbp-table thead th{background:#f8fafc;font-weight:700;}
.rbp-table tbody tr:hover{background:#f9fafb; color:black; }
.rbp-table a{color:var(--rbp-primary);text-decoration:none;}
.rbp-pagination{margin-top:12px;}
.rbp-pagination ul{list-style:none;display:flex;gap:6px;padding:0;margin:0;}
.rbp-pagination a,.rbp-pagination span{display:inline-block;padding:6px 10px;border:1px solid #e5e7eb;border-radius:8px;text-decoration:none;}
.rbp-pagination .current{background:#eef2ff;border-color:#c7d2fe;font-weight:700;}

/* --- Mobile nav --- */
.menu-toggle{display:none;background:none;border:0;font-size:24px;line-height:1;padding:8px;}
.menu-toggle i{pointer-events:none;}
.menu-toggle .fa-xmark{display:none;} /* bars shown by default */

@media (max-width:960px){
  .menu-toggle{display:inline-flex;align-items:center;justify-content:center;}

  .nav[data-nav]{
    position:fixed;top:0;right:0;height:100vh;width:80vw;max-width:320px;
    background:#fff;box-shadow:-8px 0 24px rgba(0,0,0,.12);
    transform:translateX(100%);transition:transform .3s ease;
    padding:72px 0 16px;display:flex;flex-direction:column;z-index:1000;
  }
  .nav[data-nav].open{transform:translateX(0);}

  .nav[data-nav] ul{list-style:none;margin:0;padding:0;width:100%;}
  .nav[data-nav] li{border-bottom:1px solid #e5e7eb;}
  .nav[data-nav] li:last-child{border-bottom:0;}
  .nav[data-nav] a{display:block;padding:14px 16px;color:#111827;text-decoration:none;}
  .nav[data-nav] a:hover{background:#f9fafb; color:black;}

  /* toggle icon swap */
  .menu-toggle.active .fa-bars{display:none;}
  .menu-toggle.active .fa-xmark{display:inline-block;}

  body.noscroll{overflow:hidden;}
}

/* a11y helper */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:960px){
  /* Ensure mobile panel menu text is visible */
  .nav[data-nav] a {
    color: #111827 !important;   /* dark gray text */
  }
  .nav[data-nav] a:hover {
    background:#f9fafb;
    color:#000 !important;
  }

  /* Force toggle (hamburger/X) icon to dark */
  .menu-toggle i {
    color:#111827 !important;
  }
}
@media (max-width:960px){
  .menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#111827; /* dark icons */
  }

  .nav[data-nav]{
    position:fixed;top:0;right:0;
    height:100vh;width:80vw;max-width:320px;
    background:#ffffff;
    box-shadow:-8px 0 24px rgba(0,0,0,.12);
    transform:translateX(100%);
    transition:transform .3s ease;
    padding:72px 0 16px;
    display:flex;
    flex-direction:column;
    z-index:1000;
  }
  .nav[data-nav].open{transform:translateX(0);}

  /* reset lists, remove bullets */
  .nav[data-nav] ul{list-style:none;margin:0;padding:0;width:100%;}
  .nav[data-nav] li{border-bottom:1px solid #e5e7eb;}
  .nav[data-nav] li:last-child{border-bottom:0;}

  /* force visible link colors */
  .nav[data-nav] a{
    display:block;
    padding:14px 16px;
    color:#111827 !important;  /* ensure dark text */
    background:transparent;
    text-decoration:none;
  }
  .nav[data-nav] a:hover{
    background:#f9fafb;
    color:#000 !important;
  }

  /* toggle icon swap */
  .menu-toggle .fa-xmark{display:none;}
  .menu-toggle.active .fa-bars{display:none;}
  .menu-toggle.active .fa-xmark{display:inline-block;}

  body.noscroll{overflow:hidden;}
}
/* Buyers dashboard topbar */
.dash-topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
.dash-topbar .dash-brand {
  font-weight: 700;
  font-size: 16px;
  margin-right: 12px;
}
.dash-topbar .dash-nav {
  display: flex;
  gap: 12px;
}
.dash-topbar .dash-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: #111827;
  border: 1px solid transparent;
  text-decoration: none;
}
.dash-topbar .dash-nav a:hover {
  background: #f9fafb;
  border-color: #e5e7eb;
}
.dash-topbar .dash-nav a.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  font-weight: 600;
}
/* --- Buyers Dashboard: force 1-column and top bar --- */
.dashboard-wrap.buyers-dashboard{
  display: block;                        /* cancel the 2-col grid */
}

/* if any old sidebar HTML is present, hide it on this dashboard */
.dashboard-wrap.buyers-dashboard .dash-menu{
  display: none !important;
}

/* Top menu bar styling (horizontal) */
.dash-topbar{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
.dash-topbar .dash-brand{
  font-weight: 700;
  font-size: 16px;
  margin-right: 12px;
}
.dash-topbar .dash-nav{
  display: flex;
  gap: 12px;
}
.dash-topbar .dash-nav a{
  padding: 8px 14px;
  border-radius: 8px;
  color: #111827;
  border: 1px solid transparent;
  text-decoration: none;
}
.dash-topbar .dash-nav a:hover{
  background: #f9fafb;
  border-color: #e5e7eb;
}
.dash-topbar .dash-nav a.active{
  background: #eef2ff;
  border-color: #c7d2fe;
  font-weight: 600;
}
.property-chips{
  display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 16px;
}
.property-chips .chip{
  display:inline-block;
  padding:8px 12px;
  border:1px solid #e5e7eb;
  border-radius:999px;
  color:#111827;
  text-decoration:none;
  background:#fff;
}
.property-chips .chip:hover{
  background:#f9fafb;
}
.property-chips .chip.active{
  background:#eef2ff;
  border-color:#c7d2fe;
  font-weight:700;
}
.property-chips{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:16px 0 24px;
}

.property-chips .chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 22px;
  border:2px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  font-size:16px;
  font-weight:600;
  color:#111827;
  text-decoration:none;
  transition:all .2s ease;
}

.property-chips .chip i{
  font-size:18px;
  color:var(--rbp-primary);
}

.property-chips .chip:hover{
  background:#f9fafb;
  border-color:#d1d5db;
}

.property-chips .chip.active{
  background:var(--rbp-primary);
  color:#fff;
  border-color:var(--rbp-primary);
}

.property-chips .chip.active i{
  color:#fff;
}
/* Meta row alignment */
.meta {
  display: flex;
  align-items: flex-end;   /* align bottom of all items */
  gap: 10px;
  flex-wrap: wrap;
  color: var(--rbp-muted);
  font-size: 14px;
  margin-top: 4px;
}

.meta span {
  display: inline-flex;
  align-items: center; /* centers icons with text */
  gap: 4px;
}

/* Price styling */
.price {
  font-size: 20px;
  font-weight: 800;
  color: var(--rbp-primary); /* matches your theme accent */
  line-height: 1;            /* tighter, aligns better */
}

/* Property card title */
.card h2 a, 
.card h3 a, 
.card .title a {
  color: #1f2937; /* neutral dark gray */
  font-weight: 700;
  text-decoration: none;
}

.card h2 a:hover,
.card h3 a:hover,
.card .title a:hover {
  color: var(--rbp-secondary); /* on hover, show secondary accent */
}

/* Price hover subtle effect (optional) */
.price:hover {
  color: var(--rbp-secondary);
}
.price {
  font-size: 20px;
  font-weight: 800;
  color: #28a745;  /* Bootstrap green */
  line-height: 1;
}
.section {
  padding: 24px 0;  /* tighter spacing for all devices */
}

@media (min-width: 960px) {
  .section {
    padding: 56px 0; /* restore larger spacing for desktop only */
  }
}
.section {
  padding: 24px 12px;   /* top/bottom 24px, left/right 12px */
}

@media (min-width: 960px) {
  .section {
    padding: 56px 0;    /* top/bottom 56px, no left/right on large screens */
  }
}
@media (max-width:960px){
  .menu-toggle i {
    color: #ffffff !important; /* white lines/icons */
  }
}
/* Front login card (matches theme cards) */
.rbp-login { display:grid; place-items:center; }
.rbp-login-card{
  width:100%;
  max-width:420px;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  padding:18px 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

#loginform { margin-top:12px; }
#loginform p { margin:0 0 10px; }
#loginform label { font-weight:600; display:block; margin-bottom:6px; }
#loginform input[type="text"],
#loginform input[type="password"]{
  width:100%;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  outline:0;
}
#rememberme{ margin-right:6px; }

#rbp-login-btn{
  margin-top:6px;
  width:100%;
  padding:12px 16px;
  border:0;
  border-radius:10px;
  background: var(--rbp-primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
#rbp-login-btn:hover{ background: #4338ca; }

.rbp-login-links{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
}
.rbp-login-links a{ color: var(--rbp-primary); text-decoration:none; }
.rbp-login-links a:hover{ text-decoration:underline; }


/* Flex layout: logo+title on left, nav on right */
.header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Logo+title stick together */
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px; /* adjust space between logo and title */
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-link {
  text-decoration: none;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827; /* default dark */
}

.brand-title-link:hover .brand-title {
  color: var(--rbp-primary); /* same hover color as menu links */
}
/* Dashboard top bar */
.dash-topbar {
  background: #d1fae5; /* light green (Tailwind’s green-100) */
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.dash-topbar .dash-nav {
  display: flex;
  gap: 12px;
}

.dash-topbar .dash-nav li {
  list-style: none;
}

.dash-topbar .dash-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: #065f46; /* darker green text */
  font-weight: 600;
  text-decoration: none;
}

.dash-topbar .dash-nav a:hover {
  background: #a7f3d0; /* slightly darker green */
  color: #064e3b;
}
/* Buyer row colors */
.status-live      { background: #28a745; color:white; }   /* green-100 */
.status-active    { background: #bbf7d0; }   /* lighter green */
.status-noresponse{ background: #fee2e2; }   /* light red */
.status-rejected  { background: #fecaca; }   /* stronger red */
.rbp-table td a {
  color: #111827 !important;   /* dark gray/black */
  text-decoration: none !important;
}

/* Stop horizontal scroll for buyers table */
.rbp-table-wrap.no-scroll { overflow: visible; }

/* Make table more compact and predictable widths */
.rbp-table.rbp-table-expand { table-layout: fixed; }
.rbp-table.rbp-table-expand th,
.rbp-table.rbp-table-expand td { vertical-align: top; }

/* Only comments cell wraps text; others stay tidy */
.rbp-table .td-comments {
  white-space: normal;
  word-wrap: break-word;
}

/* Read more button */
.btn-readmore {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  cursor: pointer;
}
.btn-readmore:hover { background: #eef2ff; }

/* Hidden detail row box */
.buyer-detail .detail-box{
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
}
.buyer-detail .detail-head{
  font-weight: 700;
  margin-bottom: 6px;
}
.buyer-detail .detail-body{
  white-space: pre-wrap; /* respect newlines */
  line-height: 1.5;
}
.buyer-detail .detail-actions{
  margin-top: 8px;
  text-align: right;
}
.buyer-detail .btn-readmore.close{
  background: #fff;
}
/* No horizontal scroll */
.rbp-table-wrap.no-scroll { overflow: visible; }

/* Table layout */
.rbp-table.rbp-table-expand { table-layout: fixed; }
.rbp-table.rbp-table-expand th,
.rbp-table.rbp-table-expand td { vertical-align: top; }

/* Only comments cell wraps */
.rbp-table .td-comments { white-space: normal; word-wrap: break-word; }

/* Action button */
.btn-view{
  display:inline-block;
  padding:6px 10px;
  font-size:12px;
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#f9fafb;
  cursor:pointer;
}
.btn-view:hover{ background:#eef2ff; }

/* Accordion detail */
.buyer-detail .detail-box{
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px;
}
.buyer-detail .detail-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.buyer-detail .detail-item .detail-label{
  font-weight:700; margin-bottom:4px;
}
.buyer-detail .detail-item .detail-value{
  white-space:pre-wrap; line-height:1.5;
}
.buyer-detail .detail-item.detail-comments{
  grid-column: 1 / -1; /* full width */
}
.buyer-detail .detail-actions{
  margin-top:10px; text-align:right;
}
.buyer-detail .btn-view.close{ background:#fff; }

/* ===== Buyers table layout fix ===== */

/* Let the browser size columns naturally (prevents squeezing/overlap) */
.rbp-table.rbp-table-expand {
  table-layout: auto;
}

/* General cell behavior: wrap text, no overlap, top-align */
.rbp-table.rbp-table-expand th,
.rbp-table.rbp-table-expand td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

/* Column widths (based on your header order):
   1: No.  2: Name  3: Requirement  4: Comments  5: Status  6: Action */
.rbp-table.rbp-table-expand th:nth-child(1),
.rbp-table.rbp-table-expand td:nth-child(1) { width: 60px; }

.rbp-table.rbp-table-expand th:nth-child(2),
.rbp-table.rbp-table-expand td:nth-child(2) { width: 22%; }

.rbp-table.rbp-table-expand th:nth-child(3),
.rbp-table.rbp-table-expand td:nth-child(3) { /* Requirement */
  width: 18%;
}

.rbp-table.rbp-table-expand th:nth-child(4),
.rbp-table.rbp-table-expand td:nth-child(4) { /* Comments */
  width: 40%;
}

/* Keep Status & Action compact */
.rbp-table.rbp-table-expand th:nth-child(5),
.rbp-table.rbp-table-expand td:nth-child(5) { width: 140px; }
.rbp-table.rbp-table-expand th:nth-child(6),
.rbp-table.rbp-table-expand td:nth-child(6) { width: 110px; }

/* Preview inside Comments: show a short teaser; full text appears in accordion */
.rbp-table .td-comments .c-preview {
  display: block;
  max-height: 3.2em;     /* about 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Accordion detail box still looks good */
.buyer-detail .detail-box{
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px;
}

/* Responsive tweak: stack a bit tighter on narrow screens */
@media (max-width: 820px){
  .rbp-table.rbp-table-expand th:nth-child(2),
  .rbp-table.rbp-table-expand td:nth-child(2) { width: 28%; }
  .rbp-table.rbp-table-expand th:nth-child(3),
  .rbp-table.rbp-table-expand td:nth-child(3) { width: 22%; }
  .rbp-table.rbp-table-expand th:nth-child(4),
  .rbp-table.rbp-table-expand td:nth-child(4) { width: auto; }
}
/* ========= Buyers table: mobile "app-like" layout ========= */
@media (max-width: 720px){
  /* Hide the table header on mobile */
  .rbp-table.rbp-table-expand thead { 
    display: none; 
  }

  /* Turn each row into a card */
  .rbp-table.rbp-table-expand tbody tr {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  /* Keep your status background hint, but soften it for cards */
  .rbp-table.rbp-table-expand tbody tr.status-live      { background: #ecfdf5; } /* softer green */
  .rbp-table.rbp-table-expand tbody tr.status-active    { background: #eafff1; }
  .rbp-table.rbp-table-expand tbody tr.status-noresponse{ background: #fff1f2; }
  .rbp-table.rbp-table-expand tbody tr.status-rejected  { background: #ffe4e6; }

  /* Each cell becomes a labeled line */
  .rbp-table.rbp-table-expand tbody tr > td {
    display: grid;
    grid-template-columns: 110px 1fr; /* label | value */
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    white-space: normal;
    word-break: break-word;
  }
  .rbp-table.rbp-table-expand tbody tr > td:last-child {
    border-bottom: 0;
  }

  /* Labels come from data-label attribute */
  .rbp-table.rbp-table-expand tbody tr > td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #374151;
  }

  /* Compact the “No.” row label; we render it as a small badge */
  .rbp-table.rbp-table-expand tbody tr > td[data-label="No."]{
    grid-template-columns: 60px 1fr;
  }

  /* Comments preview lines */
  .rbp-table .td-comments .c-preview{
    max-height: none;  /* let it flow; accordion still shows full below */
  }

  /* Action button row */
  .rbp-table.rbp-table-expand tbody tr > td[data-label="Action"]{
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Detail/accordion row becomes a full-width card section */
  .buyer-detail {
    display: none; /* toggled by JS */
  }
  .buyer-detail td {
    display: block;
    padding: 12px !important;
  }
  .buyer-detail .detail-box{
    background: #ffffff;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
  }
  .buyer-detail .detail-grid{
    display: grid;
    grid-template-columns: 1fr; /* stack fields */
    gap: 10px;
  }
}
/* ========= Buyers table: mobile "app-like" layout ========= */
@media (max-width: 720px){
  /* Hide the table header on mobile */
  .rbp-table.rbp-table-expand thead { 
    display: none; 
  }

  /* Each row is a card */
  .rbp-table.rbp-table-expand tbody tr {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  /* Keep your status backgrounds but soften for cards */
  .rbp-table.rbp-table-expand tbody tr.status-live      { background: #ecfdf5; }
  .rbp-table.rbp-table-expand tbody tr.status-active    { background: #eafff1; }
  .rbp-table.rbp-table-expand tbody tr.status-noresponse{ background: #fff1f2; }
  .rbp-table.rbp-table-expand tbody tr.status-rejected  { background: #ffe4e6; }

  /* Cells become label | value rows */
  .rbp-table.rbp-table-expand tbody tr > td {
    display: grid;
    grid-template-columns: 110px 1fr; /* label | value */
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    white-space: normal;
    word-break: break-word;
  }
  .rbp-table.rbp-table-expand tbody tr > td:last-child {
    border-bottom: 0;
  }

  /* Labels from data-label attribute */
  .rbp-table.rbp-table-expand tbody tr > td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #374151;
  }

  /* Action row styling */
  .rbp-table.rbp-table-expand tbody tr > td[data-label="Action"]{
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Detail/accordion row as a full-width section */
  .buyer-detail { display: none; } /* JS toggles this */
  .buyer-detail td {
    display: block !important;
    padding: 12px !important;
  }
  .buyer-detail .detail-box{
    background: #ffffff;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
  }
  .buyer-detail .detail-grid{
    display: grid;
    grid-template-columns: 1fr; /* stack fields */
    gap: 10px;
  }
}

/* Keep desktop table tidy and no overlap */
.rbp-table-wrap.no-scroll { overflow: visible; }
.rbp-table.rbp-table-expand { table-layout: auto; }
.rbp-table.rbp-table-expand th,
.rbp-table.rbp-table-expand td { 
  white-space: normal; 
  word-break: break-word; 
  vertical-align: top; 
}




