:root {
  --acfsip-border-radius: 4px;
  --acfsip-spacing: 10px;
}

/* Icon Selector Button */
.acf-svg-icon-picker__selector {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 50px;
  background-color: #eee;
  width: 50px;
  height: 50px;
  color: #aaa;
  font-weight: 300;
  overflow: hidden;
  font-size: 20px;
  user-select: none;
}

.acf-svg-icon-picker__selector:hover {
  background-color: #ddd;
}

.acf-svg-icon-picker__icon {
  padding: 15px;
  background: 0;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.acf-svg-icon-picker__icon img {
  width: 100%;
  height: 100%;
}

.acf-svg-icon-picker__remove {
  display: none;
  appearance: none;
  cursor: pointer;
  margin-top: 5px;
  border: 1px solid #e1e1e1;
  border-radius: var(--acfsip-border-radius);
  background-color: #f4f4f4;
  padding: 4px;
  font-size: 11px;
  line-height: 1;
}

.acf-svg-icon-picker__remove:hover {
  background-color: indianred;
  color: white;
}

.acf-svg-icon-picker__remove--active {
  display: inline-block;
}

/* Popup */
.acf-svg-icon-picker__popup * {
  box-sizing: border-box;
  margin: 0;
}

.acf-svg-icon-picker__popup-overlay {
  display: grid;
  position: fixed;
  place-items: center;
  z-index: 99999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
}

.acf-svg-icon-picker__popup {
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  border-radius: var(--acfsip-border-radius);
  background-color: #fff;
  width: min(500px, 98vw);
  height: 400px;
  overflow: auto;
  overscroll-behavior: contain;
}

.acf-svg-icon-picker__popup-header {
  display: flex;
  position: sticky;
  top: 0;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--acfsip-spacing);
  z-index: 1;
  background-color: #f4f4f4;
  padding: 20px;
  line-height: 1;
}

.acf-svg-icon-picker__popup-close {
  padding: 0;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

.acf-svg-icon-picker__popup-contents{
  padding: 20px;
}

.acf-svg-icon-picker__popup ul {
  display: grid;
  position: relative;
  grid-template-columns: repeat(var(--acfsip-columns, 4), calc(25% - var(--acfsip-spacing)));
  gap: var(--acfsip-spacing);
}

.acf-svg-icon-picker__popup ul li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: var(--acfsip-border-radius);
  padding: var(--acfsip-spacing);
}

.acf-svg-icon-picker__popup ul li:hover {
  background-color: #eee;
}

.acf-svg-icon-picker__popup ul li img {
  max-height: 50px;
  max-width: 100%;
}

.acf-svg-icon-picker__popup ul li span {
  display: block;
  margin: 10px auto 0;
  color: #222;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  hyphens: auto;
  text-transform: capitalize;
}

.acf-svg-icon-picker__filter {
  border-radius: var(--acfsip-border-radius);
  padding: 12px;
  width: 100%;
}
