/*
 * Calculateur de frais Vinted — styles scopés au widget (.vc-calc*).
 * Volontairement indépendant du build Tailwind purgé pour rester deploy-safe.
 * Palette de marque VintedCRM : teal #007782.
 */

.vc-calc {
  --vc-teal: #007782;
  --vc-teal-dark: #005d66;
  --vc-teal-soft: #e0f7f9;
  --vc-green: #15803d;
  --vc-green-soft: #f0fdf4;
  --vc-red: #b91c1c;
  --vc-ink: #1f2937;
  --vc-muted: #6b7280;
  --vc-border: #e5e7eb;
  --vc-bg: #f9fafb;

  max-width: 64rem;
  margin: 0 auto 3rem;
  color: var(--vc-ink);
  font-size: 16px;
}

.vc-calc *,
.vc-calc *::before,
.vc-calc *::after {
  box-sizing: border-box;
}

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

@media (min-width: 768px) {
  .vc-calc__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ---- Cartes ---- */
.vc-calc__card {
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vc-calc__card-title {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vc-muted);
}

/* ---- Champs ---- */
.vc-calc__field {
  margin-bottom: 1.25rem;
}
.vc-calc__field:last-child {
  margin-bottom: 0;
}

.vc-calc__label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.vc-calc__input,
.vc-calc__select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--vc-border);
  border-radius: 10px;
  background: #fff;
  color: var(--vc-ink);
  -webkit-appearance: none;
  appearance: none;
}

.vc-calc__input:focus,
.vc-calc__select:focus {
  outline: none;
  border-color: var(--vc-teal);
  box-shadow: 0 0 0 3px rgba(0, 119, 130, 0.15);
}

.vc-calc__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* ---- Range / slider ---- */
.vc-calc__range {
  width: 100%;
  margin-top: 0.85rem;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--vc-teal-soft);
  outline: none;
}
.vc-calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vc-teal);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.vc-calc__range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vc-teal);
  cursor: pointer;
  border: 3px solid #fff;
}

/* ---- Toggle statut vendeur ---- */
.vc-calc__toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  background: var(--vc-bg);
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  padding: 0.25rem;
}
.vc-calc__toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vc-calc__toggle label {
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--vc-muted);
  transition: all 0.15s ease;
}
.vc-calc__toggle input:checked + label {
  background: var(--vc-teal);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.vc-calc__toggle input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(0, 119, 130, 0.3);
}

/* ---- Checkbox ---- */
.vc-calc__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.vc-calc__check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  accent-color: var(--vc-teal);
  flex-shrink: 0;
}

/* ---- Lignes de résultat ---- */
.vc-calc__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 0.97rem;
}
.vc-calc__row span:first-child {
  color: var(--vc-muted);
}
.vc-calc__row--hidden {
  display: none;
}
.vc-calc__row--total {
  border-top: 1px dashed var(--vc-border);
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.vc-calc__row span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vc-calc__amount--plus {
  color: var(--vc-green);
}
.vc-calc__amount--minus {
  color: var(--vc-red);
}

/* ---- Hero : revenu net dominant ---- */
.vc-calc__hero {
  background: linear-gradient(135deg, var(--vc-teal) 0%, var(--vc-teal-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.vc-calc__hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin: 0;
}
.vc-calc__hero-value {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.3rem 0 0;
  font-variant-numeric: tabular-nums;
}
.vc-calc__hero-sub {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0.4rem 0 0;
}

/* ---- Blocs optionnels (cachés par défaut) ---- */
.vc-calc__optional {
  display: none;
}
.vc-calc__optional.is-visible {
  display: block;
}
.vc-calc__card + .vc-calc__card {
  margin-top: 1rem;
}

/* ---- Bloc marge mis en avant ---- */
.vc-calc__card--margin {
  background: var(--vc-green-soft);
  border-color: #bbf7d0;
}

.vc-calc__hint {
  font-size: 0.85rem;
  color: var(--vc-muted);
  margin: 0.4rem 0 0;
}
