.coastkey-shortcode {
  display: flex;
  flex-direction: row;
  min-width: 100%;
  gap: 20px;
}

.coastkey-main{
  flex: 0.75;
  display: flex;
  flex-direction: column;
}


.coastkey-item.product-cat-coastkey.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: 1px solid #ddd;
  cursor: pointer;
  border-radius: .5rem;
}
.coastkey-item.product-cat-coastkey.btn.highlight {
  outline: 2px solid #ff6200;
}

.coastkey-item.product-cat-coastkey.btn p{
  margin: 0;
  font-weight: 600;
}

.coastkey-item.product-cat-coastkey.btn span{
  font-weight: 500;
  font-style: italic;
  white-space: nowrap;
}

.coastkey-item.product-cat-coastkey.btn.selected {
  border-color: #ff6200;
  outline: 2px solid #ff6200;
}
.coastkey-filters select.highlight{
  outline: 2px solid #ff6200;
}
.coastkey-filters select:valid{
  border-color: #ff6200;
  outline: 2px solid #ff6200;
}

.coastkey-item.product-cat-coastkey.btn:hover {
  background-color: #ededed;
}

.coastkey-selects {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.coastkey-select-wrapper {
  
}

.coastkey-product-options{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.coastkey-shortcode label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.coastkey-select-wrapper select {
  width: 100%;
  padding-left: 2rem;
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: .5rem;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none; /* Remove default styling in WebKit browsers */
  -moz-appearance: none; /* Remove default styling in Firefox */
  appearance: none; /* Standard property for modern browsers */
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M16.53 8.97a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L12 12.44l3.47-3.47a.75.75 0 0 1 1.06 0" clip-rule="evenodd"/></svg>') no-repeat right 20px center; /* New custom caret */
  background-size: 24px 24px; /* Scale down to fit, adjust as needed */
}
.coastkey-select-wrapper select:hover {
  background-color: #ededed;
}

.coastkey-select-wrapper.variant-hidden {
  display: none;
}

.coastkey-result {
  margin-top: 1rem;
  position: fixed;
  bottom: 0;
  background-color: #eb5b26;
  color: white;
  width: 100%;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease-in-out;
  align-items: center;
}

.coastkey-result-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  gap: 1rem;
  padding: 1rem 2rem 1.5rem;
  max-width: 1248px;
}

.coastkey-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center; 
  gap: 2rem;
}

.coastkey-result-row .item{
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: space-between;
}

.coastkey-result-row .actions{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.coastkey-result-row .actions a, .coastkey-result-row .actions button {
  border: 2px solid #fff;
  border-radius: .5rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none !important;
}
.coastkey-result-row .actions button, .coastkey-result-row .actions a.added_to_cart{
  background-color: white;
  color: #eb5b26;
}
.coastkey-result-row .actions button:hover, .coastkey-result-row .actions a.added_to_cart:hover{
  background-color:  #eb5b26;
  color:white;
}
.coastkey-result-row .actions a{
  background-color:  #eb5b26;
  color:white;
}
.coastkey-result-row .actions a:hover{
  background-color: white;
  color: #eb5b26;
}

.coastkey-result-row .actions a.added_to_cart{
  display: none;
}
.coastkey-result-row .actions p{
  border-radius: .5rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none !important;
  flex: 1;
  margin: 0;
  border: 0;
}

.coastkey-result-inner {
  display: flex;
  flex-direction: column;
}

/* Divider between rows */
.coastkey-divider {
  min-height: 1px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3); /* Light white divider */
  width: 100%;
}

.coastkey-result-inner a.added_to_cart{
  margin-top: 0;
}


.coastkey-result-inner button:hover {
  background-color: #f0f0f0; /* Slight hover effect */
}

/* Adjust font sizes and styles for better readability */
.coastkey-result-inner p {
  margin: 0 !important;
  font-size: 14px;
  font-weight: bold;
}

.coastkey-result-inner span {
  margin: 0;
  font-size: 14px;
}

/* Optional: Adjust font sizes for better readability */
.coastkey-result-inner p {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
}

.coastkey-result-inner span {
  margin: 0;
  font-size: 14px;
}

.coastkey-result-close {
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.coastkey-result-close:hover {
  background: rgba(255, 255, 255, 0.175);
}
.coastkey-result-close:hover svg {
  transform: rotate(180deg);
}
.coastkey-result-close[data-state="closed"] svg{
  transform: rotate(180deg);
}
.coastkey-result-close[data-state="closed"]:hover svg{
  transform: rotate(0deg);
}

.coastkey-result-empty {
  bottom: -100%;
}

.coastkey-filters {
  display: flex;
  flex-direction: column;
  flex:0.25;
  gap: 1rem;
}

.coastkey-images {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3,1fr);
  background: #ededed;
  align-items: center;
  padding: 1rem;
}
.coastkey-image-wrapper.variable{
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-height: 400px;
  overflow: hidden;
}

.coastkey-image-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.coastkey-image-wrapper label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.coastkey-image {
  
  display: block;
  max-width: 100%;
  max-height: 400px;
}

.coastkey-image.hidden {
  display: none;
}

.coastkey-information-panel{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  background: #ededed;
}
.coastkey-column-description{
  display: flex;
  justify-content: center;
  padding: 1rem;
  border-right: 2px solid white;
  border-top: 2px solid white;
}
.coastkey-column-description:last-child{
  border-right: 0;
}

