/* combined.css — Option A (Form left, Capsules right) */

/* ===== Base / Reset ===== */
* { box-sizing: border-box; }
html {  box-sizing: border-box;
  margin: 0;
  padding: 0; }
body {
height: 100%;
width: 100%;
  margin: 0;
  font: 14px/1.6;
  color: #222;
  position: static;
  background:
    linear-gradient(120deg,
      #F2F1EE 0%,
      #F2F1EE 35%,
      #F2F1EE 70%,
      #F2F1EE 100%
    );
  background-attachment: fixed;
  perspective: 1200px;
}


/* newly added */
.hidden 
{
  display: none !important; /* Added !important to override .right class */
  height: 0px;
  width: 0px;
}

/* ===== Container & 2-Column Layout ===== */
.container {
   padding: 10px 60px 60px 60px;
   position: relative;
   
}

.section-head 
{
  color: whitesmoke;
  
}
.title-desc
{
  font-size: 40px;
}
.sub 
{
  font-size: 30px;
}

main.container {
  max-width: 100%;
}

/* --- UPDATED: 80% Width for Form Column --- */
.left 
{
  width: 75%; 
}

/* --- UPDATED: 20% Width for Image Column --- */
.image {
  width: 25%;
}

/* combined.css */

.right {
  width: 100%;
  /* CHANGED: Removed fixed 500px height so it doesn't cut off content */
  height: auto; 
  min-height: 600px; /* Ensures it's at least as tall as the map */
  margin-top: 25px;
  display: flex;     /* Ensures child elements fill the space */
  flex-direction: column;
}

.container-mini 
{
  display: flex;
  width: 100%;
}

/* Suggested change: 'cover' fills the 20% strip better than 'contain' */
/* UPDATED: Handles both Image and Iframe (Video) */
.image img, 
.image iframe {
  width: 100%;
  height: 100%;
  border-radius: 0px 20px 20px 0px;
  object-fit: cover; 
  border: 1px solid #B4905A; /* Matches your theme border */
  border-left: 0; /* Removes border where it touches the form */
  display: block;
}

.form-row1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 5px;
}
#formlong label 
{
  margin-top: 40px;
}
#formlong input
{
  width: 100%;
}

/* Stack on mobile */
@media (max-width: 900px) {
  .layout-2col {
    grid-template-columns: 1fr;
  }
  
#formlong label 
{
  margin-top: 25px;
}

#formlong input
{
  width: 320px;
} 
#generateOtp {
    height: 40px;
    margin-top: 10px ;
    font-size: 12px ;
  }

  #otpInput {
    margin-top: 10px ;
    width: 120px;
  }

  #verifyOtp {
    height: 40px;
    padding: 0 12px ;
    margin-top: 10px;
    font-size: 14px;
    width: 110px;
  }
  
    .chip {
    width: 320px !important;  
    font-size: 16px;
  }

  #chipboxtop {
    margin-top: 10px !important;
  }

}

/* ===== Cards (light styling, minimal visual change) ===== */
.card {
  background: rgba(255, 255, 255, 0.15); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  padding: 14px;
  width: 100%;
}
.chip:has(input#separateBox) { width: calc(100.33% - 10px); 
}

.response-desc
{
  font-size: 30px;
}

/* ===== Form ===== */
.form {
  width: 100%;
  height: 100%;
  background: #fff; 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3,1fr); 
  gap: 12px;
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr; 
  }
  .form-row1 {
    grid-template-columns: 1fr; 
  }
  
}

