
.background-library-open-button {

  margin-top: 10px;

  width: 100%;

  padding: 11px 14px;

  border: 1px solid rgba(109, 93, 252, 0.3);

  border-radius: 10px;

  background: rgba(109, 93, 252, 0.08);

  color: #5546db;

  font: inherit;

  font-weight: 700;

  cursor: pointer;

}



.background-library-modal[hidden] {

  display: none;

}



.background-library-modal {

  position: fixed;

  inset: 0;

  z-index: 2500;

  display: grid;

  place-items: center;

  padding: 20px;

}



.background-library-backdrop {

  position: absolute;

  inset: 0;

  background: rgba(15, 16, 24, 0.62);

  backdrop-filter: blur(6px);

}



.background-library-panel {

  position: relative;

  z-index: 1;

  width: min(1050px, 100%);

  max-height: min(780px, 92vh);

  overflow: hidden;

  border-radius: 20px;

  background: #ffffff;

  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);

}



.background-library-header {

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 20px;

  padding: 22px 24px;

  border-bottom: 1px solid #ececf2;

}



.background-library-header h2 {

  margin: 0;

  color: #171821;

}



.background-library-header p {

  margin: 5px 0 0;

  color: #707381;

}



.background-library-close {

  width: 40px;

  height: 40px;

  border: 0;

  border-radius: 10px;

  background: #f1f1f6;

  font-size: 24px;

  cursor: pointer;

}



.background-library-tools {

  padding: 18px 24px;

  border-bottom: 1px solid #ececf2;

}



#backgroundLibrarySearch {

  width: 100%;

  padding: 12px 14px;

  border: 1px solid #dcdde7;

  border-radius: 10px;

  font: inherit;

}



.background-library-categories {

  display: flex;

  gap: 8px;

  margin-top: 14px;

  overflow-x: auto;

  padding-bottom: 4px;

}



.background-category-button {

  flex: 0 0 auto;

  padding: 8px 12px;

  border: 1px solid #ddddE8;

  border-radius: 999px;

  background: #fff;

  color: #565967;

  font: inherit;

  font-size: 13px;

  cursor: pointer;

}



.background-category-button.active {

  border-color: #6d5dfc;

  background: #6d5dfc;

  color: #fff;

}



.background-library-grid {

  display: grid;

  grid-template-columns:

    repeat(4, minmax(0, 1fr));

  gap: 16px;

  max-height: 570px;

  overflow-y: auto;

  padding: 22px 24px 28px;

}



.background-preset-card {

  padding: 10px;

  border: 1px solid #e5e5ed;

  border-radius: 14px;

  background: #fff;

}



.background-preview {

  position: relative;

  aspect-ratio: 4 / 3;

  overflow: hidden;

  border-radius: 10px;

  background:

    linear-gradient(135deg, #eee, #ccc);

}



.background-preview-black-marble {

  background:

    linear-gradient(

      135deg,

      #08090c,

      #252730,

      #050506

    );

}



.background-preview-white-marble {

  background:

    linear-gradient(

      135deg,

      #fff,

      #d9d9df,

      #f7f7f8

    );

}



.background-preview-rose-marble,

.background-preview-champagne-silk {

  background:

    linear-gradient(

      135deg,

      #f1d5cf,

      #cfa89e,

      #fff0e9

    );

}



.background-preview-black-velvet,

.background-preview-smoked-glass {

  background:

    radial-gradient(

      circle at 40% 35%,

      #4a4b54,

      #0a0a0d 65%

    );

}



.background-preview-minimal-white,

.background-preview-amazon-white {

  background:

    linear-gradient(

      145deg,

      #fff,

      #ebebee

    );

}



.background-preview-soft-cream,

.background-preview-sand-beige {

  background:

    linear-gradient(

      145deg,

      #fff5df,

      #d9c2a2

    );

}



.background-preview-light-grey,

.background-preview-soft-concrete {

  background:

    linear-gradient(

      145deg,

      #f2f3f5,

      #b8bbc1

    );

}



.background-preview-dark-concrete,

.background-preview-dark-walnut {

  background:

    linear-gradient(

      145deg,

      #15171b,

      #4c443d

    );

}



.background-preview-warm-wood {

  background:

    linear-gradient(

      145deg,

      #9f6c43,

      #d6a477

    );

}



.background-preview-glossy-acrylic,

.background-preview-water-reflection {

  background:

    linear-gradient(

      145deg,

      #c7e8f1,

      #f8feff,

      #9ccbd7

    );

}



.background-preview-gradient-purple {

  background:

    linear-gradient(

      135deg,

      #3c2d84,

      #9d80ff

    );

}



.background-preview-gradient-blue {

  background:

    linear-gradient(

      135deg,

      #154c79,

      #8ac6ff

    );

}



.background-favorite-button {

  position: absolute;

  top: 8px;

  right: 8px;

  width: 34px;

  height: 34px;

  border: 0;

  border-radius: 50%;

  background: rgba(255,255,255,.92);

  color: #6d5dfc;

  font-size: 20px;

  cursor: pointer;

}



.background-preset-card h3 {

  margin: 10px 0 2px;

  color: #20212a;

  font-size: 15px;

}



.background-preset-card p {

  margin: 0 0 10px;

  color: #777a87;

  font-size: 12px;

}



.background-apply-button {

  width: 100%;

  padding: 9px;

  border: 0;

  border-radius: 9px;

  background: #6d5dfc;

  color: #fff;

  font: inherit;

  font-weight: 700;

  cursor: pointer;

}



.background-library-empty {

  grid-column: 1 / -1;

  padding: 50px 20px;

  color: #737684;

  text-align: center;

}



body.background-library-open {

  overflow: hidden;

}



@media (max-width: 900px) {

  .background-library-grid {

    grid-template-columns:

      repeat(3, minmax(0, 1fr));

  }

}



@media (max-width: 680px) {

  .background-library-modal {

    padding: 0;

  }



  .background-library-panel {

    width: 100%;

    height: 100%;

    max-height: none;

    border-radius: 0;

  }



  .background-library-grid {

    grid-template-columns:

      repeat(2, minmax(0, 1fr));

  }

}

