
/*
=========================================================
FORM OBJECTS CSS
=========================================================
 * Innehåller kundanpassad styling av formulär,
 * inmatningsfält, knappar et.c. utanför Envision
 *
 * Copyright (C) Limepark AB.
 * https://limepark.se/licensvillkor
=========================================================*/
/* stylelint-disable no-duplicate-selectors */

/*
---------------------------------------------------------
GENERELLA FORMULÄROBJEKT
--------------------------------------------------------- */

button {
  cursor: pointer;
  font-family: inherit;
}

textarea {
  font-family: inherit;
}

/*
---------------------------------------------------------
FIXAR/FÖRBÄTTRINGAR
---------------------------------------------------------*/

.sv-defaultFormTheme input[type=submit]::-moz-focus-inner {
  border: 0; /* fix för felaktig höjd i Firefox */
  padding: 0;
}

.sv-defaultFormTheme input[type=text],
.sv-defaultFormTheme input[type=email],
.sv-defaultFormTheme input[type=url],
.sv-defaultFormTheme input[type=tel],
.sv-defaultFormTheme input[type=number],
.sv-defaultFormTheme textarea,
.sv-defaultFormTheme select {
  box-shadow: none;
  height: auto;
  transition: none;

  -webkit-appearance: none;
}

.sv-defaultFormTheme input[type=button],
.sv-defaultFormTheme input[type=submit],
.sv-defaultFormTheme input[type=reset] {
  border-style: solid; /* sätts för att undvika konstig default i Chrome */
  box-sizing: border-box;

  -webkit-appearance: none;
}


/* Fixar för Envision */
.env-form textarea {
  font-family: inherit;
}

.env-form-radio__fake {
  top: 2px;
}

[type=radio]:checked + label .env-form-radio__fake:before {
  border-color: #6892d5;
  top: 0;
}

[type=checkbox]:checked + label .env-checkbox__fake:after {
  border-bottom: 4px solid #fff;
  border-left: 4px solid #fff;
  height: 0.35em;
  width: 0.6em;
}

.env-form-radio input[type='radio']:focus + .env-form-element__label .env-form-radio__label {
  text-decoration: underline;
}

.env-checkbox input[type='checkbox']:focus + .env-form-element__label .env-checkbox__label {
  text-decoration: underline;
}

/*
---------------------------------------------------------
DEFAULT FORM THEME - INMATNINGSFÄLT
--------------------------------------------------------- */

.sv-defaultFormTheme input[type=text],
.sv-defaultFormTheme input[type=email],
.sv-defaultFormTheme input[type=url],
.sv-defaultFormTheme input[type=tel],
.sv-defaultFormTheme input[type=number],
.sv-defaultFormTheme textarea,
.sv-defaultFormTheme select {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1.8rem;
  line-height: 1.6 !important; /* Important skriver över SiteVision's styling */
  padding: 1rem 1.5rem;
}

.sv-defaultFormTheme input[type=text]:hover,
.sv-defaultFormTheme input[type=email]:hover,
.sv-defaultFormTheme input[type=url]:hover,
.sv-defaultFormTheme input[type=tel]:hover,
.sv-defaultFormTheme input[type=number]:hover,
.sv-defaultFormTheme textarea:hover,
.sv-defaultFormTheme select:hover {
  border-color: #aaa;
}

.sv-defaultFormTheme input[type=text]:focus,
.sv-defaultFormTheme input[type=email]:focus,
.sv-defaultFormTheme input[type=url]:focus,
.sv-defaultFormTheme input[type=tel]:focus,
.sv-defaultFormTheme input[type=number]:focus,
.sv-defaultFormTheme textarea:focus,
.sv-defaultFormTheme select:focus {
  /*samma utseende vid musklick som vid tabbning */
  border-color: #666;
  box-shadow: none;
}


/*
---------------------------------------------------------
DEFAULT FORM THEME - KNAPPAR
--------------------------------------------------------- */

.sv-defaultFormTheme input[type=button],
.sv-defaultFormTheme input[type=submit],
.sv-defaultFormTheme input[type=reset] {
  background-color: #393939;
  border-color: #393939;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1.6;
  padding: 1rem 2rem;
}

.sv-defaultFormTheme input[type=button]:hover,
.sv-defaultFormTheme input[type=submit]:hover,
.sv-defaultFormTheme input[type=reset]:hover,
.sv-defaultFormTheme input[type=button]:active,
.sv-defaultFormTheme input[type=submit]:active,
.sv-defaultFormTheme input[type=reset]:active {
  background-color: #444;
  border-color: #444;
  color: #fff;
}

.sv-defaultFormTheme input[type=button]:focus,
.sv-defaultFormTheme input[type=submit]:focus,
.sv-defaultFormTheme input[type=reset]:focus {
  background-color: #222;
  border-color: #222;
  color: #fff; /* samma utseende vid musklick som vid tabbning */
  outline: none;
}