.form-field { display: flex; flex-direction: column; gap: 5px; }
.form label { font-size: 18px; color: #B4905A; font-weight: bold; margin-top: 17px !important; }
.form label.chip {
  color: black;
  width: 340px;
}

.req { color: #b91c1c; }
.form-field button 
{
  background-color: rgb(189, 226, 54);
}
.fac 
{
  color: black;
}
input, select, textarea {

  width: 100%;            
  background: #fff;
  color: #111;
  border: 1px solid #B4905A;
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
input[readonly], input:disabled, select:disabled, textarea:disabled {
  opacity: .7;
  cursor: not-allowed;
  background: #f4f4f4;
}


.otp-inline { display: flex; gap: 8px; align-items: center; }
.otp-verify { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.otp-status { min-width: 18px; font-weight: 700; font-size: 16px; }

/* Chips (Facilities) */
.chips { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 5px;   }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: sans-serif; /* Ensures a clean, modern look */
    font-size: 12px !important;        /* Increased slightly for "normal" readability */
    font-weight: 400;        /* This removes the bold effect */
    padding: 7px 15px;       /* Adjusted padding for a better capsule shape */
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #B4905A;
    cursor: pointer;
    user-select: none;
    width: 180px;
    justify-content: center; /* Centers content if using as a capsule */
}
#chipbox, #chipboxtop {
    margin-top: 0 !important;
    height: auto !important; /* Let content define height */
    min-height: 34px !important;
    line-height: 1.2 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
}
.chip input { accent-color: #3b82f6; width: 15px;  }
.chip-label
{
  font-size: 15px;
  width: 100px;
}

.actions { display: flex; justify-content: flex-end; margin-top: 4px; }

/* ===== Buttons ===== */
#submit 
{
  margin-top: 10px;
  width: 200px;
}
.btn {
  border: 1px solid #B4905A;
  background: #fff;
  color: #111;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: #3b82f6;
  color: #fff;
  border-color: #B4905A;
}
.btn.disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; filter: grayscale(.2);
}

/* ===== Map / Capsules (Right Column) ===== */

.map-section h3 {
  margin: 0 0 8px;
  color: #B4905A;
  padding-bottom: 5px;
}


.map-wrap {
  position: relative;
  /* CHANGED: Reduced from 650px to 550px for a more compact look */
  min-height: 350px !important; 
  /* ... keep other properties same ... */
  border-radius: 12px;
  border: 1px dashed #B4905A;
  opacity: 1;
  background-color: #ffffff;
  background-image: url("../images/yourselection.jpg");
  background-size: auto 85% !important;
  background-repeat: no-repeat !important;
  background-position: 55% center !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible;
  padding: 16px;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 100%;
}



.map-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}
#linesSVG {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card h3 
{
  font-size: 30px;
}
/* Capsule Base */
.capsule {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #B4905A;
  border-radius: 12px;
  /* UPDATED: Slightly reduced padding */
  padding: 8px 12px;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .2s;
  width: 250px;
  
}
.capsule.facCaps 
{
  margin-left: 70px;
}
.capsule.purposeCaps
{
  margin-top: 30px;
}
.capsule:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.capsule-title {
  /* CHANGED: Reduced from 15px to 11px */
  font-size: 11px; 
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #666;
  /* CHANGED: Reduced margin for tighter look */
  margin-bottom: 2px; 
}

/* Optional: Slightly adjust body text to match the smaller headers */
.capsule-body {
  color: #111;
  font-weight: 700;
  font-size: 15px; /* Reduced slightly from 16px/18px */
  word-break: break-word;
}

/* Center Capsule */
.capsule.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 200px;
  background: #f0f7ff;
  border-color: #B4905A;
}

/* Animations used by JS during initial satellite placement */
@keyframes popIn {
  0%   { transform: translate(-50%,-50%) scale(.92); opacity: 0; }
  60%  { transform: translate(-50%,-50%) scale(1.04); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); }
}
@keyframes bounceOnce {
  0%   { transform: translate(-50%,-50%) translateY(0); }
  50%  { transform: translate(-50%,-50%) translateY(-8px); }
  100% { transform: translate(-50%,-50%) translateY(0); }
}
.capsule.pop    { animation: popIn .36s cubic-bezier(.2,.8,.2,1) both; }
.capsule.bounce { animation: bounceOnce .46s cubic-bezier(.2,.8,.2,1) .12s both; }

/* Post-submit “jump” (bump) for all capsules */
@keyframes bump {
  0%   { transform: translate(-50%,-50%) translateY(0) scale(1); }
  40%  { transform: translate(-50%,-50%) translateY(-10px) scale(1.02); }
  70%  { transform: translate(-50%,-50%) translateY(4px) scale(0.99); }
  100% { transform: translate(-50%,-50%) translateY(0) scale(1); }
}
.capsule.bump { animation: bump 420ms cubic-bezier(.2,.8,.2,1) both; }

/* ===== AI Response Card ===== */

.response h2 {
  margin: 0 0 6px;
  font-size: 30px;
  color: #B4905A;
}
.response .ai-output {
  background: #fafafa;
  border: 1px solid #B4905A;
  border-radius: 8px;
  padding: 10px;
  min-height: 80px;
}

/* ===== Loading Overlay ===== */
/* Update .loading-overlay to stack items vertically */
.loading-overlay {
  position: fixed; 
  inset: 0;
  display: flex;
  flex-direction: column; /* Stacks spinner on top of text */
  align-items: center; 
  justify-content: center;
  background: rgba(0,0,0,0.85); /* Darker background for better contrast */
  opacity: 0; 
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 999;
  padding: 20px;
}

.loading-overlay.visible {
  opacity: 1; 
  visibility: visible;
}

