/**
 * AMPEr.scss
 *
 * AMPEr is a vanilla js cookiebanner compliant with eu gdpr.
 * (A)nalytic (M)arketing (P)ersonalization (E)ssential rozekoek.
 * 
 * @version     2.1
 * @license     http://www.opensource.org/licenses/mit-license.html MIT License
 * @author      Bob Vrijland <bob@bahbv.net>
 * @updated     15-12-2020
 * @link        https://github.com/Bahbv
 */
/* Styling for AMPEr cookie banner 
 * 1. Variables and functions
 * 2. Helpers
 * 3. Modal
 * 4. Buttons and icon's
 * 5. Toggle switch component
 * 6. Transition
 * 7. Extra styling options
 */
/* 2. Helpers ( Maybe this is already included, but heck .. )*/
.sr-only {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important; }

html.using-mouse :focus {
  outline: none !important;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0) !important; }

html.using-mouse :focus + label span:last-child {
  outline: none !important;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0) !important; }

/* 3. Modal */
.AMPEr_modal {
  width: calc(100% - 2rem);
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  margin-right: 1rem;
  background-color: white;
  padding: 1rem;
  border-radius: 0.625rem; }
  .AMPEr_modal_head {
    margin: 0;
    color: #222;
    font-size: 2rem;
    display: flex;
    align-items: center; }
  .AMPEr_modal_text {
    margin: 1rem 0; }

@media screen and (min-width: 480px) {
  .AMPEr_modal {
    width: 22rem;
    margin-right: 0; } }

/* 4. Buttons and icon's */
.AMPEr_modal_buttons {
  display: flex;
  margin-top: 2rem; }
  .AMPEr_modal_buttons button {
    margin-right: 0.425rem; }
  .AMPEr_modal_buttons button:last-of-type {
    margin-right: 0; }

