/* ==========================================================================
   GRAVITYVIEW MODULE — SINGLE ENTRY (SHARED LAYOUT)
   --------------------------------------------------------------------------
   File: forms-gravityview-single-shared.css

   Purpose:
   - Defines the shared structural layout for all GravityView single-entry
     templates, regardless of listing type (FounderMatch, Services, Exithub,
     Opportunities, Jobs, PitchDeal).
   - Provides universal spacing, typography, and block-level rules for
     description sections, expertise sections, shaded containers, and GV grid
     row rhythm.
   - Establishes consistent single-entry behavior across listing types while
     allowing each type to layer its own hero and panel styles on top.

   Scope:
   - Applies ONLY to shared single-entry layout primitives.
   - Does NOT style list-view cards (belongs in forms-gravityview-list.css).
   - Does NOT style hero sections (belongs in forms-gravityview-hero.css).
   - Does NOT style component-level panels (belongs in forms-gravityview-panels.css).
   - Does NOT style modals (belongs in forms-gravityview-modals.css).

   Exclusions:
   - No Gravity Forms styling (belongs in forms-gravityforms.css).
   - No BuddyBoss form or registration styling (belongs in forms.css).
   - No directory or profile UI styling.

   Sections:
   14. Single Entry – Description & Expertise Layout
   16. Single Entry – Spacing & Rhythm Layer
   ========================================================================== */
   
   /* ==========================================================================
   14. Single Entry – Description & Expertise Layout
   ========================================================================== */

/* Block wrapper */
.listing-description-block {
  margin-top: 16px;
}

/* Label styling */
.listing-description-label {
  display: block;
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  margin: 0 0 8px 0;
  text-transform: uppercase;
}

/* Main description text */
.listing-description {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding-right: 0;
}

/* Wider screens: cap line length */
@media (min-width: 1200px) {
  .listing-description {
    max-width: 80ch;
  }
}

/* Allow breakout on narrow parent columns */
.listing-description-block.wide .listing-description {
  max-width: none;
}

/* Remove restrictive padding in GV grid columns */
.gv-grid-col-1-1 .listing-description,
.gv-field-1-custom .listing-description {
  padding-right: 0;
}

/* Small screens */
@media (max-width: 520px) {
  .listing-description {
    font-size: 14px;
    max-width: 100%;
  }
}

/* Shaded description container */
.listing-description-block.shaded .listing-description {
  background: #fbfbfd;
  border: 1px solid #f0eef6;
  padding: 16px;
  border-radius: 8px;
}

/* Full-width fixes for shaded blocks */
.gv-field-1-custom .listing-description,
.gv-field-1-custom .listing-description-block .listing-description,
.listing-description-block.shaded .listing-description {
  width: 100% !important;
  max-width: none !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* Force parent container to full width */
.gv-field-1-custom,
.gv-grid-col-1-1 .gv-field-1-custom {
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 12px !important;
}

/* Remove large gutters on desktop */
@media (min-width: 992px) {
  .gv-grid-col-1-1 .gv-field-1-custom {
    padding-right: 12px !important;
    padding-left: 0 !important;
  }
}

/* Label hierarchy for About + Expertise */
.listing-description-label,
.expertise-row > strong,
.expertise-row .expertise-label {
  display: block;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 10px 0;
  font-size: 16px;
  line-height: 1;
}

/* Larger labels on tablet/desktop */
@media (min-width: 768px) {
  .listing-description-label,
  .expertise-row > strong,
  .expertise-row .expertise-label {
    font-size: 18px;
  }
}

/* Expertise list wrapping */
.gv-field-1-custom .expertise-list,
.gv-grid-col-1-1 .gv-field-1-custom .expertise-list,
.expertise-row .expertise-list {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
  white-space: normal !important;
  margin: 0;
}

/* Expertise pill visuals */
.expertise-pill {
  display: inline-block;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  padding: 4px 8px;
  white-space: nowrap;
  background: rgb(230,240,255);
  color: rgb(15,23,42);
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.2;
}

.expertise-pill.expertise-more {
  text-decoration: none;
  cursor: pointer;
}

/* Two-column helper */
.listing-description.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .listing-description.two-col {
    grid-template-columns: 1fr;
  }
}

/* Shaded helper with extra specificity */
.gv-field-1-custom .listing-description-block.shaded .listing-description,
.gv-field-1-custom.shaded .listing-description,
.listing-description-block.shaded .listing-description,
.listing-description.shaded {
  background: #fbfbfd !important;
  border: 1px solid #f0eef6 !important;
  padding: 16px !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06) !important;
}

/* ==========================================================================
   16. Single Entry – Spacing & Rhythm Layer
   ========================================================================== */