/* Update .spinner to have margin bottom instead of right */
.spinner {
  width: 40px; 
  height: 40px;
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0;    /* Remove side margin */
  margin-bottom: 20px; /* Add bottom spacing */
}

/* Ensure text is centered and readable */
.loading-text { 
  font-weight: 700; 
  color: #fff; 
  text-align: center;
  white-space: pre-wrap;
  max-width: 600px; /* Limit width for readability */
  line-height: 1.5;
  font-size: 18px;
}

/* Style the subtext (the changing message) */
.loading-subtext {
  display: block;
  font-weight: 400;
  font-size: 14px;
  margin-top: 10px;
  color: #ddd;
  background: transparent; /* Remove box background for cleaner look */
  padding: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* Equal height columns (desktop) */
@media (min-width: 901px) {
  .layout-2col {
    align-items: stretch; /* make grid rows stretch full height */
  }
  .col.left,
  .col.right {
    display: flex;
    flex-direction: column;
	border: 1px solid #B4905A;
  }

  /* Make both main cards fill height */
  .form,
  .map-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  /* Make capsule map expand to fill right card */
  .map-wrap {
    flex-grow: 1;
    min-height: auto; /* allow it to grow dynamically */
   
  }

  /* Keep AI response separate & below form */
  .response {
	  border: 1px solid #B4905A;
    margin-top: 16px;
  }
  
  .form-row.otp-row .otp-inline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
}

/*.form-row.otp-row .otp-inline > * {*/
/* display: flex; align-items: center; justify-content: center;*/
/*}*/
.form-row.otp-row .otp-inline input {
  width: 100%; padding: 0; line-height: 25px; text-align: center; border-radius: 8px;
}
.form-row.otp-row .otp-inline .btn {
  width: 100%; padding: 0; border-radius: 8px; line-height: 25px; 
}
}

/* =========================
   OTP UI Enhancements
   - gap between Facilities & OTP row
   - keep tick mark inline
   - equal width elements in OTP row
   ========================= */

/* Add space above OTP row */
.form-row.otp-row {
  margin-top: 12px;
}

/* Ensure all OTP elements stay in the same row and equal widths */
.otp-inline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto; /* Generate | Input | Verify | ✓ */
  gap: 8px;
  align-items: center;
  width: 100%;
  
}
#generateOtp {
    display: flex;
    align-items: center;     /* vertical center */
    justify-content: center; /* horizontal center */

    height: 48px;           
    padding: 0 20px;
    text-align: center;
    margin-top: 20px;
  }
  #otpInput 
  {
    margin-top: 20px;
  }
#verifyOtp 
{
   display: flex;
    align-items: center;     /* vertical center */
    justify-content: center; /* horizontal center */
     margin-top: 20px;
    height: 48px;         
    padding: 0 20px;
    text-align: center;
}

.otp-status {
  
  min-width: 18px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap; /* Prevent wrapping the tick ✅ */
}

@media (max-width: 600px) {
  .otp-inline {
    grid-template-columns: 1fr 1fr 1fr auto;
  }
}

/* ✅ Force OTP row in one single line */
.form-row.otp-row .otp-inline {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

/* ✅ Prevent verify button and tick from going down */
#verifyOtp, .otp-status {
  white-space: nowrap !important;
}

/* ✅ Make OTP input + buttons equal height */
.form-row.otp-row .otp-inline input,
.form-row.otp-row .otp-inline button {
  height: 36px !important;
  line-height: 36px !important;
}

/* ✅ Tick must stay inline */
.otp-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* --- Bounce via CSS variable (no transform override) --- */
.capsule {
  --jumpY: 0px;              /* default offset */
}

/* Replace any older bounce that set transform with this variable-only animation */
@keyframes capsule-bounce-down {
  0%, 100% { --jumpY: 0px; }
  50%      { --jumpY: 6px; }  /* bounce DOWN only */
}

/* If you have a .bounce class added by JS, just animate the variable */
.capsule.bounce {
  animation: capsule-bounce-down 520ms ease;
  /* DO NOT set transform here. Leave transform to inline JS so position stays stable. */
}

/* OTP row stays on one line */
.form-row.otp-row .otp-inline {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr auto !important; /* Generate | OTP | Verify | ✓ */
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
}
.otp-status {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.form-row.otp-row .otp-inline input,
.form-row.otp-row .otp-inline button {
  height: 36px !important;
  line-height: 36px !important;

}


/* === FINAL FIXES ADDED === */

/* ✅ Gray curved lines */
.connector-path {
  stroke: #B4905A !important;
}

/* ✅ Facilities grows downward only */
#facCaps {
  transform-origin: top center !important;
}

