/* Färger: ändra här om knappen ska ha en annan färg */
:root {
  --ig-kop-farg: #1f9d55;
  --ig-kop-farg-hover: #17803f;
  --ig-kop-text: #1e1c26;
  --ig-kop-dampad: #6b6a70;
}

/* Knappen på sidan */
.ig-kop {
  margin: 20px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 340px;
}
.ig-kop__rubrik {
  margin: 0 0 12px;
  font-family: "dezen_pro_bold", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ig-kop-text);
}
.ig-kop__knapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ig-kop-farg);
  color: #fff !important;
  font-size: 20px;
  line-height: 1.1;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ig-kop__butik {
  font-family: "dezen_pro_bold", sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* Knappen på sidan visar butiksnamn + ikon; "Till butik" finns bara i mobillistan */
.ig-kop__knapptext {
  display: none;
  flex: 0 0 auto;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .5);
  font-family: "dezen_pro_medium", sans-serif;
  white-space: nowrap;
}
.ig-kop__knapp:hover,
.ig-kop__knapp:focus-visible {
  background: var(--ig-kop-farg-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}
.ig-kop__knapp:hover .ig-kop__butik,
.ig-kop__knapp:focus-visible .ig-kop__butik {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ig-kop__knapp:focus-visible {
  outline: 3px solid var(--ig-kop-text);
  outline-offset: 2px;
}
.ig-kop__ikon {
  display: inline-flex;
  flex: 0 0 auto;
}
.ig-kop__knapp .ig-kop__ikon svg {
  width: 20px;
  height: 20px;
}
.ig-kop__samarbete {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ig-kop-dampad);
  text-align: center;
}

/* Fast list i mobilen */
.ig-kop-list {
  display: none;
}

@media only screen and (max-width: 767px) {
  .ig-kop {
    max-width: none;
    margin: 18px 0 8px;
  }
  .ig-kop__rubrik {
    margin-bottom: 6px;
  }
  .ig-kop__knapp {
    padding: 15px 20px;
    font-size: 17px;
  }
  .ig-kop__knapp .ig-kop__ikon svg {
    width: 18px;
    height: 18px;
  }

  .ig-kop-list {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #d8d8d8;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
    color: var(--ig-kop-text) !important;
    text-decoration: none !important;
    transform: translateY(110%);
    transition: transform .25s ease;
  }
  .ig-kop-list--synlig {
    transform: translateY(0);
  }
  .ig-kop-list__bild {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
  }
  .ig-kop-list__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .ig-kop-list__titel {
    font-family: "dezen_pro_bold", sans-serif;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ig-kop-list__butik {
    font-size: 13px;
    line-height: 1.25;
  }
  /* Butiksnamnet på egen rad så att hela namnet syns */
  .ig-kop-list__butik strong {
    display: block;
    overflow-wrap: anywhere;
  }
  .ig-kop-list__samarbete {
    font-size: 10px;
    color: var(--ig-kop-dampad);
  }
  .ig-kop-list__knapp {
    flex: 0 0 46%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    box-sizing: border-box;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--ig-kop-farg);
    color: #fff;
    font-family: "dezen_pro_bold", sans-serif;
    font-size: 17px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  }
  .ig-kop-list__knapp .ig-kop__ikon svg {
    width: 20px;
    height: 20px;
  }

  /* Så att sidfoten inte döljs bakom listan */
  body.har-ig-kop-list {
    padding-bottom: 84px;
  }
}
