/**
 * Simmelink Calculators – design tokens.
 *
 * The calculator stylesheets were written against the variables of the
 * previous theme. This file defines those variables on the calculator
 * containers, mapped to the theme.json presets of the current theme, so the
 * calculators can be restyled here without touching the other stylesheets.
 */

.cf7-form,
.calculator-form,
#alimony_results_wrapper,
#alimony_email_section,
.indexering-calculator-wrap {
  /* Surfaces */
  --base-100: #fff;
  --base-200: #fafafa;
  --base-300: var(--wp--preset--color--base, #F4F5F6);
  --base-400: #dcdfe3;

  /* Text */
  --contrast-100: #fff;
  --contrast-300: #4a5562;
  --contrast-500: var(--wp--preset--color--contrast, #0F1E2E);

  /* Brand */
  --brand-1: var(--wp--preset--color--contrast, #0F1E2E);
  --brand-2: var(--wp--preset--color--blue-normal, #005E8C);
  --brand-3: var(--wp--preset--color--blue-light, #DDEBF9);
  --surface-accent: var(--wp--preset--color--blue-light, #DDEBF9);

  /* Status */
  --error: #b3261e;
  --success: #2e7d32;

  /* Spacing */
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 20px;
  --space-l: 30px;
  --space-xl: 40px;

  /* Shape and type */
  --radius-default: 2px;
  --ff-body: inherit;
  /* The calculators keep the body font. The theme preset "heading" is not
     used here: its font has one weight, the titles below ask for 600 and 700. */
  --ff-display: inherit;

  /* Primary button: flat, following the theme buttons */
  --btn-pad-y: 15px;
  --btn-pad-x: 24px;
  --btn-radius: 0;
  --btn-font-size: 1em;
  --btn-min-height: 48px;
  --btn-fg: #fff;
  --btn-grad-1: var(--wp--preset--color--contrast, #0F1E2E);
  --btn-grad-2: var(--wp--preset--color--contrast, #0F1E2E);
  --btn-grad-1-hover: var(--wp--preset--color--blue-normal, #005E8C);
  --btn-grad-2-hover: var(--wp--preset--color--blue-normal, #005E8C);
}

/* The tooltip trigger is a button; remove the browser button styling */
button.tooltip-trigger {
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
}

/* On a touch screen the tap area is 40 x 40px around the icon; the icon keeps its size.
   The z-index lifts it above the field wrapper of the next line, which is positioned too. */
@media (pointer: coarse) {
  button.tooltip-trigger::after {
    content: "";
    height: 40px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    z-index: 1;
  }
}

button.tooltip-trigger:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

.tooltip-trigger .tooltiptext {
  text-align: left;
  font-weight: 400;
}