/* ✅ Keep capsules stable - animation only adjusts var offset */
.capsule,
.capsule.pop,
.capsule.bounce,
.capsule.bump {
  --jumpY: 0px;
  transform: translate(-50%, -50%) translateY(var(--jumpY)) !important;
}

/* ✅ Medium downward bounce on submit */
@keyframes capsuleBump {
  0%,100% { --jumpY: 0px; }
  50% { --jumpY: 8px; }
}
.capsule.bump {
  animation: capsuleBump 440ms ease;
}

/* ✅ OTP tick inline + same row */
.form-row.otp-row .otp-inline {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}
.otp-status {
  display: inline-flex !important;
  white-space: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ✅ Prevent capsule bounce override */
.capsule.bounce {
  animation: capsuleBump 440ms ease !important;
}

/* ==== AI Response Layout (Image left, text right) ==== */
.response .ai-result-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Find the existing #aiImage rule (around line 600 or search for #aiImage) and Update it: */

#aiImage {
  max-width: 350px;
  width: 100%;
  height: auto;
  display: none; /* Keeps it hidden until results load */
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto;
  
  /* --- NEW 3D EFFECT START --- */
  transform: perspective(1000px) rotateY(-10deg) rotateX(2deg);
  box-shadow: -15px 15px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.4s ease-in-out;
  /* --- NEW 3D EFFECT END --- */
}

/* Add this hover effect immediately after to make it interactive */
#aiImage:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/*#aiResponse { flex: 1; }*/

@media (max-width: 600px) {
  .response .ai-result-row { flex-direction: column; }
  #aiImage { max-width: 100%; }
}

/* === Refined Image + Text Vertical Layout (Final) === */

/* === Final Vertical Layout with Full-Width Text & Fully Rounded Image === */

/* === FULL WIDTH CONTAINER + TEXT + ROUNDED IMAGE === */

/* === FINAL: Full-width text + centered rounded image === */

.ai-result-row {
  width: 100% !important;
  max-width: none !important;
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ center children horizontally */
  padding: 18px;
  gap: 18px;
  box-sizing: border-box;
}

/* ✅ Image clean + centered + rounded */
.ai-result-row #aiImage {
  max-width: 350px;
  width: 100%;
  height: auto;
  display: none;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto; /* ✅ center horizontally */
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: opacity 0.3s ease-in-out;
}

/* ✅ Text uses full width of container */
.ai-result-row #aiResponse {
  width: 100% !important;
  max-width: 100% !important;
  text-align: left;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .container-mini {
    flex-direction: column;
    width: 100%;
  }
   .chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
#separatebox 
{
  width: 200px;
}
  .chip {
    width: 130%;
  }

  /* --- UPDATED: Full width on Mobile --- */
  .left,
  .right {
    height: auto !important; /* Force auto height on mobile too */
    min-height: 500px;
  }
  
  .image {
    width: 100%;
  }
  /* ------------------------------------- */

  .card {
    width: 100%;
    margin-top: 20px;
  }

   .image img {
    width: 100%;       /* full width of mobile screen */
    max-width: 100%;   /* override desktop max-width */
    height: auto;      /* maintain aspect ratio */
    border-radius: 0;  /* optional: remove rounded corners for mobile */
  }

  .capsule {
    width: 300px;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
.capsule.facCaps
{
  margin-top: 10px;
}
  .left,
  .right {
    width: 100%;
    height: auto;
  }

  .capsule 
  {
    width: 150px;
  }

  .otp-inline {
    grid-template-columns: 1fr;
  }

  .otp-status {
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .section-head h1 {
    font-size: 18px;
  }

  .section-head p {
    font-size: 16px;
  }


  input,
  select,
  textarea {
    font-size: 14px;
  }

  .btn {
    width: 100%;
   
  }

  .ai-result-row {
    padding: 12px;
  }

  #aiImage {
    max-width: 100%;
  }
}

.top-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.chart-block {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
}

.chart-block h4 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 14px;
}
 .chart-block canvas {
  margin-top: 10px;
}
/* ===== AI RESPONSE STYLING ===== */

.ai-formatted {
  font-family: Inter, system-ui, sans-serif;
  color: #2b2b2b;
  line-height: 1.65;
}

/* Summary */
.ai-summary-title {

  color: #111827;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 6px;
}

/* Location headings */
.ai-location-title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 26px;
  margin-bottom: 10px;
  color: #1f2937;
  border-left: 4px solid #b4905a;
  padding-left: 10px;
}

/* Side labels */
.ai-label {
  font-weight: 600;
  color: #374151;
}

/* Paragraph spacing */
.ai-formatted p {
  margin: 6px 0;
}

