/**
 * Simple Estimate Display Styles
 * Clean, 4-column layout for user selections with improved formatting
 */

/* =====================================================================
   BOOTSTRAP PRIMARY COLOR OVERRIDE
   Override Bootstrap's default primary color with our custom blue
   ===================================================================== */
:root {
    --bs-primary: #1956BC !important;
    --bs-primary-rgb: 25, 86, 188 !important;
}
#wppb_estimate_page {
    width: 100%;
    max-width: 1340px;
    padding: 10px 5px !important;
    margin: 0 auto !important;
    background: transparent !important;
    background-color: transparent !important;
}
#wppb_estimate_page .wppb_container {
    background: none !important;
    background-color: transparent !important;
}
.summary-section.contact-form-section {
    margin: 0px 20px !important;
    padding: 0px 20px !important;
}
.simple-estimate {
    font-size: 0.91rem !important;
    letter-spacing: -0.1px !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none !important;
}
.simple-estimate .card {
    border: 0px solid #D8F4FF !important;
    outline: 0px solid #D8F4FF !important;
    background-color: #EFEFEF !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    overflow: hidden;
}

.section-content.category-content h6.text-primary {
    font-weight: semibold !important;
    font-size: 0.9rem !important;
    letter-spacing: 0px !important;
    margin-bottom: 1px !important;
}

/* Striped card backgrounds - alternating rows */
.simple-estimate .card:nth-child(odd) {
    background-color: #ECFAFF !important;
}

.simple-estimate .card:nth-child(even) {
    background-color: #D8F4FF !important;
}

/* Override all font weights in summary section to be normal */

.simple-estimate span,
.simple-estimate .card-body span {
    font-weight: normal !important;
}
.card-header {
    background-color: transparent !important;
}
.simple-estimate .card-body {
    box-shadow: none !important;
}
p.fw-semibold.mb-2 {
    margin-top: 20px !important;
}
.p-4.summary-pricing-section {
    padding: 5px !important;
}
#wppb_estimate_page {
    background: linear-gradient(90deg, #FFFFFF 50%, #EFEFEF 50%) !important;
    background-color: linear-gradient(90deg, #FFFFFF 50%, #EFEFEF 50%) !important;
    padding: 0px !important;
    gap: 20px !important;
}
#wppb_estimate_page::before {
    background: linear-gradient(90deg, #FFFFFF 50%, #EFEFEF 50%) !important;
    background-color: linear-gradient(90deg, #FFFFFF 50%, #EFEFEF 50%) !important;
    padding: 0px !important;
}
/* Estimate Sections - Alternating Gray Rows */
#wppb_summary_container .card-body,
#wppb_estimate_content .card-body {
    width: 100% !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid #dee2e6 !important;
    margin-bottom: 0 !important;
    padding: 12px 15px !important;
}

#wppb_summary_container .card-body.even-row,
#wppb_estimate_content .card-body.even-row {
    width: 100% !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid #dee2e6 !important;
    margin-bottom: 0 !important;
    padding: 12px 15px !important;
}

/* Estimate Title Border Bottom */
#wppb_summary_container .card-header h5,
#wppb_estimate_content .card-header h5,
#wppb_summary_container h2,
#wppb_estimate_content h2 {
    border-bottom: 2px solid #dee2e6 !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
}

/* Left Column (Estimate) - White Background */
#wppb_summary_container .col-lg-6:first-child,
#wppb_estimate_content .col-lg-6:first-child {
    padding: 0px !important;
}

/* Right Column (Contact Form) - Light Gray Background */
#wppb_summary_container .col-lg-6:last-child,
#wppb_estimate_content .col-lg-6:last-child {
    background: transparent !important;
    padding: 0px !important;
}

/* Remove borders from Contact Form (Right Side) */
#wppb_summary_container .col-lg-6:last-child .card,
#wppb_estimate_content .col-lg-6:last-child .card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

#wppb_summary_container .col-lg-6:last-child .card-body,
#wppb_estimate_content .col-lg-6:last-child .card-body {
    background: transparent !important;
    border: none !important;
    padding: 0px 5px !important;
}

#wppb_summary_container .col-lg-6:last-child .card-header,
#wppb_estimate_content .col-lg-6:last-child .card-header {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #dee2e6 !important;
}


/* Force alternating backgrounds on estimate rows - left column only */
#wppb_summary_container .col-lg-6:first-child .card-body:nth-child(odd),
#wppb_estimate_content .col-lg-6:first-child .card-body:nth-child(odd) {
    background-color: transparent !important;
}

