/* Main popup styling */



/* Root CSS variable to adjust for header (can be overridden) */
:root {
  --ce-header-height: 80px;
  --ce-modal-max-height: calc(100vh - var(--ce-header-height));
}

.estimate-button {
    background: #0056b3;
    color: white;
    padding: 12px 24px;
    border: none;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
}

#cost-estimator-popup {
    position: fixed;
    top: var(--ce-header-height, 80px);  /* Remove the hardcoded 113px */
    left: 0;
    width: 100%;
    height: calc(100vh - var(--ce-header-height, 80px));
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    background: #f5f5f5 !important; /* Light gray backdrop like Livspace */
    backdrop-filter: none !important;
    background-size: cover;
    overflow: hidden;
    padding: 0 !important; 
}

/* ───────────────────────────────────────
   ✅ Modal adapts to viewport – no overflow
──────────────────────────────────────── */
.cost-estimator-modal {
  width: 100%;
  max-width: 720px;
  height: calc(100vh - var(--ce-header-height, 80px));
  max-height: calc(100vh - var(--ce-header-height, 80px));
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;/* push below header */
  overflow: hidden;
  margin: 20px auto;
}


/* Now elevate header ABOVE popup */
.site-header, .ast-header-break-point {
    position: relative;
    z-index: 11000;
}

/* ───────────────────────────────────────
   ✅ Scrollable internal area – no visible bar
──────────────────────────────────────── */

/* ───────────────────────────────────────
   SAFETY-NET – hide every step by default ⬇️
   (Insert BEFORE the scrollable-area styles)
──────────────────────────────────────── */
.estimate-step{
  display:none;      /* default: invisible */
}

/* The JS adds .active when a step is shown */
.estimate-step.active{
  display:block;     /* already present lower in your file */
}


.estimate-step {
  flex-grow: 1;
  overflow-y: auto;
  padding: 30px 40px 80px; /* bottom space for buttons */
  box-sizing: border-box;
}

.estimate-step::-webkit-scrollbar {
  display: none;
}

.estimate-step.active {
  display: block; 
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
  position: relative;
  text-align:center;
}

