/* ═══════════════════════════════════════════════════════════
   Monthly Salary Calculator — CSS
   Prefix: msc- (monthly-salary-calculator) — all JS-referenced
   Structural: msc- prefix throughout (no separate prefix needed)
   Site Design System: Dark #0A0F1C | Green Silo #10B981
   Font: DM Sans
   ═══════════════════════════════════════════════════════════ */
/* Rank Math Breadcrumb Styling */
.rank-math-breadcrumb {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.rank-math-breadcrumb a {
  color: #5A7090;
  text-decoration: none;
}
.rank-math-breadcrumb a:hover {
  color: #10B981;
}
.rank-math-breadcrumb .separator {
  color: #374B64;
  margin: 0 8px;
}
.rank-math-breadcrumb .last {
  color: #8899AA;
}

/* ── HERO ── */
.msc-hero {
  text-align: center;
  padding: 48px 20px 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.msc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  color: #10B981;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.msc-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 14px;
  line-height: 1.2;
}

.msc-hero-title span {
  color: #10B981;
}

.msc-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.msc-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.msc-htag {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #10B981;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  padding: 6px 14px;
}

/* ── CALCULATOR SECTION WRAPPER ── */
.msc-calc-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

/* ═══════════════════════════════════════════════════════════
   #monthly-salary-calculator
   JS root: e.target.closest('#monthly-salary-calculator')
   All .msc-* classes are scoped inside this element.
   ═══════════════════════════════════════════════════════════ */
#monthly-salary-calculator {
  font-family: 'DM Sans', sans-serif;
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

#monthly-salary-calculator * {
  box-sizing: border-box;
}

/* Green top accent bar */
#monthly-salary-calculator::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10B981, #34D399, #059669);
  z-index: 1;
}

/* ── CARD HEADER ── */
.msc-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(55,75,100,0.2);
}

.msc-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(16,185,129,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.msc-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.msc-card-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #5A7090;
}

/* ── FORM BODY ── */
.msc-form-body {
  padding: 28px 32px 32px;
}

@media (max-width: 540px) {
  .msc-card-header { padding: 20px 18px 16px; }
  .msc-form-body   { padding: 20px 18px 24px; }
}

/* ── INPUT WRAPPER — .msc-input-wrapper (JS: no interaction) ── */
#monthly-salary-calculator .msc-input-wrapper {
  margin-bottom: 20px;
}

/* ── LABEL — .msc-label (JS: no interaction) ── */
#monthly-salary-calculator .msc-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #C8D8E8;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  cursor: default;
}

/* ── INPUT — .msc-input
   JS reads: .value
   JS sets inline: style.borderColor = '#dc3232' (error) or '#e0e0e0' (reset)
   CSS border provides default state; JS inline overrides border-color only.
   box-shadow on focus is NOT overridden by JS inline style — glow still shows.
── */
#monthly-salary-calculator .msc-input {
  display: block;
  width: 100%;
  padding: 13px 16px 13px 42px;
  background: rgba(10,15,28,0.6);
  border: 1px solid rgba(55,75,100,0.4);
  border-radius: 10px;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-top: 8px;
}

#monthly-salary-calculator .msc-input::placeholder {
  color: #374B64;
}

#monthly-salary-calculator .msc-input:focus {
  /* border-color intentionally NOT set here so JS inline override takes effect
     without being clobbered by :focus specificity on subsequent blur */
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
  background: rgba(16,185,129,0.04);
}

/* Hide number spinners */
#monthly-salary-calculator .msc-input::-webkit-outer-spin-button,
#monthly-salary-calculator .msc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#monthly-salary-calculator .msc-input[type=number] {
  -moz-appearance: textfield;
}

/* ── INPUT PREFIX ICON (₹) ── */
.msc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.msc-input-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #5A7090;
  pointer-events: none;
  z-index: 1;
  font-family: 'DM Sans', sans-serif;
}

/* ── FIELD HINT ── */
.msc-field-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  margin-top: 6px;
}

/* ── CALCULATE BUTTON — .msc-calc-btn
   JS: e.target.classList.contains('msc-calc-btn') — click trigger
── */
#monthly-salary-calculator .msc-calc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s, transform 0.1s;
  letter-spacing: 0.2px;
}

#monthly-salary-calculator .msc-calc-btn:hover {
  background-color: #0EA573;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3);
  transform: translateY(-1px);
}

#monthly-salary-calculator .msc-calc-btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

#monthly-salary-calculator .msc-calc-btn:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

/* ── RESULT BOX — .msc-result-box
   JS: classList.remove('msc-hidden') on success
       classList.add('msc-hidden') on error
── */
#monthly-salary-calculator .msc-result-box {
  margin-top: 20px;
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(16,185,129,0.05) 100%);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 14px;
  text-align: center;
  animation: msc-fade-up 0.4s ease-out;
}

@keyframes msc-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESULT LABEL — .msc-result-label (JS: no interaction) ── */
#monthly-salary-calculator .msc-result-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #5A7090;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* ── RESULT VALUE — .msc-result-value
   JS: .textContent = formatINR(monthlySalary)
── */
#monthly-salary-calculator .msc-result-value {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  color: #10B981;
  line-height: 1.1;
  letter-spacing: -1px;
}