/* Subtle divider between locations */
.ai-location-title:not(:first-of-type) {
  margin-top: 34px;
}
.ai-grid {
  display: grid;
  grid-template-columns: 220px repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
}

.ai-grid-head {
  font-weight: 700;
  background: #e0e7ff;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
}

.ai-grid-label {
  font-weight: 600;
  background: #f1f5f9;
  padding: 10px;
  border-radius: 6px;
}

.ai-grid-cell {
  background: #ffffff;
  padding: 10px;
  border-radius: 6px;
  line-height: 1.5;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 180px repeat(3, 1fr);
  gap: 10px;
}

.header {
  font-weight: bold;
  text-align: center;
}

.row-label {
  font-weight: bold;
}

.cell {
  background: #fff;
  padding: 8px;
  border-radius: 6px;
}

.ai-footer {
  margin-top: 20px;
}

.disclaimer {
  font-size: 12px;
  opacity: 0.7;
}

.overall-summary {
  background: #f8fafc;
  border: 1px solid #B4905A;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.overall-summary h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.raw-ai-text {
  background: #0f172a;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 13px;
}

.raw-ai-text pre {
  white-space: pre-wrap;
}

.overall-summary {
  background: #f8fafc;
  border-left: 5px solid #2563eb;
  padding: 14px;
  margin-bottom: 16px;
}


/* Container for the 3-column rows */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 12px;
  margin-bottom: 15px;
  width: 100%;
}

/* Ensure summary/disclaimer text stays full width and doesn't follow the 3-col grid */
.ai-output > p, .ai-output > div:not(.comparison-grid) {
  grid-column: 1 / -1;
  width: 100%;
}

/* Individual Card Styling */
.comparison-card, .graph-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column; /* Label on line 1, content on line 2 */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Update this existing class in fiylo.css */
.card-label {
  font-size: 11px;
  font-weight: 800 !important; /* Bold font weight */
  text-transform: uppercase;
  color: #000000 !important;   /* Pure black for high visibility */
  margin-bottom: 4px;
}

/* Content Style (2nd line) */
.card-content {
  font-size: 14px;
  color: #1e293b;
  line-height: 1.4;
}

/* Graph Card Styling */
.graph-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  text-align: center;
  justify-content: center;
  min-height: 100px;
  font-weight: 600;
  color: #475569;
}

.card-content {
  white-space: normal;    /* Allows text to wrap to the next line */
  overflow: visible;      /* Prevents clipping */
  word-wrap: break-word;  /* Breaks long words if necessary */
  min-height: 1.2em;      /* Ensures the box doesn't collapse */
}

/* Mobile: stack cards vertically */
@media (max-width: 600px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide charts on mobile screens (max-width 600px) */
@media (max-width: 780px) {
  #topCharts,
  #bottomRadars,
  .graph-row {
    display: none !important;
  }
}

/* Add this to fiylo.css */
/* Update this rule at the bottom of fiylo.css */
.chart-block canvas,
.graph-card canvas {
  height: 350px !important; /* Forces fixed height for both container types */
  width: 100% !important;
  max-height: 350px !important; /* Extra safety to prevent stretching */
}

/* =========================================
   Tree Layout - Final Gap Fix
   ========================================= */

/* 1. Map Container - Move Image Left */
.map-wrap {
  /* Changed from 85% to 75% to bring image closer to center */
  background-position: 45% center !important;
  
  /* Keep size controlled */
  background-size: auto 85% !important; 
  background-repeat: no-repeat !important;
}

/* 2. "You" Capsule - Fixed on Left */
#center {
  left: 10% !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  z-index: 10;
}

/* 3. Right Stack - Nudge Right to Meet Image */
#cityCaps, 
#zoneCaps, 
#bhkCaps, 
#budgetCaps, 
#facCaps {
  left: 45% !important;          /* Moved from 40% to 45% */
  transform: translateY(-50%) !important;
  margin: 0 !important;
  
  width: 220px !important;
  min-width: unset !important;
  
  text-align: left !important;
  padding-left: 20px !important;
  
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  z-index: 5;
}

/* 4. Vertical Distribution (Adjusted for spacing) */
/* combined.css - Scroll to the bottom or find these IDs */

/* 4. Vertical Distribution (Tighter Spacing) */
#cityCaps     { top: 18% !important; }
#zoneCaps     { top: 34% !important; }
#bhkCaps      { top: 50% !important; }
#budgetCaps   { top: 66% !important; }
#facCaps      { top: 82% !important; }

/* combined.css */

.capsule-title i {
  margin-right: 6px;
  color: #B4905A; /* Gold theme color */
  font-size: 13px; /* Slightly larger than text for balance */
}

