/* מחשבון דמי ניהול – styles. Reuses the shared tool visual language
   (guide-container, stage, custom-upload, faq-item, tool-conversion-*)
   and adds the fee-comparison specific pieces. */

/* Render the tool directly on the page background (no white wrapper card),
   matching the other tools. */
body.management-fees-calculator-body .tool-wrapper {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Tool title (aligned across all tools) */
.guide-container h1 {
  color: #2e1f47;
  font-family: 'Secular One', 'Assistant', sans-serif;
}

/* ===== Shared tool page shell (aligned across all tools) ===== */
.tool-page-layout {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  direction: ltr;
}
.tool-page-layout__main {
  flex: 1;
  min-width: 0;
  direction: rtl;
}
.tool-page-layout__ad {
  flex: 0 0 300px;
  position: sticky;
  top: 84px;
  background: #ffffff;
  border: 1px solid #e8e0f4;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 28px rgba(46, 31, 71, 0.08);
  min-height: 280px;
}
.tool-page-layout__ad .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 250px;
}
@media screen and (max-width: 1200px) {
  .tool-page-layout__ad {
    display: none;
  }
}

.guide-container {
  direction: rtl;
}

/* ===== Intro lead & byline (aligned across all tools) ===== */
.tool-lead {
  color: #7851A9;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 600;
  margin: 0.25rem 0 0.6rem;
}
.tool-byline {
  font-size: 0.85rem;
  color: #777;
  margin: 0 0 1rem;
}

.stage {
  background: #fff;
  border: 1px solid #ece7f5;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 18px 0;
  box-shadow: 0 2px 10px rgba(107, 63, 160, 0.05);
}
.stage h2 {
  font-size: 1.25em;
  margin: 18px 0 8px;
  color: #7851a9;
}
.stage h2:first-child {
  margin-top: 0;
}
.step {
  position: relative;
  padding-inline-start: 26px;
  margin: 8px 0;
  line-height: 1.6;
  color: #444;
}
.step::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: #6b3fa0;
  font-weight: bold;
}

/* ---- Global inputs row ---- */
.fees-field-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.fees-field-row .fees-field {
  min-width: 0;
}
@media (max-width: 640px) {
  .fees-field-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.fees-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fees-field label {
  font-size: 0.88em;
  font-weight: 600;
  color: #555;
}
.fees-field input,
.fees-field select {
  padding: 9px 11px;
  border: 1px solid #d5cde6;
  border-radius: 9px;
  font-size: 1em;
  background: #fff;
  font-family: inherit;
}
.fees-field input:focus,
.fees-field select:focus {
  outline: none;
  border-color: #6b3fa0;
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.12);
}
.fees-hint {
  font-size: 0.85em;
  color: #888;
  margin: 10px 0 0;
}

/* ---- Scenario editor ---- */
.scenario-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.scenario-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  border: 1px solid #e2dcf0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #faf8ff;
}
.scenario-card--current {
  border-color: #6b3fa0;
  background: #f3eefc;
}
.scenario-card .scenario-badge {
  align-self: center;
  flex: 0 0 auto;
}
.scenario-card .scenario-field--name {
  flex: 1 1 160px;
}
.scenario-card .scenario-field {
  margin-bottom: 0;
}
.scenario-badge {
  font-size: 0.78em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #6b3fa0;
  color: #fff;
}
.scenario-badge--alt {
  background: #e9e2f7;
  color: #4a2a75;
}
.scenario-remove {
  border: none;
  background: transparent;
  color: #b04a4a;
  font-size: 1em;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  align-self: center;
  margin-inline-start: auto;
}
.scenario-remove:hover {
  background: #fbe9e9;
}
.scenario-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 9px;
}
.scenario-field label {
  font-size: 0.82em;
  color: #666;
  font-weight: 600;
}
.scenario-field input {
  padding: 7px 9px;
  border: 1px solid #d5cde6;
  border-radius: 8px;
  font-size: 0.95em;
  font-family: inherit;
}
.scenario-field input:focus {
  outline: none;
  border-color: #6b3fa0;
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.1);
}
.scenario-fees {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.scenario-fees .scenario-field {
  flex: 0 0 130px;
}
.scenario-warning {
  flex-basis: 100%;
  display: none;
  font-size: 0.78em;
  color: #b8620c;
  background: #fff6ea;
  border-radius: 7px;
  padding: 6px 8px;
  margin: 4px 0 0;
  line-height: 1.4;
}

.scenario-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.custom-upload {
  background: #6b3fa0;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.custom-upload:hover {
  background: #593489;
}
.scenario-reset-btn {
  background: transparent;
  color: #6b3fa0;
  border: 1px solid #cfc2e6;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.95em;
  cursor: pointer;
  font-family: inherit;
}
.scenario-reset-btn:hover {
  background: #f3eefc;
}

/* ---- Phone layout: stack scenario rows and let fields fill width ---- */
@media (max-width: 640px) {
  .stage {
    padding: 16px 14px;
  }
  .scenario-card {
    position: relative;
    align-items: stretch;
    gap: 10px;
    padding: 14px 14px 12px;
  }
  .scenario-card .scenario-badge {
    order: 1;
    align-self: flex-start;
  }
  .scenario-remove {
    order: 2;
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    margin: 0;
  }
  .scenario-card .scenario-field--name {
    order: 3;
    flex: 1 1 100%;
  }
  .scenario-fees {
    order: 4;
    flex: 1 1 100%;
    gap: 10px;
  }
  .scenario-fees .scenario-field {
    flex: 1 1 0;
    min-width: 0;
  }
  .scenario-actions {
    flex-direction: column;
  }
  .scenario-actions .custom-upload,
  .scenario-actions .scenario-reset-btn {
    width: 100%;
  }
}

.fees-calc-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #6b3fa0, #8a5fc0);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 11px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 6px;
}
.fees-calc-btn:hover {
  filter: brightness(1.05);
}