/* ── HIDDEN STATE — .msc-hidden
   JS: classList.add/remove('msc-hidden') on .msc-result-box
── */
#monthly-salary-calculator .msc-hidden {
  display: none !important;
}

/* ── SECTION SHARED ── */
.msc-section-header {
  text-align: center;
  margin-bottom: 36px;
}

.msc-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 8px;
}

.msc-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 10px;
}

.msc-section-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── HOW IT WORKS ── */
.msc-hiw-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px 20px;
}

.msc-hiw-card {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

.msc-hiw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10B981, #3B82F6, #8B5CF6, #F59E0B);
}

.msc-hiw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

@media (max-width: 600px) {
  .msc-hiw-steps { grid-template-columns: 1fr; gap: 20px; }
  .msc-hiw-card  { padding: 28px 20px; }
}

.msc-hiw-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}

.msc-s1 { background: rgba(16,185,129,0.15); color: #10B981; }
.msc-s2 { background: rgba(59,130,246,0.15); color: #3B82F6; }
.msc-s3 { background: rgba(139,92,246,0.15); color: #8B5CF6; }

.msc-hiw-stepname {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.msc-hiw-stepdesc {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.65;
}

/* ── INFO SECTIONS ── */
.msc-info-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.msc-info-block {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  padding: 32px;
}

@media (max-width: 540px) {
  .msc-info-block { padding: 24px 20px; }
}

.msc-info-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #10B981;
  margin: 0 0 16px;
}

.msc-info-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.8;
  margin: 0 0 12px;
}

.msc-info-text:last-child { margin-bottom: 0; }

.msc-info-note {
  color: #5A7090;
  font-style: italic;
  margin-top: 14px;
}

/* Quick examples table */
.msc-examples-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  margin-top: 4px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(55,75,100,0.3);
}

.msc-examples-table th {
  background: rgba(10,15,28,0.6);
  color: #8899AA;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(55,75,100,0.3);
}

.msc-examples-table td {
  padding: 12px 16px;
  color: #C8D8E8;
  border-bottom: 1px solid rgba(55,75,100,0.12);
}

.msc-examples-table tbody tr:last-child td {
  border-bottom: none;
}

.msc-examples-table tbody tr:hover td {
  background: rgba(55,75,100,0.08);
}

.msc-examples-table .msc-td-green {
  color: #10B981;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── RELATED TOOLS ── */
.msc-related-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 20px;
}

.msc-related-block {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 16px;
  overflow: hidden;
}

.msc-related-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(16,185,129,0.1);
  border-bottom: 1px solid rgba(16,185,129,0.2);
}

.msc-related-tools {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.msc-rtool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(55,75,100,0.12);
  transition: background 0.2s;
}

.msc-rtool-item:last-child { border-bottom: none; }

.msc-rtool-item:hover { background: rgba(16,185,129,0.05); }
.msc-rtool-item:hover .msc-rtool-arrow { color: #10B981; transform: translateX(3px); }

.msc-rtool-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.msc-rtool-text { flex: 1; min-width: 0; }

.msc-rtool-text strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #C8D8E8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msc-rtool-text small {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #5A7090;
  line-height: 1.5;
}

.msc-rtool-arrow {
  font-size: 14px;
  color: #374B64;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

.msc-rtool-viewall { background: rgba(16,185,129,0.04); }
.msc-rtool-viewall .msc-rtool-text strong { color: #10B981; }

/* ── FAQ ── */
.msc-faq-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.msc-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msc-faq-item {
  background: #111B2E;
  border: 1px solid rgba(55,75,100,0.3);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.msc-faq-item:hover { border-color: rgba(16,185,129,0.3); }
.msc-faq-item.msc-faq-open { border-color: rgba(16,185,129,0.4); }

.msc-faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 20px;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.msc-faq-q::after {
  content: '+';
  font-size: 22px;
  color: #10B981;
  flex-shrink: 0;
  font-weight: 400;
  transition: transform 0.3s;
  line-height: 1;
}

.msc-faq-item.msc-faq-open .msc-faq-q::after { transform: rotate(45deg); }

.msc-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.7;
}

.msc-faq-item.msc-faq-open .msc-faq-a { padding: 0 20px 18px; }

/* ── CTA ── */
.msc-cta-section {
  text-align: center;
  padding: 60px 20px 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(16,185,129,0.03) 100%);
}

.msc-cta-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 12px;
}

.msc-cta-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #8899AA;
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.msc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10B981;
  color: #FFFFFF !important;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.25s;
}

.msc-cta-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.25);
  color: #FFFFFF !important;
}

/* ── PRINT ── */
@media print {
  .msc-calc-btn { display: none !important; }
  #monthly-salary-calculator .msc-hidden { display: block !important; }
}

/* ── RELATED GRID (2-col: tools + quick facts) ── */
.msc-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .msc-related-grid { grid-template-columns: 1fr; }
}

/* ── QUICK FACTS ── */
.msc-facts-list {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.msc-fact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(55,75,100,0.12);
  transition: background 0.2s;
}

.msc-fact-item:last-child { border-bottom: none; }
.msc-fact-item:hover { background: rgba(55,75,100,0.08); }

.msc-fact-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.msc-fact-body { flex: 1; }

.msc-fact-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #C8D8E8;
  margin-bottom: 3px;
  line-height: 1.3;
}

.msc-fact-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #5A7090;
  line-height: 1.65;
}