/* Stack on mobile */
@media (max-width: 900px) {
  
  /* ... existing code ... */

  /* ADD THIS BLOCK: Forces the selection box to hide on mobile */
  #selectionBox {
    display: none !important;
  }
  
  /* ... rest of existing code ... */
}


/* ================= MOBILE FIXES (Paste at the bottom of fiylo.css) ================= */

@media (max-width: 768px) {

  /* 1. FIX NAME & PHONE INPUTS (Stop overflowing) */
  #formlong input {
    width: 100% !important;       /* Override the fixed 320px */
    max-width: 100% !important;   /* Ensure it fits the container */
    box-sizing: border-box;       /* Include padding in width calculation */
  }

  /* 2. HIDE IMAGE ON MOBILE */
  .image, 
  .container-mini .image {
    display: none !important;
  }

  /* 3. FIX AMENITIES CHIPS (Two per row) */
  .chips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Exactly 2 per row */
    gap: 8px !important;
    width: 100% !important;
    margin-top: 10px;
  }

  .chip {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 8px 4px !important;
    font-size: 11px !important;
    justify-content: center;
    height: auto !important;
    min-height: 40px;
  }
  
  .chip input {
    margin-right: 5px;
  }

  /* 4. IMPROVE OTP LAYOUT */
  .form-row.otp-row .otp-inline {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    grid-template-columns: none !important;
  }

  #generateOtp {
    width: 100% !important;
    margin-top: 0 !important;
    height: 44px !important;
    font-size: 14px !important;
  }

  #otpInput {
    flex: 1 !important;
    width: auto !important;
    margin-top: 0 !important;
    height: 44px !important;
    text-align: center;
    min-width: 100px;
  }

  #verifyOtp {
    flex: 1 !important;
    width: auto !important;
    margin-top: 0 !important;
    height: 44px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }
  
  .otp-status {
    width: 100% !important;
    text-align: center;
    margin-top: 5px;
  }

  /* 5. SUGGESTED AREA FULL WIDTH */
  /* Remove excessive padding stacking on mobile so content fills the card */
  .response .ai-result-row {
    padding: 0 !important;        /* Remove outer gap inside the card */
    width: 100% !important;
    box-sizing: border-box;
  }

  .response #aiResponse {
    width: 100% !important;       /* Force text box to full width */
    padding: 12px !important;     /* Reduce internal padding (was 20px) */
    margin: 0 !important;
    box-sizing: border-box;
  }
  
  /* Ensure the image inside response also fits if shown */
  .response #aiImage {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 15px;
  }
  
  .response {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 15px;
  }
  /* Ensure charts stack vertically on mobile */
    .charts-row {
      flex-direction: column !important;
    }
    .graph-card {
      width: 100% !important;
      min-width: 0 !important; /* Allow shrinking if needed */
    }
}

/* =========================================
   Mobile vs Desktop View Toggles
   ========================================= */

/* Default: Desktop ON, Mobile OFF */
.desktop-view-container {
  display: block;
}
.mobile-view-container {
  display: none;
}

/* Mobile Styling specifics */
.mobile-loc-group {
  border: 1px solid #B4905A;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  background: #fff;
}

