/* ==========================================================================
   RANCHI PRIME - SPECIALIZED HYPER-LOCAL TOOLS, AI ESTIMATOR & MODALS
   ========================================================================== */

/* ==========================================================================
   TOOL 1: JHARKHAND LAND UNIT CONVERTER
   ========================================================================== */
.converter-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem;
  margin-top: 1rem;
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .converter-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
}

.converter-box {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.converter-box:focus-within {
  border-color: var(--primary-light);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.converter-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.converter-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.converter-num-input {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
}

.converter-select {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
}

.converter-swap-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--primary-subtle);
  border: 1px solid rgba(27, 94, 71, 0.2);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto;
  transition: all var(--transition-bounce);
}

.converter-swap-btn:hover {
  background: var(--primary-light);
  color: #fff;
  transform: rotate(180deg) scale(1.1);
}

.converter-results-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-light);
}

@media (min-width: 768px) {
  .converter-results-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.res-mini-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.res-mini-val {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-light);
}

.res-mini-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   TOOL 2: CNT/SPT ACT LEGAL RISK SCANNER WIZARD
   ========================================================================== */
.shield-card {
  background: linear-gradient(135deg, #0e1e17 0%, #12281e 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: var(--shadow-xl);
  color: #ffffff;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.shield-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  z-index: 0;
}

.shield-content {
  position: relative;
  z-index: 1;
}

.shield-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .shield-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.scanner-step-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.step-question {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.radio-pill-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.radio-pill-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-pill-label:hover {
  background: rgba(255, 255, 255, 0.15);
}

.radio-pill-label input[type="radio"] {
  accent-color: var(--accent-gold);
}

.verdict-box {
  background: rgba(18, 28, 38, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.verdict-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 2px solid #10b981;
}

.verdict-icon-wrap.risk-alert {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.verdict-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.verdict-text {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.verdict-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.82rem;
}

.verdict-checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   TOOL 3: STAMP DUTY, EMI & CONSTRUCTION CALCULATORS
   ========================================================================== */
.calc-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem;
}

.slider-group {
  margin-bottom: 1.5rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slider-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.slider-display-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.custom-range {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
  accent-color: var(--primary-light);
}

.female-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-gold-subtle);
  border: 1px solid rgba(229, 169, 60, 0.3);
  margin-bottom: 1.5rem;
}

.calc-results-callout {
  background: var(--navy-dark);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.calc-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

.calc-breakdown-row.total {
  border-bottom: none;
  padding-top: 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* ==========================================================================
   TOOL 4: LOCALITY TABLE
   ========================================================================== */
.compare-table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
  font-size: 0.9rem;
}

.compare-table th, .compare-table td {
  padding: 1.1rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.compare-table th {
  background: var(--bg-subtle);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
}

.compare-table tr:hover td {
  background: rgba(240, 247, 244, 0.4);
}

.score-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  background: #ecfdf5;
  color: #065f46;
}

/* ==========================================================================
   MODAL WINDOWS & ASK SEARCH CHIPS
   ========================================================================== */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop-custom.show {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-dialog-custom {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-smooth);
}

.modal-backdrop-custom.show .modal-dialog-custom {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-body {
  padding: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control-input, .form-control-select, .form-control-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control-input:focus, .form-control-select:focus, .form-control-textarea:focus {
  border-color: var(--primary-light);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-main);
}

/* Ask Search Chips */
.ask-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.ask-chip-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ask-chip-btn:hover {
  background: var(--primary-subtle);
  color: var(--primary-light);
  border-color: var(--primary-light);
}

.ask-quick-item {
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-main, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ask-quick-item:hover {
  border-color: var(--accent-gold, #e5a93c);
  background: rgba(229, 169, 60, 0.08);
  transform: translateX(4px);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SUITE FOR HYPER-LOCAL TOOLS & CALCULATORS
   ========================================================================== */

/* 1. Tablet & Large Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .converter-card,
  .shield-card,
  .calc-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .converter-input-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .converter-select {
    width: 100%;
  }

  .converter-num-input {
    font-size: 1.35rem;
  }

  .converter-swap-btn {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.1rem;
    margin: 0.5rem auto;
  }

  .converter-results-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .shield-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .scanner-step-box {
    padding: 1.25rem;
  }

  .verdict-box {
    padding: 1.5rem;
  }

  .compare-table-wrap {
    border-radius: var(--radius-lg);
    -webkit-overflow-scrolling: touch;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
  }
}

/* 2. Standard Mobile (max-width: 640px) */
@media (max-width: 640px) {
  .converter-card,
  .shield-card,
  .calc-card {
    padding: 1.25rem;
    margin-top: 0.5rem;
  }

  .converter-box {
    padding: 1rem;
  }

  .res-mini-val {
    font-size: 1.05rem;
  }

  .res-mini-lbl {
    font-size: 0.68rem;
  }

  .radio-pill-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .radio-pill-label {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  .step-question {
    font-size: 0.95rem;
  }

  .verdict-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .verdict-icon-wrap {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.4rem;
  }

  .verdict-title {
    font-size: 1.1rem;
  }

  .verdict-text {
    font-size: 0.82rem;
  }

  .slider-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .slider-display-val {
    font-size: 1.05rem;
  }

  .female-switch-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .calc-results-callout {
    padding: 1.25rem;
  }

  .calc-breakdown-row {
    font-size: 0.82rem;
  }

  .calc-breakdown-row.total {
    font-size: 1rem;
  }

  .modal-dialog-custom {
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }

  .modal-head {
    padding: 1rem 1.25rem;
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .modal-footer {
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer button {
    width: 100%;
  }
}

/* 3. Small Screen Phones (max-width: 375px) */
@media (max-width: 375px) {
  .converter-card,
  .shield-card,
  .calc-card {
    padding: 1rem;
  }

  .converter-results-strip {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .res-mini-card {
    padding: 0.65rem;
  }

  .slider-display-val {
    font-size: 0.95rem;
  }

  .ask-chip-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }
}