/* Reset GV wrapper spacing */
.gv-grid-col-1-1 > .gv-field-1-custom,
.gv-grid-col-1-1 > .gv-field-1-custom > .gv-grid-value {
  margin-top: 0 !important;
  padding-top: 0 !important;
}



/* Bio panel → next row */
.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row {
  margin-top: 24px !important;
  padding-top: 0 !important;
}

.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > :first-child {
  margin-top: 8px !important;
}

/* Bio panel → About */
.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .listing-description-block.shaded,
.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > .listing-description-block.shaded {
  margin-top: 24px !important;
  padding-top: 0 !important;
}

.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .listing-description-block.shaded .listing-description-label,
.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > .listing-description-block.shaded .listing-description-label {
  display: block;
  margin-top: 8px !important;
}

.gv-grid-row:has(.fm-bio-panel) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > :first-child {
  margin-top: 12px !important;
}

/* Expertise row → About */
.gv-grid-row:has(.expertise-row) + .gv-grid-row .listing-description-block.shaded,
.gv-grid-row:has(.expertise-row) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > .listing-description-block.shaded {
  margin-top: 24px !important;
  padding-top: 0 !important;
}

.gv-grid-row:has(.expertise-row) + .gv-grid-row .listing-description-block.shaded .listing-description-label,
.gv-grid-row:has(.expertise-row) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > .listing-description-block.shaded .listing-description-label {
  display: block;
  margin-top: 8px !important;
}

.gv-grid-row:has(.expertise-row) + .gv-grid-row .gv-field-1-custom > .gv-grid-value > :first-child {
  margin-top: 12px !important;
}

/* Expertise row spacing */
.expertise-row {
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
}

.expertise-row .expertise-list {
  margin-bottom: 12px !important;
}

/* Defensive older-browser marker classes */
.gv-grid-row.services-following-row .expertise-row,
.gv-grid-row.fm-following-row .expertise-row {
  margin-bottom: 12px !important;
}

/* Looking-for inline layout */
.fm-panel-founders > .fm-panel-title,
.fm-panel-founders > .fm-panel-title + .fm-chips {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.fm-panel-founders > .fm-panel-title {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  margin-right: 8px !important;
}

/* Responsive fallback */
@media (max-width:520px) {
  .fm-panel-founders > .fm-panel-title,
  .fm-panel-founders > .fm-panel-title + .fm-chips {
    display: block !important;
    width: 100% !important;
  }

  .fm-panel-founders > .fm-panel-title + .fm-chips {
    margin-top: 6px !important;
    white-space: normal !important;
  }
}

/* Read-more button spacing */
.fm-readmore-btn {
  margin-top: 12px !important;
  margin-bottom: 16px !important;
}

/* Panel spacing */
.fm-panel {
  margin-top: 12px !important;
}

@media (max-width:560px) {
  .fm-readmore-btn {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }

  .fm-panel {
    margin-top: 10px !important;
  }
}

/* Visible panel spacing */
.fm-panel[aria-hidden="false"],
.fm-panel:not([hidden]) {
  margin-top: 16px !important;
}

@media (max-width:560px) {
  .fm-panel[aria-hidden="false"],
  .fm-panel:not([hidden]) {
    margin-top: 12px !important;
  }
}

/* Bio panel bottom spacing */
.fm-bio-panel {
  margin-bottom: 24px !important;
}

/* About section spacing */
.listing-description-block.shaded {
  margin-top: 24px !important;
}

/* Bio text spacing */
.fm-bio-text {
  margin-bottom: 12px !important;
}

/* Reviews visibility */
.gv-reviews-area {
  display: none;
}

body.is-services .gv-reviews-area {
  display: block;
}

/* Title-company cleanup */
.hero-title-company {
  display: block;
  line-height: 1.2;
}

.hc-at {
  display: inline-block;
  margin: 0 0.16rem;
  white-space: nowrap;
}

/* Hide empty normalized fields */
.hero-title-company[data-normalized="true"]:empty { display: none !important; }
.hero-title-company[data-normalized="true"] > .hc-title:empty { display: none !important; }
.hero-title-company[data-normalized="true"] > .hc-company:empty { display: none !important; }

/* Website cleanup */
.hero-website[data-normalized="true"] { display: block; }
.hero-website[data-normalized="true"] a.website-link[href=""],
.hero-website[data-normalized="true"] a.website-link:empty {
  display: none !important;
}

/* Tighten spacing after title-company */
.hero-title-company + .hero-cta,
.hero-title-company + .hero-rate,
.hero-title-company + .hero-cta + .hero-rate {
  margin-top: 0.25rem;
}

/* Visually hidden title */
.fm-panel-title.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Seeking roles label consistency */
.fm-panel-join .fm-meta-row strong {
  min-width: 140px;
  font-weight: 600;
}

/* Meta value alignment */
.fm-panel .fm-meta-value {
  display: block;
  min-width: 0;
}