/* Commission Loss Calculator Tool Styles */
@import url('../../css/style.css');

.tool-page-wrapper {
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Hero Section */
.tool-hero {
  padding: 80px 20px 48px;
  background: linear-gradient(135deg, #0a192f 0%, #1e1b4b 50%, #991b1b 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.tool-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(252, 165, 165, 0.4);
  color: #fca5a5;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.tool-hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.tool-hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 720px;
  margin: 0 auto 28px;
}

.tool-hero-highlights {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: #f1f5f9;
}

.hero-pill svg {
  color: #f87171;
}

/* Calculator Section */
.calc-section {
  padding: 40px 20px 60px;
  position: relative;
  margin-top: -30px;
  z-index: 2;
}

.calc-container {
  max-width: 960px;
  margin: 0 auto;
}

.calc-card-main {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12), 0 8px 16px -6px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  padding: 36px 32px;
}

@media (max-width: 768px) {
  .calc-card-main {
    padding: 24px 18px;
  }
}

/* Input Form Grid */
.calc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 820px) {
  .calc-inputs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.input-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.input-card:focus-within {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 8px;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  font-size: 1.1rem;
  font-weight: 700;
  color: #64748b;
  position: absolute;
}

.input-prefix {
  left: 12px;
}

.input-suffix {
  right: 12px;
}

.calc-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.has-prefix .calc-input {
  padding-left: 32px;
}

.has-suffix .calc-input {
  padding-right: 36px;
}

.calc-input:focus {
  border-color: #2563eb;
}

.input-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* Calculate Button */
.calc-action-bar {
  text-align: center;
  margin-bottom: 8px;
}

.btn-calculate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #0a192f;
  color: #ffffff;
  border: none;
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(10, 25, 47, 0.4);
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  max-width: 360px;
}

.btn-calculate:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(30, 58, 138, 0.5);
}

.btn-calculate svg {
  transition: transform 0.2s;
}

.btn-calculate:hover svg {
  transform: translateX(4px);
}

/* Result Section (Hidden by Default) */
.results-wrapper {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-top: 36px;
}

.results-wrapper.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Main Shock Card */
.shock-card {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.12);
}

.shock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.shock-label {
  font-size: 1rem;
  font-weight: 700;
  color: #7f1d1d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.shock-number {
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  font-weight: 900;
  color: #dc2626;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.shock-subtext {
  font-size: 0.95rem;
  color: #991b1b;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Breakdown Grid */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 680px) {
  .breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.breakdown-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.breakdown-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.breakdown-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.breakdown-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Pure CSS Horizontal Bar Comparison Graph */
.graph-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.graph-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-row {
  margin-bottom: 18px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.bar-platform-name {
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-cut-tag {
  font-weight: 800;
}

.bar-cut-red {
  color: #dc2626;
}

.bar-cut-green {
  color: #16a34a;
}

.bar-track {
  height: 28px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.bar-fill-zomato {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.bar-fill-vyomarc {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 14px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.bar-zero-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Result CTA Box */
.cta-box-result {
  background: #0a192f;
  border-radius: 18px;
  padding: 36px 30px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 12px 35px -5px rgba(10, 25, 47, 0.4);
}

.cta-box-headline {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
}

.cta-box-headline span {
  color: #f87171;
}

.cta-box-subtext {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.btn-save-profits {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 14px 36px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px -3px rgba(37, 99, 235, 0.5);
  transition: all 0.2s ease;
}

.btn-save-profits:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -3px rgba(37, 99, 235, 0.6);
  color: #ffffff;
}

.btn-save-profits svg {
  transition: transform 0.2s;
}

.btn-save-profits:hover svg {
  transform: translateX(4px);
}

/* SEO Content Sections */
.info-section {
  padding: 60px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.info-container {
  max-width: 900px;
  margin: 0 auto;
}

.info-block {
  margin-bottom: 48px;
}

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

.info-heading {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.info-p {
  font-size: 1rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 16px;
}

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .feature-cards-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 18px;
}

.feature-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
}

.calc-formula-display {
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 18px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

/* FAQ Section */
.faq-section {
  padding: 60px 20px 80px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.faq-container {
  max-width: 820px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 40px;
}

.faq-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.faq-header p {
  font-size: 1rem;
  color: #64748b;
}

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

.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.faq-icon-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.3s ease, color 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon-arrow,
.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: #2563eb;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  padding: 0 24px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.65;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease, visibility 0s 0.35s;
}

.faq-question[aria-expanded="true"] + .faq-answer,
.faq-answer.active {
  max-height: 600px;
  opacity: 1;
  visibility: visible;
  padding: 4px 24px 20px;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease, visibility 0s 0s;
}


/* =========================================
   MOBILE RESPONSIVENESS & STACKING FIX
   ========================================= */
@media (max-width: 768px) {
  .calc-container,
  .calc-card-main,
  .calculator-section,
  .calculator-card,
  .generator-section,
  .generator-card,
  .results-wrapper,
  .output-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .calc-inputs-grid,
  .breakdown-grid,
  .calc-grid,
  .competitors-grid,
  .steps-grid,
  .why-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .input-card,
  .breakdown-item,
  .shock-card,
  .result-card,
  .competitor-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
