/* ------------Card Palette Card Styling------------------------------ */

.color-plate-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 25px 20px;
  max-width: 1290px;
}

.color-plate-card {
  position: relative;
  cursor: pointer;
  border-radius: 13px;
}

.color-plate-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  height: 110px;
}

.color-box {
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-basis: 25%;
  transition: flex-basis 0.3s ease;
}

.color-box .hex-code {
  visibility: hidden;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  position: absolute;
  text-align: center;
  font-size: 12px;
  padding: 2px 6px;
  user-select: none;
  line-height: normal;
  border-radius: 4px;
  margin-bottom: 6px;
  font-weight: 500;
}

.color-box:hover .hex-code {
  visibility: visible;
}

.color-box:hover {
  flex-basis: 40%;
}


.color-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  user-select: none;
}

.custom-date {
  font-size: 13px;
  font-weight: 500;
}

/* Changes made */
.cplike-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: none;
  line-height: 1;
}
/* Changes made */
.like-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
}
/* Changes made */
.like-count{
  font-size: 16px;
  font-weight: 500;
  color: #5F6368;
}

.like-icon-outline {
  background-image: url('../icons/heart-outline.svg');
}

.like-icon-filled {
  background-image: url('../icons/heart-solid.svg');
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 2s linear infinite;
  margin-left: 8px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@media screen and (max-width: 1150px) {
  .color-plate-list {
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 16px;
  }
}

@media screen and (max-width: 1024px) {
  .color-plate-list {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 16px;
  }

  .color-plate-wrapper {
    height: 120px;
  }
}

@media screen and (max-width: 576px) {
  .color-plate-list {
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 16px;
  }

  .color-box .hex-code {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .color-plate-wrapper {
    height: 140px;
  }
}
.cp-end-message{
  text-align: center;
}
.cp-infinite-wrapper{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 50px;
  
}


/* ------------Card Palette main styling------------------------------ */

.cp-page {
  margin: 0 auto;
}

.cp-hero {
  text-align: left;
  padding: 40px 0 40px 0;
}
.cp-hero h1 {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}
.cp-hero p {
  max-width: 550px;
  color: #6b7280;
  font-size: clamp(14px, 2.5vw, 16px);
  margin: 0;
}
.cp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
  user-select: none;
}
/* Changes made */
.cp-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #323232;
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  width: 85%;
  max-width: 280px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

.cp-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ---------Search Bar Styling----------------- */
.cp-search {
  position: relative;
  width: 500px;
}
.cp-search-box-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2px 12px;
  min-height: 46px;
  position: relative;
  z-index: 20;
}
.material-symbols-rounded.cp-search-icon {
  font-size: 20px;
  color: #9aa0a6;
  user-select: none;
}
.cp-search-box-wrapper:focus-within .cp-search-icon {
  display: none;
}
.cp-chips-input-area {
    max-width: 100%;
    display: inline-flex;
    overflow-x: auto;
    margin: 0 5px;
    transition: max-width 0.4s ease, opacity 0.3s ease, margin-right 0.4s ease;
    opacity: 1;
    white-space: nowrap;
    gap: 6px;
}

.cp-chips-input-area::-webkit-scrollbar {
  display: none;
}
.cp-selected-chip {
  display: inline-flex;
  align-items: center;
  background-color: #f1f3f4;
  color: #3c4043;
  border-radius: 10px;
  padding: 6px 10px;
  
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
  gap: 6px;
  line-height: 1em;
}

.cp-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
  font-size: 16px;
  height: 18px;
  width: 18px;
}
#cp-search-input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 20%;
  font-size: 15px;
  color: #333;
  padding: 6px 3px;
  margin: 0;
  height: auto;
}
.cp-search-clear {
  width: 30px;
  height: 30px;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  margin-left: 10px;
  border-radius: 50%;
  background: none;
  flex-shrink: 0;
}
.cp-search-clear:hover {
  background: rgba(25, 103, 210, 0.1);
}
.cp-search-clear[hidden] {
  display: none !important;
}
#cp-search-input::-webkit-search-decoration,
#cp-search-input::-webkit-search-cancel-button,
#cp-search-input::-webkit-search-results-button,
#cp-search-input::-webkit-search-results-decoration {
  display: none; 
}

/* ---------Suggestion panel Styling----------------- */

.cp-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 16px 16px;
  padding: 15px;
  z-index: 19;
  margin-top: -8px;
  max-height: 300px;
  overflow-y: auto;
  max-width: 100%;
  
}
.cp-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}
.cp-chip-option {
  background: #f1f3f4;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1em;
  font-weight: 500;
}

.cp-chip-option:hover {
  border-color: #dadce0;
}
.cp-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  display: inline-block;
}

/* ---------Tabs buttons Styling----------------- */

.cp-tabs-container {
  display: flex;
  gap: 15px;
  align-items: center;
  overflow-x: auto;
}
.cp-tabs-container::-webkit-scrollbar { display: none; }

.cp-tab-btn {
  background: none;
  border:solid 1px #e6eaec;
  border-radius: 10px;
  padding: 6px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cp-tab-btn .material-symbols-rounded {
    font-size: 18px;
    line-height: 1;
}

.cp-tab-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.cp-tab-btn.is-active {
  background: #CAFC00;
  color: #111827;
  border: solid 1px #CAFC00;
}

@media (max-width: 1024px) {
    
  .cp-topbar {
    gap: 15px;
    flex-direction: column; 
    align-items: stretch;
  }
  .cp-search { 
    width: 100%; 
    margin-right: 0;
  }
  .cp-tabs-container {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .cp-hero {
    padding: 24px 0;
  }

  .cp-topbar {
    margin-bottom: 24px;
  }

  .cp-search-suggestions {
    max-height: 200px;
  }

  .cp-search-clear {
    width: 36px;
    height: 36px;
  }
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* Optional: Add a subtle color flash to emphasize the rejection */
.shake-animation .like-icon {
    filter: drop-shadow(0 0 3px rgba(255, 59, 48, 0.6));
}