.AMPEr_btn {
  display: block;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0;
  text-decoration: none;
  background: #222;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border-radius: 0.3125rem;
  transition: background 250ms ease-in-out,  transform 150ms ease;
  -webkit-appearance: none;
  -moz-appearance: none; }
  .AMPEr_btn:hover, .AMPEr_btn:focus {
    background: #151515; }
  .AMPEr_btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.1875rem black; }
  .AMPEr_btn:active {
    transform: scale(0.99); }
  .AMPEr_btn--settings, .AMPEr_btn--info {
    padding: 0.425rem 0.425rem;
    background: transparent;
    border: 0.125rem solid #222;
    color: #222; }
    .AMPEr_btn--settings:hover, .AMPEr_btn--settings:focus, .AMPEr_btn--info:hover, .AMPEr_btn--info:focus {
      background: transparent;
      border-color: #151515;
      color: #151515; }
      .AMPEr_btn--settings:hover i svg, .AMPEr_btn--settings:focus i svg, .AMPEr_btn--info:hover i svg, .AMPEr_btn--info:focus i svg {
        fill: #151515; }

.AMPEr_icon--gear svg {
  display: block;
  fill: #222;
  width: auto;
  height: 1.2rem; }

.AMPEr_icon--rozekoek {
  display: inline-block;
  background-image: url("../svg/roze-koek.svg");
  background-size: 2rem 2rem;
  width: 2rem;
  height: 2rem;
  margin-right: 0.8rem; }

/* 5. Toggle switch component */
.AMPEr_switches {
  padding: 0;
  list-style: none;
  margin: 1rem 0; }
  .AMPEr_switches li {
    margin-bottom: 0.625rem;
    font-size: 1.1rem;
    font-weight: 600; }
    .AMPEr_switches li small {
      display: block;
      font-size: 0.8rem;
      color: #5f5f5f; }
  .AMPEr_switches input {
    position: absolute;
    left: -9999px; }
  .AMPEr_switches label {
    display: flex;
    align-items: center;
    justify-content: space-between; }
  .AMPEr_switches .AMPEr_switch span:last-child {
    position: relative;
    width: 3.125rem;
    height: 1.625rem;
    border-radius: 0.9375rem;
    background: grey;
    transition: all 0.3s; }
    .AMPEr_switches .AMPEr_switch span:last-child:before {
      content: "";
      position: absolute;
      left: 0.0625rem;
      top: 0.0625rem;
      width: 1.5rem;
      height: 1.5rem;
      background: white;
      border-radius: 50%;
      z-index: 1;
      transition: transform 0.3s; }
    .AMPEr_switches .AMPEr_switch span:last-child:after {
      content: "";
      position: absolute;
      top: 50%;
      right: 0.5rem;
      width: 0.75rem;
      height: 0.75rem;
      transform: translateY(-50%);
      background: url(../svg/switch-unchecked.svg);
      background-size: 0.75rem 0.75rem; }
  .AMPEr_switches .AMPEr_switch input[disabled] + label span:last-of-type {
    opacity: 0.5; }
  .AMPEr_switches .AMPEr_switch input:checked + label span:last-child {
    background: #222; }
    .AMPEr_switches .AMPEr_switch input:checked + label span:last-child:before {
      transform: translateX(1.5rem); }
    .AMPEr_switches .AMPEr_switch input:checked + label span:last-child:after {
      width: 0.875rem;
      height: 0.875rem;
      left: 0.5rem;
      background-image: url(../svg/switch-checked.svg);
      background-size: 0.875rem 0.875rem; }
  .AMPEr_switches .AMPEr_switch:hover span:last-child {
    background: #737373; }
  .AMPEr_switches .AMPEr_switch:hover input:checked + label span:last-child {
    background: #151515; }
  .AMPEr_switches .AMPEr_switch input:focus + label span:last-child {
    background: #737373;
    outline: 0;
    box-shadow: 0 0 0 0.1875rem black; }
  .AMPEr_switches .AMPEr_switch input:checked:focus + label span:last-child {
    background: #151515;
    outline: 0;
    box-shadow: 0 0 0 0.1875rem black; }

/* 6. Transition */
#AMPEr_modal_1 {
  display: none; }
  #AMPEr_modal_1.AMPEr--active {
    display: block; }

#AMPEr_modal_2 {
  display: none; }
  #AMPEr_modal_2.AMPEr--active {
    display: block; }

/* 7. Extra styling options */
/* 7.1 bottom bar */
.AMPEr_modal.AMPEr--bottom {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 0; }
  .AMPEr_modal.AMPEr--bottom.AMPEr--settings-active {
    padding: 0; }
  .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 {
    align-items: center;
    justify-content: space-between; }
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1.AMPEr--active {
      display: flex; }
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_head {
      display: none; }
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_description {
      flex-grow: 1; }
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_buttons {
      margin-top: 0;
      display: flex;
      justify-content: flex-end;
      min-width: 200px; }
  .AMPEr_modal.AMPEr--bottom #AMPEr_modal_2 {
    background-color: white;
    padding: 1rem;
    border-radius: 0.625rem;
    max-width: 400px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; }
  @media screen and (max-width: 768px) {
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 {
      flex-wrap: wrap; }
      .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_description {
        flex-grow: 1; }
      .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_buttons {
        width: 100%;
        margin-top: 0;
        display: flex;
        justify-content: flex-end; } }
  @media screen and (max-width: 420px) {
    .AMPEr_modal.AMPEr--bottom #AMPEr_modal_2 {
      width: 100%;
      max-width: none;
      top: unset;
      left: unset;
      bottom: 0;
      transform: none;
      border-radius: 0;
      border-top-left-radius: 0.625rem;
      border-top-right-radius: 0.625rem; }
      .AMPEr_modal.AMPEr--bottom #AMPEr_modal_2 .AMPEr_modal_buttons {
        justify-content: flex-end; } }

/* 7.2 Centered (good for instant settings */
.AMPEr_modal.AMPEr--centered {
  left: 0;
  right: 0;
  margin-right: 0;
  bottom: 0;
  width: 100%;
  border-radius: 0;
  border-top-left-radius: 0.625rem;
  border-top-right-radius: 0.625rem; }
  @media screen and (min-width: 480px) {
    .AMPEr_modal.AMPEr--centered {
      position: fixed;
      top: 50%;
      left: 50%;
      bottom: unset;
      transform: translate(-50%, -50%);
      width: 22rem;
      border-radius: 0.625rem; } }

/* 8 Underlay */
#AMPEr_Underlay {
  z-index: -1;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); }