#wppb_summary_container .col-lg-6:first-child .card-body:nth-child(even),
#wppb_estimate_content .col-lg-6:first-child .card-body:nth-child(even) {
    background-color: transparent !important;
}

/* Ensure main container has proper min-height and layout */
#wppb_summary_container .container_content,
#wppb_estimate_content {
    min-height: 100vh !important;
    display: flex !important;
    gap: 0 !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* =====================================================================
   RESPONSIVE STYLES - MOBILE FIXES
   Fix background gradient issues when columns stack on mobile
   ===================================================================== */
@media (max-width: 991px) {
    /* Remove gradient background on mobile - use solid white instead */
    #wppb_estimate_page {
        background: #FFFFFF !important;
        background-color: #FFFFFF !important;
    }
    
    #wppb_estimate_page::before {
        background: #FFFFFF !important;
        background-color: #FFFFFF !important;
    }
    
    /* Ensure proper spacing for stacked columns */
    #wppb_estimate_content .col-lg-6 {
        padding: 0 15px !important;
    }
    
    /* Add subtle background to contact form section on mobile for visual separation */
    #wppb_estimate_content .col-lg-6:last-child {
        background-color: #EFEFEF !important;
        margin-top: 20px !important;
        padding: 20px 15px !important;
        border-radius: 8px !important;
    }
    
    /* Ensure estimate section has white background */
    #wppb_estimate_content .col-lg-6:first-child {
        background-color: #FFFFFF !important;
    }
    
    /* Adjust container padding on mobile */
    .summary-section.contact-form-section {
        margin: 0px 10px !important;
        padding: 0px 10px !important;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    /* Further reduce padding for very small screens */
    #wppb_estimate_page {
        padding: 10px 5px !important;
    }
    
    #wppb_estimate_content {
        padding: 0 10px !important;
    }
    
    /* Ensure cards fit properly on small screens */
    .simple-estimate .card-body {
        padding: 10px 12px !important;
    }
    
    /* Adjust font sizes for better mobile readability */
    .simple-estimate {
        font-size: 0.875rem !important;
    }
}

/* =====================================================================
   INCLUDED SERVICES - DETAIL ROWS
   ===================================================================== */

/* Container for all service detail rows */
.included-services-list {
    margin-top: 12px;
    padding-top: 12px;
}

/* Spacing between individual service rows */
.included-services-list .d-flex {
    margin-bottom: 8px;
}

.included-services-list .d-flex:last-child {
    margin-bottom: 0;
}

/* === Simple Estimate: mobile readability pass === */
.simple-estimate .card-body span { line-height: 1.35; }

/* Never split currency */
.simple-estimate .card-body .d-flex > span:nth-child(3) {
  white-space: nowrap;
}

/* Phones */
@media (max-width: 480px) {
  /* Turn each row into a compact grid */
  .simple-estimate .card-body .d-flex {
    display: grid !important;
    grid-template-columns: 1fr auto;   /* text | price */
    grid-auto-rows: auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
  }

  /* Reset fixed 25% widths from Bootstrap utility classes */
  .simple-estimate .card-body .d-flex > span {
    width: auto !important;
    padding: 0 !important;
  }

  /* 1) Label */
  .simple-estimate .card-body .d-flex > span:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1;
    text-align: left !important;
    font-weight: 600 !important;
    opacity: .92;
  }

  /* 2) Value (can wrap naturally) */
  .simple-estimate .card-body .d-flex > span:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: 2;
    color: #4b5563;
    word-break: normal;
    overflow-wrap: break-word;
  }

  /* 3) Price (lock to the right, no wrapping) */
  .simple-estimate .card-body .d-flex > span:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    text-align: right !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  /* 4) Notes / "Included" column — hide on phones */
  .simple-estimate .card-body .d-flex > span:nth-child(4) {
    display: none !important;
  }

  /* Slightly larger type & spacing for legibility */
  .simple-estimate { font-size: 0.95rem !important; }
  .simple-estimate .card-body { padding: 12px 14px !important; }

  /* Mobile adjustments for included services rows */
  .included-services-list .d-flex {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    margin-bottom: 12px;
  }

  /* Service name - full width on first row */
  .included-services-list .d-flex > span:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1;
    width: 100% !important;
  }

  /* Price - spans both rows, right aligned */
  .included-services-list .d-flex > span:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    text-align: right !important;
    width: auto !important;
  }

  /* "Included" status - hide on mobile */
  .included-services-list .d-flex > span:nth-child(3) {
    display: none !important;
  }
}