.coastkey-text{
  flex-direction: column;
  margin: 2rem 0;
}
.coastkey-text.visible{
  display: flex;
}

.search-btn-wrapper{
  display: flex;
  flex-direction: column;
  position: relative;
}
.search-msg{
  background-color: #333;
  border-radius: .5rem;
  padding: 1rem;
  position: absolute;
  width: 100%;
  text-align: center;
  color: #FFF;
  opacity: 0;
  transition: all .2s ease-in-out;
  pointer-events: none;
}

.search-msg::after{
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-top-color: #333333;
  bottom: 0;
  left: 50%;
  transform: translate(-5px, 100%);
}

/* Style for the Search button */
.coastkey-search-button {
  display: block;
  padding: 1rem;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: #ff6200; /* Orange from the image */
  border: none;
  border-radius: .5rem;
  cursor: pointer;
  outline: 2px solid #ff6200;
}
.coastkey-search-button.disabled {
  opacity: .5;
}

.coastkey-search-button.disabled:hover ~ span{
  opacity: 1;
  transform: translateY(-115%);
}

.coastkey-search-button:hover {
  background-color: #e65c00;
  outline: 2px solid #e65c00;
}

/* Style for the loading animation (subtle diffuse effect) */
.coastkey-image-loading {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: rgba(0, 123, 255, 0.1); /* Light blue with low opacity */
  border-radius: 50%;
  animation: subtlePulse 1.5s infinite ease-in-out;
}

@keyframes subtlePulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}

/* Style for the loading animation */
.coastkey-image-loading {
  width: 100px;
  height: 100px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.coastkey-text.mobile, .coastkey-text.mobile.visible{
  display: none;
}

@media (max-width: 1024px) {
  .coastkey-shortcode {
    flex-direction: column;
  }
  .coastkey-text.mobile{
    display: flex;
  }
  .coastkey-text.mobile.visible{
    display: flex;
  }
  .coastkey-text.desktop.visible{
    display: none;
  }

  .coastkey-filters{
    padding: 0 1rem 3rem;
  }
  .coastkey-result-wrapper{
    max-height: 50vh;
    overflow: hidden;
    overflow-y: auto;
    padding: 1rem;
  }
  .coastkey-result-row{
    flex-direction: column;
    align-items: normal;
  }
  .coastkey-result-row .actions a, .coastkey-result-row .actions button {
    flex: 1;
  }

}

/* Kun mobil */
@media (max-width: 768px) {

  /* Knappestil */
  .coastkey-item.product-cat-coastkey.btn {
    display: flex;
    flex-direction: column;       /* p over span */
    align-items: flex-start;      /* venstrejustert tekst */
    justify-content: center;
    padding: 8px 12px 8px 3.25rem;   /* plass til radio-sirkel */
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.3;
    gap: .25rem;                     /* lite mellomrom mellom p og span */
    min-height: 48px;             /* lik høyde */
    position: relative;
  }
  /* Sticky bilde sksjon frem til en trykker søk */

  .coastkey-main.sticky-active {
    position: -webkit-sticky; /* Safari fix */
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff; /* unngå overlap */
  }

  /* p øverst */
  .coastkey-item.product-cat-coastkey.btn p {
    margin: 0;
    font-weight: 600;
  }

  /* span under */
  .coastkey-item.product-cat-coastkey.btn span {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
  }

  /* Radio-sirkel til venstre */
  .coastkey-item.product-cat-coastkey.btn::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ff6200;
    transform: translateY(-50%);
    background: #fff;
    box-sizing: border-box;
  }

  /* Valgt tilstand */
  .coastkey-item.product-cat-coastkey.btn.selected::before {
    background: #ff6200;
    box-shadow: inset 0 0 0 3px #fff;
  }
  .coastkey-item.product-cat-coastkey.btn.selected {
    background: #ff6200;
    color: #fff;
    border-color: #ff6200;
  }

  /* Hover */
  .coastkey-item.product-cat-coastkey.btn:hover {
    border-color: #ff6200;
  }

  /* Strammere spacing i container */
  .coastkey-product-options {
    gap: 0.6rem;
  }
  /* Fjerner info panel på mobil */
  .coastkey-information-panel {
    display: none;
  }
  
  /* Gjør prisen større og mer tydelig */
  .coastkey-result-inner .woocommerce-Price-amount {
    font-size: 16px;
    white-space: nowrap;
    font-weight: 700;
    color: #ffffff;
    display: block;
    margin-top: 4px;
  }

  /* Krymper navnet */
  .coastkey-result-inner .name p {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px;
    line-height: 1.3;
  }

  /* Krymper artikkelnummeret */
  .coastkey-result-inner .article {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.2;
  }

  .coastkey-result-inner .article span {
    display: inline;
  }
  .coastkey-result-row .item {
    flex-wrap: wrap;
  }

  .coastkey-result-inner .woocommerce-Price-amount {
    white-space: nowrap;
  }
   
}





/* CHECKOUT FIXES - UTENFOR PLUGIN */

/* Skjuler avada-user-info i toppen av checkout */
.woocommerce-checkout .post-content .woocommerce > .avada-myaccount-user{
  display: none !important;
}
/* Skjuler avada-checkout-coupon i toppen av checkout */
.woocommerce-checkout .post-content .woocommerce > .checkout_coupon{
  display: none !important;
}