/* ---- Results ---- */
.fees-results {
  margin-top: 22px;
}
.best-plan-callout {
  background: #eef7f1;
  border: 1px solid #cfe8da;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 1.12em;
  line-height: 1.6;
  color: #21503b;
  text-align: center;
  margin-bottom: 18px;
}
.fees-result-table-wrapper {
  overflow-x: auto;
}
.fees-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  min-width: 560px;
}
.fees-result-table th,
.fees-result-table td {
  padding: 11px 12px;
  text-align: center;
  border-bottom: 1px solid #eee;
}
.fees-result-table thead th {
  background: #f3eefc;
  color: #4a2a75;
  font-weight: 700;
}
.fees-result-table .row-current {
  background: #faf8ff;
  font-weight: 600;
}
.scenario-name-cell {
  text-align: start;
  white-space: nowrap;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-inline-end: 7px;
  vertical-align: middle;
}
.diff-pos {
  color: #2f9e6f;
  font-weight: 700;
}
.diff-neg {
  color: #c0504d;
  font-weight: 700;
}

.chart-container {
  position: relative;
  height: 340px;
  margin: 22px 0 10px;
}
.fees-disclaimer {
  font-size: 0.82em;
  color: #999;
  text-align: center;
  margin: 10px 0 18px;
  line-height: 1.5;
}

/* ---- Conversion banner (shared look with other tools) ---- */
.tool-conversion-banner {
  border-radius: 12px;
  padding: 18px 20px;
  text-align: center;
  margin: 14px 0;
}
.tool-conversion-banner--primary {
  background: #f3eefc;
  border: 1px solid #ddd0f0;
}
.tool-conversion-banner__title {
  font-weight: 700;
  font-size: 1.1em;
  color: #4a2a75;
  margin: 0 0 6px;
}
.tool-conversion-banner__text {
  color: #555;
  margin: 0 0 12px;
  line-height: 1.6;
}
.tool-conversion-banner__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.tool-conversion-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 9px;
  font-weight: 600;
  text-decoration: none;
}
.tool-conversion-btn--primary {
  background: #6b3fa0;
  color: #fff;
}
.tool-conversion-btn--primary:hover {
  background: #593489;
}

/* ---- Agent lead form ---- */
.agent-lead {
  margin: 22px 0 4px;
}
.agent-lead__inner {
  background: linear-gradient(135deg, #4a2a75, #6b3fa0);
  color: #fff;
  border-radius: 14px;
  padding: 22px 22px 20px;
}
.agent-lead__title {
  margin: 0 0 6px;
  font-size: 1.3em;
  color: #fff;
}
.agent-lead__text {
  margin: 0 0 16px;
  line-height: 1.6;
  color: #f0e9fb;
}
.agent-lead__fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.agent-lead__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.agent-lead__field label {
  font-size: 0.85em;
  font-weight: 600;
  color: #f0e9fb;
}
.agent-lead__field input {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 1em;
  font-family: inherit;
  background: #fff;
  color: #222;
}
.agent-lead__field input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.agent-lead__consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0;
  font-size: 0.85em;
  line-height: 1.5;
  color: #ece4fa;
}
.agent-lead__consent input {
  margin-top: 3px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}
.agent-lead__consent a {
  color: #fff;
  text-decoration: underline;
}
.agent-lead__submit {
  background: #f0b429;
  color: #3a2560;
  border: none;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 1.05em;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.agent-lead__submit:hover {
  filter: brightness(1.05);
}
.agent-lead__submit:disabled {
  opacity: 0.7;
  cursor: default;
}
.agent-lead__response {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-weight: 600;
  text-align: center;
}
.agent-lead__response.is-success {
  color: #d7ffe9;
}
.agent-lead__response.is-error,
.agent-lead__response.is-warning {
  color: #ffe0a3;
}
@media (max-width: 640px) {
  .agent-lead__fields {
    grid-template-columns: 1fr;
  }
}

/* ---- SEO content + FAQ ---- */
.fees-info,
.fees-faq {
  margin: 2rem 0;
  line-height: 1.75;
  color: #333;
}
.fees-info h2,
.fees-faq h2 {
  color: #4a2a75;
}
.fees-info h3 {
  color: #593489;
  margin-top: 1.4rem;
}
.fees-info__list {
  padding-inline-start: 22px;
}
.fees-info__list li {
  margin: 6px 0;
}
.faq-list {
  margin-top: 12px;
}
.faq-item {
  border: 1px solid #ece7f5;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
}
.faq-summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  color: #4a2a75;
  list-style: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-item[open] .faq-summary {
  border-bottom: 1px solid #f0ecf8;
}
.faq-answer {
  padding: 12px 16px;
  color: #444;
}
.faq-answer p {
  margin: 0;
}