.mobile-loc-header h3 {
  color: #B4905A;
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.mobile-card-item {
  width: 100%;
  margin-bottom: 10px;
  background: #f9fafb;
}

.mobile-divider {
  padding: 15px 0;
  text-align: center;
}

.mobile-divider hr {
  border: 0;
  height: 2px;
  background: #B4905A;
  opacity: 0.5;
  width: 100%;
}

/* =========================================
   MEDIA QUERY: Switch on Mobile (max-width 768px)
   ========================================= */
@media (max-width: 768px) {
  
  /* Hide the desktop grid view */
  .desktop-view-container {
    display: none !important;
  }
  
  /* Show the mobile grouped view */
  .mobile-view-container {
    display: block !important;
  }
  .mobile-card-item canvas {
    display: block !important;
    max-width: 100%;
    height: auto !important;
  }
  
  /* Ensure graph card wrapper has spacing */
  .mobile-card-item.graph-card {
    padding: 10px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  .form card{
      border: 1px solid #B4905A;
  }
  
}
/* =========================================
   UI FIXES (Final - No Header Overlap)
   ========================================= */

/* 1. Description Box - Base Styles */
.intro-box {
    background: #fafafa;
    border: 1px solid #B4905A;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 0 !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2; 
}

.intro-box p {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* 2. Chip & Label Gaps */
.longlabel {
    margin-bottom: 4px !important; 
    display: block;
}

.chips {
    gap: 8px !important; 
    margin-top: 0 !important;
}

#chipbox, #chipboxtop {
    margin-top: 0 !important;
    height: auto !important; 
    min-height: 34px !important;
    line-height: 1.2 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
}

/* 3. FULL NAME GAP */
.form-row1 {
    margin-top: 15px !important; 
    display: grid; 
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 5px;
}

/* 4. NOTE & BUTTONS GAP */
.form-row1 + p {
    margin-top: 8px !important;
    margin-bottom: 25px !important; 
    font-size: 11px !important;
}

.form-row.otp-row { margin-top: 0 !important; }
#generateOtp, #otpInput, #verifyOtp { margin-top: 0 !important; }

/* 5. IMAGE BORDER & HEIGHT (Desktop) */
.container-mini { align-items: stretch; }

.image {
    position: relative;
    display: block;
    width: 25%;
    min-height: 100%;
}

.image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0 12px 12px 0;
    border: 1px solid #B4905A;
    border-left: 0; 
}

@media (max-width: 900px) {
    .image { display: none !important; }
}

/* =========================================
   6. MOBILE FIXES (Prevents Overlap & Merges Boxes)
   ========================================= */
@media (max-width: 1024px) {

    /* FIX: Stop the content from pulling up into the header */
    #my-360-viz {
        margin-top: 0 !important; /* Was -40px, resetting to 0 fixes overlap */
        padding-top: 10px !important; /* Add small breathing room */
    }
    
    .container-mini, .col.left {
        margin-top: 0 !important;
        padding-top: 0 !important;
        display: block !important;
    }

    /* Top Box: Round Top, Flat Bottom */
    .intro-box {
        margin-bottom: 0 !important;
        border-radius: 12px 12px 0 0 !important;
        border-bottom: 0 !important; 
        padding-bottom: 10px !important;
        background: #fafafa !important;
    }

    /* Bottom Form: Round Bottom, Flat Top */
    form.card {
        margin-top: 0 !important;
        border-radius: 0 0 12px 12px !important;
        border-top: 0 !important;
        box-shadow: none !important;
        background: #fafafa !important;
        border-top: 1px solid rgba(180, 144, 90, 0.2) !important; 
    }
}

/* === FIXED 3-COLUMN LAYOUT (Prevents Vertical Stacking) === */

/* === FINAL SEAMLESS LAYOUT (Height Driven by Form) === */

/* === FINAL COMPACT SEAMLESS LAYOUT === */

/* === FINAL SEAMLESS LAYOUT (Height Driven by Form) === */

/* =======================================================
   FINAL FIX: REMOVE GLOBAL MARGIN GAP + TIGHT LAYOUT
   ======================================================= */

