.automlp-calculator {
  --automlp-bg: #f7f9fc;
  --automlp-surface: #ffffff;
  --automlp-text: #1f2937;
  --automlp-muted: #6b7280;
  --automlp-border: #E4F0F5;
  --automlp-primary: #0f766e;
  --automlp-primary-soft: #ccfbf1;
  --automlp-positive-bg: #e8fff2;
  --automlp-positive-border: #86efac;
  --automlp-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--automlp-text);
}

header.automlp-header h5 {
    margin: 0 0 3px;
    font-size: 20px;
}
header.automlp-header p {
    font-size: 16px;
}

.automlp-card {
  background: #fff;
  border: 4px solid var(--automlp-primary);
  border-radius: 20px;
  padding: 24px;
  max-width: 980px;
  margin: 16px auto;
}

.automlp-header h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.25;
}

.automlp-header p {
  margin: 0;
  color: var(--automlp-muted);
}

.automlp-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.automlp-field-wordcount {
  grid-column: span 2;
}

.automlp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.automlp-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.automlp-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.automlp-value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: #ecfeff;
  color: #115e59;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.automlp-input {
    border: 1px solid var( --e-global-color-0cf4afb );
    border-radius: 6px;
    background: #fff;
    padding: 6px;
    color: var(--automlp-text);
    font-size: 12px;
    min-height: 36px;
}
input#automlp-word-count-manual, input#automlp-word-count {
    font-size: 15px;
    padding: 6px;
    border-width: 1px;
    border-radius: 6px;
}

.automlp-input:focus {
  border-color: var(--automlp-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

input[type="range"].automlp-input {
  appearance: none;
  -webkit-appearance: none;
  min-height: auto;
  height: 12px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6 0%, #5eead4 100%);
}

input[type="range"].automlp-input::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
}

input[type="range"].automlp-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  margin-top: -4px;
  border: 2px solid #ffffff;
  background: #0f766e;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.28);
  cursor: pointer;
}

input[type="range"].automlp-input::-moz-range-track {
  height: 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6 0%, #5eead4 100%);
}

input[type="range"].automlp-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #0f766e;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.28);
  cursor: pointer;
}

input[type="range"].automlp-input:focus {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.automlp-input-manual {
  max-width: 220px;
  margin-top: 8px;
  font-size: 1rem;
}

.automlp-toggle-field {
  display: none;
}

.automlp-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--automlp-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.automlp-toggle {
  width: 18px;
  height: 18px;
  accent-color: var(--automlp-primary);
}

.automlp-results {
  margin-top: 20px;
}

.automlp-table {
    width: 100%;
    border-spacing: 0;
    background: var(--automlp-surface);
    border: 1px solid var(--automlp-primary);
    border-radius: 12px;
    overflow: hidden;
    border-collapse: collapse;
}

.automlp-table tr th, .automlp-table tr td {
    border: 1px solid #dddddd !important;
    background: #fff ! IMPORTANT;
}

.automlp-table th:last-child,
.automlp-table td:last-child {
  border-right: none;
}

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

.automlp-table th {
  background: #f9fafb;
  text-align: left;
  font-size: 0.95rem;
}

.automlp-metric + .automlp-metric {
  margin-top: 10px;
}

.automlp-label {
  position: relative;
  color: var(--automlp-muted);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.automlp-metric strong,
.automlp-savings-box strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.automlp-savings-box {
  background: var(--automlp-positive-bg);
  border: 1px solid var(--automlp-positive-border);
  border-radius: 12px;
  padding: 14px;
}

.automlp-savings-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.automlp-savings-row + .automlp-savings-row {
  margin-top: 8px;
}

.automlp-savings-row strong {
  display: inline;
  margin-top: 0;
  font-size: 1rem;
}

.automlp-savings-separator {
  color: var(--automlp-muted);
  font-size: 0.95rem;
}

.automlp-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--automlp-primary-soft);
  color: var(--automlp-primary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: help;
}

.automlp-tooltip {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    background: #111827;
    color: #f9fafb;
    border-radius: 4px;
    padding: 6px;
    max-width: 240px;
    font-size: 0.68rem;
    line-height: 1.4;
    z-index: 50;
}

.automlp-info:hover + .automlp-tooltip,
.automlp-info:focus + .automlp-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .automlp-input-grid {
    grid-template-columns: 1fr;
  }

  .automlp-field-wordcount {
    grid-column: auto;
  }

  .automlp-table th,
  .automlp-table td {
    padding: 12px;
  }

  .automlp-card {
    padding: 18px;
  }

  .automlp-input-manual {
    max-width: 100%;
  }
}