.step-buttons {
  margin-top: 40px;
  padding-bottom: 20px;
  text-align: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.step-buttons button {
  flex: 1;
  padding: 12px 0;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  color: #fff;
  cursor: pointer;
  background: #5c6cf3;
}

@media (min-width: 769px) {
  .step-buttons button {
    max-width: 240px;    /* ✅ Control button width on desktop */
    margin: 0 auto;      /* ✅ Center the button horizontally */
  }
}

.step-buttons .back-step {
  background: #6c757d;
}

.counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.counter label {
    flex: 1;
    font-weight: 500;
}

.counter button {
    padding: 6px 14px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.counter button:hover {
    background-color: #2980b9;
}

.counter span {
    font-size: 16px;
    width: 30px;
    text-align: center;
    display: inline-block;
}

input[type="range"] {
    width: 100%;
}

.plans-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 30px;
}

.plan-box {
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 20px;
  width: 260px;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.plan-box:hover {
  border-color: #0d6efd;
  background: #eef5ff;
}

.plan-box.selected {
  border-color: #0d6efd;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.plan-box h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #111;
}

.plan-box p {
  font-size: 14px;
  color: #555;
}

.plan-option {
  border: 1px solid #ccc;
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.plan-option input[type="radio"] {
  display: none; /* hide default radio button */
}

.plan-option .plan {
  margin-left: 10px;
}

/* This makes the whole box highlight when selected */
.plan-option input[type="radio"]:checked + .plan {
  border: 2px solid #007bff;
  background-color: #e6f0ff;
  border-radius: 8px;
  padding: 10px;
}


.plan {
    font-size: 16px;
}

label {
    display: block;
    margin-bottom: 10px;
}

h3 {
    color: #333;
    margin-bottom: 15px;
}


.close-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 8px;
    cursor: pointer;
}


body.cost-estimator-open {
    overflow: hidden;
}

footer,
#colophon,
.site-footer,
.footer {
    position: relative;
    z-index: 1;
}

body.cost-estimator-open footer,
body.cost-estimator-open #colophon,
body.cost-estimator-open .site-footer,
body.cost-estimator-open .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 11000;
    background: #fff;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

    .estimator-step-heading{
      font-size:28px;
      font-weight:600;
      line-height:1.4;
      text-align:center;
      margin:0 0 32px;
      color:#222;
    }
    
    .option-row {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      justify-content: center;
      margin-bottom: 20px;
    }
    
    .custom-radio {
      display: inline-block;
      border: 2px solid #ccc;
      border-radius: 30px;
      padding: 10px 20px;
      font-weight: 500;
      background: #fff;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .custom-radio input[type="radio"] {
      display: none;
    }
    
    .custom-radio input[type="radio"]:checked + span {
      color: #0d6efd;
      font-weight: 600;
    }
    
    .custom-radio:hover {
      border-color: #aaa;
    }
    
    .custom-radio.selected {
      border-color: #3498db;              /* ✅ Green border like kitchen pill */
      background-color: #f8f8f8;          /* ✅ Light gray fill like kitchen pill */
    }
    
    .custom-radio.selected span {
      color: inherit;                     /* ✅ Keep original text color */
      font-weight: 500;                   /* Optional: don't increase font weight */
    }

    
    /* ──────────────────────────────────────────────
       Progress Bar
   ────────────────────────────────────────────── */
        
    .estimator-progress {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin: 20px 0 30px;
      padding: 0 20px;
    }
    
    .estimator-progress .step-indicator {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: #e2e8f0; /* Light gray */
      transition: background 0.3s, transform 0.2s;
      position: relative;
    }
    .estimator-progress .step-indicator::after {
      content: attr(data-step);
      position: absolute;
      color: white;
      font-size: 12px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
    .estimator-progress .step-indicator.active {
      background-color: #5c6cf3; /* Indigo */
      transform: scale(1.15);
      box-shadow: 0 0 0 3px rgba(92, 108, 243, 0.25);
    }
    
    /* ──────────────────────────────────────────────
   Units step styling
   ────────────────────────────────────────────── */
       
       .unit-option-row {
      display: flex;
      justify-content: center;
      margin-bottom: 30px;
    }
    
    .custom-checkbox {
      display: inline-block;
      border: 2px solid #ccc;
      border-radius: 30px;
      padding: 10px 20px;
      font-weight: 500;
      background: #fff;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .custom-checkbox input[type="checkbox"] {
      display: none;
    }
    
    .custom-checkbox input[type="checkbox"]:checked + span {
      color: #0d6efd;
      font-weight: 600;
    }
    
    .custom-checkbox:hover {
      border-color: #aaa;
    }
    
    .unit-counter-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 24px;
      margin-top: 20px;
    }
    
    .unit-counter {
      background: #f8f9fb;
      border: 1px solid #ddd;
      padding: 16px 20px;
      border-radius: 10px;
      text-align: center;
      min-width: 160px;
    }
    
    .unit-counter label {
      font-weight: 600;
      display: block;
      margin-bottom: 8px;
    }
    
    .unit-stepper {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 12px;
      font-size: 18px;
    }
    
    .unit-stepper button {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      font-size: 16px;
      background: #0d6efd;
      color: white;
      border: none;
      cursor: pointer;
      line-height: 1;
    }
    
    .unit-stepper span {
      min-width: 20px;
      display: inline-block;
      text-align: center;
    }

    
    /* ===================================================================
       🔄 Counters – pill-buttons & tick-icon for Modular Kitchen
       =================================================================== */
    .ce-unit-box{                 /* wrapper (Wardrobes, Crockery …) */
      display:inline-block;
      background:#f8f8f8;
      border:1px solid #ddd;
      border-radius:10px;
      padding:14px 18px;
      margin:10px;
      text-align:center;
      min-width:160px;
    }
    .ce-unit-box h5{margin:0 0 8px;font-size:15px;font-weight:600;color:#555}
    
    .ce-pill-btn{                 /* + / – buttons */
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:36px;
      height:24px;
      border-radius:999px;
      background:#0866ff;
      color:#fff;
      font-size:18px;
      line-height:1;
      cursor:pointer;
      border:none;
      transition:background .15s;
    }
    .ce-pill-btn:disabled{opacity:.35;cursor:default}
    .ce-pill-btn:not(:disabled):hover{background:#004edb}
    
    .ce-count{display:inline-block;width:24px;text-align:center;font-weight:600}
    
    /* --- Modular-Kitchen tick indicator -------------------------------- */
    #kitchen-pill{
      border:2px solid #3498db;
      position:relative;
    }
    #kitchen-pill::after{         /* ✓ icon */
      content:"\2713";
      position:absolute;
      right:-6px; top:-6px;
      width:18px;height:18px;
      display:flex;align-items:center;justify-content:center;
      background:#30ba6f;
      color:#fff;
      border-radius:50%;
      font-size:12px;
    }
    
    /* Remove native radio styles */
    .plans-container input[type="radio"] {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
    
    /* Base card style */
    .plan-card {
      border: 2px solid transparent;
      border-radius: 10px;
      padding: 20px;
      background-color: #f8f9ff;
      margin-bottom: 20px;
      transition: all 0.3s ease;
      cursor: pointer;
    }
    
    /* Selected card style */
    .plan-card.selected {
      border-color: #4f46e5;
      background-color: #eef2ff;
    }
    
    .plan-card input[type="radio"] {
      display: none;
    }
    
    /* Review card style */

    .ce-review-container {
      padding: 20px;
      background: #fff;
      border-radius: 16px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    }
    
    .ce-review-title {
      text-align: center;
      font-size: 1.8rem;
      margin-bottom: 24px;
    }
    
    .ce-review-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
      margin-bottom: 30px;
    }
    
    .ce-review-card {
      background: #f9f9f9;
      padding: 16px 20px;
      border-radius: 12px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    }
    
    .ce-review-card h4 {
      margin-bottom: 10px;
      color: #333;
      font-size: 1.1rem;
      border-bottom: 1px solid #ddd;
      padding-bottom: 6px;
    }
    
    .ce-review-card p {
      margin: 6px 0;
      font-size: 0.95rem;
    }
    
    .ce-review-card.full-width {
      grid-column: 1 / -1;
    }


/* MOBILE ONLY */
@media (max-width: 768px) {
    #cost-estimator-popup {
        top: var(--ce-header-height);
        height: var(--ce-modal-max-height);
        align-items: flex-start;
        padding: 0 10px 0;
        overflow-y: auto;
    }

    .cost-estimator-modal {
        max-height: none; /* remove fixed height limit */
        width: 100%;
        margin: 0;  
        height: calc(100vh - var(--ce-header-height));
        padding: 20px 0px 140px; /* more bottom padding for buttons */
        box-sizing: border-box;
    }

    .estimate-step {
        margin-bottom: 20px;
        justify-content: space-around;
    }
    
      .ce-review-container {
    padding: 12px;
    border-radius: 12px;
  }

  .ce-review-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
  }

  .ce-review-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ce-review-card {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .ce-review-card h4 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .ce-review-card p {
    font-size: 0.9rem;
    margin: 4px 0;
  }

    
    .step-buttons {
        flex-direction: row;
    }

    .step-buttons button {
        flex: 1;                   /* ✅ Equal width for all step buttons */
        font-size: 16px;
        white-space: nowrap;      /* ✅ Prevent label wrapping like "Confirm and Submit" */
        padding: 12px 0;
    }

    button.next-step,
    button.back-step {
        width: 48%;
        font-size: 16px;
    }
}