/* --- 1. LAYOUT WRAPPER --- */
.layout-3col {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    gap: 0 !important;
    align-items: stretch;
    
    border: 1px solid #B4905A;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    margin-top: 0px !important;;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- 2. SIDE COLUMNS --- */
.col-side {
    flex: 1;
    position: relative;
    min-width: 0;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;

    background-image: url("../images/animation.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



.side-img, .side-iframe {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: none !important;
    display: block;
}

/* --- 3. CENTER COLUMN --- */
.col-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    border-left: 1px solid #B4905A !important;
    border-right: 1px solid #B4905A !important;
    background: #ffffff;
}

.intro-box {
    border: none !important;
    border-bottom: 1px solid #B4905A !important;
    margin: 0 !important;
    padding: 12px 15px !important;
    background: #fafafa;
}
.intro-box p {
    margin: 0; font-size: 13px; color: #444; line-height: 1.4;
}

/* --- 4. COMPACT FORM --- */
form.card {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 12px 20px 15px 20px !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important; 
    background: #fff;
}

/* Grids */
.form-grid-row {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 6px !important;
    width: 100%;
}
.form-grid-full {
    width: 100%;
    margin-bottom: 6px !important;
}
.form-grid-half {
    width: 50% !important;
    display: flex;
    flex-direction: column;
}

/* Headings */
label {
    margin-bottom: 2px !important;
    font-size: 16px !important; 
    font-weight: 700 !important;
    color: #B4905A;
}

/* Inputs */
input[type="text"], input[type="tel"], select {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border: 1px solid #B4905A !important;
    border-radius: 6px !important;
    width: 100%;
}

/* --- 5. ZERO GAP AMENITIES (The Critical Fix) --- */
.chips-grid-3, .chips {
    display: grid !important;
    /* CHANGE: Use 6 columns to allow for 1/3 and 1/2 splits */
    grid-template-columns: repeat(6, 1fr) !important;
    
    row-gap: 10px !important;        
    column-gap: 8px !important; 
    align-content: start !important; 
    
    margin-top: 0px !important;      
    margin-bottom: 0px !important;
    padding: 0 !important;
    width: 100%;
    height: auto !important;
}

/* Strong selector to override global .form label margin */
.form .chip-item, 
.form .chip, 
.chip-item, 
.chip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* CHANGE: Default items span 2 columns (2/6 = 1/3 width) */
    grid-column: span 2;

    background: #ffffff !important;
    border: 1px solid #B4905A !important;
    border-radius: 50px !important;
    
    margin: 0 !important; 
    margin-top: 0 !important;
    
    padding: 0 8px !important;
    min-height: 30px !important; 
    height: 30px !important;       
    width: 100% !important;
    
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    cursor: pointer !important;
}

/* CHANGE: Target the last 2 items (Temples & Offices) to span 3 columns (3/6 = 1/2 width) */
.chip-item:nth-last-child(1),
.chip-item:nth-last-child(2),
.chip:nth-last-child(1),
.chip:nth-last-child(2) {
    grid-column: span 3;
}

.chip-item:hover, .chip:hover {
    background-color: #fffcf5 !important;
    font-weight: 600 !important;
    color: #B4905A !important;
}
.chip-item:has(input:checked), .chip:has(input:checked) {
    background-color: #fff8e1 !important;
    border-color: #B4905A !important;
    color: #B4905A !important;
}
.chip-item input, .chip input {
    margin-right: 6px !important;
    width: 14px !important;
    height: 14px !important;
    accent-color: #B4905A !important;
}

/* --- 6. RESPONSIVE FIXES --- */
@media (max-width: 1024px) {
    .layout-3col { flex-direction: row !important; }
}

@media (max-width: 900px) {
    .layout-3col {
        flex-direction: column !important;
        border: none !important;
        background: transparent !important;
        gap: 20px !important;
        box-shadow: none !important;
    }
    .col-side {
        height: 250px !important;
        width: 100% !important;
        flex: none !important;
        border: 1px solid #B4905A !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    .side-img, .side-iframe {
        position: static !important;
        height: 100% !important;
    }
    .col-center {
        width: 100% !important;
        flex: none !important;
        border: 1px solid #B4905A !important;
        border-radius: 12px !important;
    }
    .form-grid-row { flex-direction: column !important; gap: 8px !important; }
    .form-grid-half { width: 100% !important; }
    .chips-grid-3, .chips { grid-template-columns: repeat(2, 1fr) !important; }
}

/* =======================================================
   FINAL IMAGE FIX: SHOW FULL IMAGE (NO CROPPING)
   ======================================================= */

/* 1. Reset the side columns to handle alignment */
.col-side {
    position: relative;
    overflow: hidden; /* Keeps everything inside the rounded corners */
    background-color: #ffffff; /* Background color for the empty space around the image */
}

/* 2. Fix the Image/Iframe scaling */
.side-img, 
.side-iframe {
    position: absolute !important;
    top: 0; 
    left: 0;
    width: 100% !important;
    height: 100% !important;
    
    /* CHANGED from 'cover' to 'contain' */
    object-fit: contain !important; 
    
    /* Centers the image within the space */
    object-position: center !important; 
    
    border: none !important;
    display: block;
    z-index: 1;
}

/* Optional: If you want the background of the side columns 
   to match your page background so the "gap" is invisible */
.col-side {
    background: #fbfbfb; /* Adjust this hex code to match your theme */
}

/* =======================================================
   NEW SECTION HEADERS (Icon + Text + Line)
   ======================================================= */

.form-section-title {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 5px !important;
    margin-bottom: 12px !important;
    color: #B4905A !important; /* Gold Theme Color */
}

/* The Icon */
.form-section-title i {
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* The Text ("User Preferences", "User Details") */
.form-section-title span {
    font-family: sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    margin-right: 12px !important;
}

/* The Extending Line */
.form-section-title::after {
    content: "" !important;
    flex-grow: 1 !important; /* Forces line to fill remaining width */
    height: 1px !important;
    background-color: #B4905A !important;
    opacity: 0.4 !important;
}
/* Paste this at the bottom of fiylo.css */

/* --- Mobile Image Switching --- */

/* Default (Desktop) Background */
.anim-bg-blur {
    background-image: url('../images/animation.webp');
}

/* Mobile Background (< 900px) */
@media (max-width: 900px) {
    .anim-bg-blur {
        background-image: url('../images/mobilegif.webp');
    }

    /* Update the container fallback as well */
    .col-side {
        background-image: url('../images/mobilegif.webp') !important;
    }
    .insta-container {
        display: none !important;
    }
}