/* Modal Css */

.planner-modal{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;

    background:rgba(15,23,42,.55);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);

    z-index:9999;
}

.planner-modal.active{
    display:flex;
}

.planner-close{
    position:absolute;
    top:15px;
    right:20px;
    font-size:30px;
    border:none;
    background:none;
    cursor:pointer;
}


/* SECTION CONTAINER (Scoped centering inside your page flow) */
  .estimator-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto; /* Centers the section horizontally */
    padding: 0 20px;
    box-sizing: border-box;
  }

  /* OUTER GLASSMORPHIC HIGHLIGHT FRAME */
  .planner-glass-frame {
    position: relative;
    border-radius: 28px;
    padding: 24px;
    transition: all 0.35s ease;
    box-sizing: border-box;
  }

  :root[data-theme="dark"] .planner-glass-frame,
  .planner-modal.planner-dark .planner-glass-frame {
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.03)
    );
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    box-shadow:
      0 30px 70px -10px rgba(0, 0, 0, 0.7),
      inset 0 1px 1px rgba(255, 255, 255, 0.25);
  }

  :root[data-theme="light"] .planner-glass-frame {
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid #e2e8f0;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.1);
    padding: 16px;
    border-radius: 26px;
  }

  /* 2-COLUMN GRID AT 70vh HEIGHT */
  .estimator-wrapper {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    height: 70vh; /* Exactly 70% of viewport height */
    align-items: stretch; /* Forces equal height for both cards */
  }

  /* ===========================
     LEFT CARD (FORM)
   =========================== */
  .estimator-left {
    background: #fff;
    border-radius: 22px;
    padding: 30px 35px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    border: 1px solid #e6edf5;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    
    /* HIDE SCROLLBARS */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
  .estimator-left::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 40px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
  }

  .estimator-left h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
    margin: 0 0 8px 0;
  }

  .estimator-left p {
    color: #64748b;
    line-height: 1.1;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
  }

  .planner-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
  }

  .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
  }

  .form-group textarea {
    resize: vertical;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  }

  /* Checkbox Pills */
  .planner-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .checkbox-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
  }

  .checkbox-pill input {
    display: none;
  }

  .checkbox-pill span {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 50px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #334155;
  }

  .checkbox-pill:hover span {
    border-color: #2563eb;
  }

  .checkbox-pill input:checked + span {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
  }

  /* Range Slider */
  .slider-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .slider-container input[type=range] {
    width: 100%;
    accent-color: #2563eb;
    cursor: pointer;
  }

  .slider-bubble {
    display: inline-block;
  }

  /* ===========================
     RIGHT CARD (LIVE PREVIEW)
   =========================== */
  .estimator-right {
    height: 100%;
  }

  /* ===========================
     RIGHT CARD (LIGHT THEME)
   =========================== */

  .estimation-display-card {
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    background: #ffffff;
    color: #0f172a;
    padding: 30px;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .estimation-display-card::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  /* Blue Glow */
  .est-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: #3b82f6;
    opacity: 0.12;
    filter: blur(80px);
    right: -80px;
    top: -80px;
    pointer-events: none;
  }

  /* Heading */
  .estimation-display-card h4 {
    position: relative;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
  }

  /* Main Metric */
  .est-metric {
    margin-bottom: 18px;
  }

  .est-metric small {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
    font-size: .82rem;
  }

  .est-metric strong {
    display: block;
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 4px;
  }

  .est-metric span {
    color: #475569;
    font-size: .82rem;
  }

  /* Divider */
  .est-divider {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 18px 0;
  }

  /* Details */
  .est-details-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
  }

  .detail-row span {
    color: #64748b;
  }

  .detail-row strong {
    color: #0f172a;
    font-weight: 700;
  }

  /* Badge */
  .badge {
    padding: 5px 12px;
    border-radius: 30px;
    font-size: .75rem;
    font-weight: 700;
  }

  .badge.success {
    background: #dcfce7;
    color: #15803d;
  }

  /* Tech Stack Box */
  .est-package {
    margin-top: 20px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
  }

  .est-package small {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    font-size: .78rem;
  }

  .est-package strong {
    display: block;
    color: #2563eb;
    font-size: 1.05rem;
    margin-bottom: 8px;
  }

  .est-package p {
    color: #475569;
    line-height: 1.5;
    font-size: .85rem;
    margin: 0;
  }

    /* RESPONSIVE FALLBACK FOR MOBILE */
    @media(max-width: 992px) {
      .estimator-wrapper {
        grid-template-columns: 1fr;
        height: auto;
      }
      .estimator-left,
      .estimation-display-card {
        height: auto;
      }
      .form-row {
        grid-template-columns: 1fr;
      }
    }

    /* ==========================
       MODAL MOBILE SCROLL FIX
    ========================== */

    @media (max-width: 768px) {

      .planner-modal {
        padding: 15px;
        align-items: flex-start;
        overflow-y: auto;
      }

      .planner-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 30px);
        margin: 15px auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 18px;
      }

      .estimator-section {
        padding: 0;
        margin: 0;
      }

      .estimator-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        gap: 20px;
      }

      .estimator-left,
      .estimation-display-card {
        height: auto;
        max-height: none;
      }

      .form-row {
        grid-template-columns: 1fr;
      }
    }

    /* Default (Light) */
    .planner-modal .estimator-left{
        background:#fff;
        color:#111827;
    }

    .planner-modal .estimation-display-card{
        background:#fff;
        color:#111827;
    }

    /* Dark Mode for Planner Modal */
    :root[data-theme="dark"] .planner-modal .estimator-left,
    .planner-modal.planner-dark .estimator-left {
        background: #0a1024;
        color: #f8fbff;
        border-color: rgba(255, 255, 255, 0.12);
    }

    :root[data-theme="dark"] .planner-modal .estimation-display-card,
    .planner-modal.planner-dark .estimation-display-card {
        background: linear-gradient(180deg, #0d152d, #050816);
        color: #f8fbff;
        border-color: rgba(255, 255, 255, 0.12);
    }

    :root[data-theme="dark"] .planner-modal input,
    :root[data-theme="dark"] .planner-modal textarea,
    :root[data-theme="dark"] .planner-modal select,
    .planner-modal.planner-dark input,
    .planner-modal.planner-dark textarea,
    .planner-modal.planner-dark select {
        background: #050816;
        color: #f8fbff;
        border-color: rgba(255, 255, 255, 0.15);
    }

    :root[data-theme="dark"] .planner-modal select option,
    .planner-modal.planner-dark select option {
        background: #0a1024;
        color: #f8fbff;
    }

    :root[data-theme="dark"] .planner-modal .checkbox-pill span,
    .planner-modal.planner-dark .checkbox-pill span {
        background: #050816;
        color: #cbd5e1;
        border-color: rgba(255, 255, 255, 0.15);
    }

    :root[data-theme="dark"] .planner-modal .checkbox-pill input:checked + span,
    .planner-modal.planner-dark .checkbox-pill input:checked + span {
        background: linear-gradient(135deg, #2563eb, #3b82f6);
        color: #fff;
        border-color: #2563eb;
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
    }

    :root[data-theme="dark"] .planner-modal h2,
    :root[data-theme="dark"] .planner-modal h4,
    :root[data-theme="dark"] .planner-modal strong,
    .planner-modal.planner-dark h2,
    .planner-modal.planner-dark h4,
    .planner-modal.planner-dark strong {
        color: #f8fbff;
    }

    :root[data-theme="dark"] .planner-modal p,
    :root[data-theme="dark"] .planner-modal label,
    :root[data-theme="dark"] .planner-modal small,
    :root[data-theme="dark"] .planner-modal span,
    :root[data-theme="dark"] .planner-modal .detail-row span,
    .planner-modal.planner-dark p,
    .planner-modal.planner-dark label,
    .planner-modal.planner-dark small,
    .planner-modal.planner-dark span {
        color: #94a3b8;
    }

    /* Recommended Tech Stack & Architecture Box (Dark Mode) */
    :root[data-theme="dark"] .planner-modal .est-package,
    .planner-modal.planner-dark .est-package {
        background: #050816;
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    :root[data-theme="dark"] .planner-modal .est-package small,
    .planner-modal.planner-dark .est-package small {
        color: #94a3b8;
    }

    :root[data-theme="dark"] .planner-modal .est-package strong,
    .planner-modal.planner-dark .est-package strong {
        color: #60a5fa;
    }

    :root[data-theme="dark"] .planner-modal .est-package p,
    .planner-modal.planner-dark .est-package p {
        color: #cbd5e1;
    }

    /* Deploy Status Badge (Dark Mode) */
    :root[data-theme="dark"] .planner-modal .badge.success,
    .planner-modal.planner-dark .badge.success {
        background: rgba(34, 197, 94, 0.18);
        color: #4ade80;
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    /* Divider & Slider Bubble (Dark Mode) */
    :root[data-theme="dark"] .planner-modal .est-divider,
    .planner-modal.planner-dark .est-divider {
        background: rgba(255, 255, 255, 0.12);
    }

    :root[data-theme="dark"] .planner-modal .slider-bubble,
    .planner-modal.planner-dark .slider-bubble {
        background: rgba(59, 130, 246, 0.2);
        color: #60a5fa;
    }

    :root[data-theme="dark"] .planner-modal .planner-close,
    .planner-modal.planner-dark .planner-close {
        color: #f8fbff;
    }

    /* Modal Success Screen style */
    .success-screen {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify=content: center;
        text-align: center;
        padding: 36px 28px;
        background: #ffffff;
        border-radius: 20px;
        border: 1px solid #e6edf5;
        box-shadow: 0 15px 45px rgba(15, 23, 42, 0.06);
        max-width: 440px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    :root[data-theme="dark"] .planner-modal .success-screen,
    .planner-modal.planner-dark .success-screen {
        background: #0a1024;
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    }

    :root[data-theme="dark"] .planner-modal .success-card,
    .planner-modal.planner-dark .success-card {
        background: #050816;
        border-color: rgba(255, 255, 255, 0.12);
    }

    :root[data-theme="dark"] .planner-modal .success-card-item:not(:last-child),
    .planner-modal.planner-dark .success-card-item:not(:last-child) {
        border-right-color: rgba(255, 255, 255, 0.12);
    }

    .success-icon {
        width: 52px;
        height: 52px;
        background: #f0fdf4;
        border: 1px solid #dcfce7;
        color: #16a34a;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 20px;
    }

    :root[data-theme="dark"] .planner-modal .success-icon,
    .planner-modal.planner-dark .success-icon {
        background: rgba(34, 197, 94, 0.18);
        border-color: rgba(34, 197, 94, 0.3);
        color: #4ade80;
    }

    .success-screen h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 6px 0;
        letter-spacing: -0.3px;
    }

    .success-subtitle {
        color: #64748b;
        font-size: 0.88rem;
        line-height: 1.4;
        margin: 0 0 24px 0;
    }

    .success-card {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        border-radius: 12px;
        padding: 14px 10px;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    .success-card-item {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0 4px;
    }

    .success-card-item:not(:last-child) {
        border-right: 1px solid #e2e8f0;
    }

    .success-card-item span {
        font-size: 0.72rem;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .success-card-item strong {
        font-size: 0.82rem;
        font-weight: 600;
        color: #334155;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .success-note {
        color: #64748b;
        font-size: 0.82rem;
        line-height: 1.5;
        margin: 0 0 24px 0;
    }

    .success-screen .btn-primary {
        width: 100%;
        padding: 12px;
        background: #587cd1;
        color: #ffffff;
        border: none;
        border-radius: 10px;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .success-screen .btn-primary:hover {
        background: #4771b4;
        transform: translateY(-1px);
    }