/* ==========================================

   COLOR STORAGE PAGE CSS

=======================================*/

/* color storage page  */
.color-storage-section {
  position: relative;
  min-height: 100vh;
  height: auto;
  padding: 30px;
}
.color-storage-header{
  text-align: center;
}
.color-storage-section .back {
  /* position: absolute;
  top: 1rem;
  left: 2rem; */
  padding: 1rem;
  background: var(--brand-gradient);
  width: 10rem;
  text-align: center;
  font-size: 1.8rem;
  text-transform: capitalize;
  font-weight: 500;
  z-index: 120;
}

.color-storage-section .title h1 {
  font-size: 3rem;
  font-weight: 500;
  color: #222;
  text-transform: capitalize;
}

.color-storage-section .search-box {
  width: 40%;
  margin: 5rem auto;
}

.color-storage-section .search-box input {
  width: 100%;
  height: 4.5rem;
  padding: 1rem;
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 5px;
  font-size: 1.7rem;
  color: gray;
  outline: none;
}

.color-storage-section .search-box input:focus {
  border: 2px solid var(--yellow);
}

.color-storage-section .highlight {
  background-color: yellow;
  font-weight: bold;
  color: #fff;
  padding: 1rem;
}

.color-storage-section .highlighted-input {
  background-color: rgba(255, 215, 0, 0.5);
  /*Light yellow to indicate a match */
  color: #fff;
}

/* color sorting  */
.color-storage-section .sortOptions {
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.color-storage-section .sortOptions .btn {
  width: auto;
  background: #eee;
  color: gray;
  border-radius: 5px;
  padding: 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: capitalize;
}

.sortOptions {
  margin: 15px 0;
}

.sortOptions label {
  font-weight: 500;
  margin-right: 10px;
  font-size: 1.7rem;
}

.sortOptions select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  cursor: pointer;
  outline: none;
}

.sortOptions select:focus {
  border-color: var(--yellow);
  background-color: #fff;
}

.sortOptions option {
  padding: 10px;
}

/* General Layout for Two Columns */
.color-storage-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  /* Left for cards, right for details */
  justify-content: center;
  align-items: start;
  gap: 2rem;
  /* Spacing between columns */
  /* max-width: 1200px; */
  max-width: 100%;
  margin: 5rem auto;
  padding: 1rem;
  /* background: gold; */
}

/* Color Cards Column */
.color-cards-column {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* padding: 1rem; */
}

/* Details Column */
.details-column {
  width: 100%;
  /* background: #f4f4f4;
  padding:2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
  height: auto;
  /* Adjust height to content */
  /* background: red; */
}

/* Storage Details */
.details-card {
  position: relative;
  width: 100%;
  height: auto;
  background: var(--bg-white);
  /* background: green; */
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  /* text-align: center; */
  display: block;
  /*
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  */
}
.storage-details-card{
  text-align: center;
}

.details-card h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: #333;
  font-weight: 500;
  text-transform: capitalize;
}

.details-card p {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 400;
}

.details-card strong {
  font-weight: 500;
}

.details-card p .total {
  color: var(--green2);
  font-weight: 600;
}

.details-card p .total-points {
  color: var(--green2);
  font-weight: 500;
}

.details-card p .max-colors {
  color: red;
  font-weight: 500;
}

.add-color-btn {
  position: fixed;
  bottom: 1rem;
  right: 2rem;
  display: inline-block;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  font-size: 2rem;
  background: var(--brand-gradient);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.details-card .add-color-btn:hover {
  background-color: #218a44;
}

.details-card .btns {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  /* margin: 2rem 0; */
}

.details-card .btns .btn {
  padding: 1rem;
  width: 100%;
  border-radius: 5px;
  background: var(--yellow);
  font-size: 1.7rem;
  font-weight: 500;
  text-transform: capitalize;
  transition: 0.4s ease;
}

.details-card .btns .btn:hover {
  opacity: 0.8;
}

.details-card .btns .btn.payNow {
  background: var(--bg-green-500);
  color: #fff;
  margin-top: 1rem;
}



/* Color Cards Container */
.color-storage-container {
  display: grid;
  grid-template-columns: repeat(auto-fit,
      minmax(250px, 1fr));
  /* Ensures cards are responsive */
  grid-gap: 2rem;
  /* Spacing between cards */
  width: 100%;
}

/* Individual Color Card */
.color-storage-container .color-card {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
  text-align: center;
  padding: 15px;
}

.color-storage-container .color-box {
  position: relative;
  height: 18rem;
  border-bottom: 3px solid #f4f4f4;
  border-radius: 5px;
}

.color-storage-container .color-box .index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: #fff;
  font-size: 2rem;
}

.color-storage-container .color-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.color-storage-container .color-name-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.6rem;
  border: 1px solid var(--bd-silver-100);
  border-radius: 5px;
  text-align: center;
  margin-bottom: 10px;
}

.color-storage-container .color-code {
  color: var(--text-muted);
  font-size: 1.5rem;
}

.color-storage-container .color-code.highlight {
  background: dodgerblue;
  color: #fff;
  font-weight: 500;
}

.color-storage-container .color-btns {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 0;
}

.color-storage-container .copy-btn,
.color-storage-container .remove-btn {
  padding: 1rem;
  font-size: 1.6rem;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  outline: none;
  background: var(--color-card);
  box-shadow: 6px 6px 15px rgba(0, 0, 0, 0.2),
    -6px -6px 15px rgba(255, 255, 255, 0.2);
}

.color-storage-container .copy-btn {
  background-color: #4caf50;
  color: #fff;
}

.color-storage-container .remove-btn {
  background-color: #f37254;
  color: #fff;
}

/* Toast container */


/* Style for the dropdown */

.import-wrapper{
  width: 100%;
  /* margin-top: 1.5rem; */
  
}
.import-wrapper .importBtn{
  width: 100%;
  /* background: dodgerblue !important; */
}


/* ==========================================

   MODAL BOX

=======================================*/

.modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card-color);
  border-radius: 10px;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.2),
    -10px -10px 20px rgba(255, 255, 255, 0.2);
  transition: 0.5s ease-in-out;
}
/*
.success-modal{
  opacity: 1;
  visibility: visible;
}
*/
.success-modal .icon-box .icon{
  width: 6rem;
  height: 6rem;
}
.modal-box.active {
  opacity: 1;
  visibility: visible;
  background: #fff;
  z-index: 1002;
}

/*   */

.modal-box .modal-body h3 {
  font-size: 2rem;
  color: #222;
  text-transform: capitalize;
  font-weight: 500;
}

.modal-box .closeBox,
.modal-box .closeSuccessModal {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 3rem;
  color: tomato;
  cursor: pointer;
  transition: 0.4s;
}
.modal-box .closeSuccessModal .icon{
  width: 3rem;
  height: 3rem;
}
.modal-box .modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
}

.modal-box .modal-body .icon {
  font-size: 6rem;
  color: var(--green2);
}

.modal-box .modal-body p {
  text-align: center;
  font-size: 1.7rem;
  color: #555;
  font-weight: 400;
  margin: 1rem 0;
}

.addColorModal .modal-body .form-box {
  margin: 2rem 0;
  width: 100%;
}

.addColorModal .form-box .color-show {
  width: 15rem;
  height: 15rem;
  border-radius: 10px;
  background: #fad048;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 20px;
}

.addColorModal .form-box input {
  padding: 1rem;
  width: 100%;
  height: 4.5rem;
  letter-spacing: 1px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: none;
  border: 1.5px solid #ddd;
  outline: none;
  border-radius: 5px;
  color: #555;
  font-weight: 500;
}

.addColorModal .form-box input:focus {
  border: 1.5px solid var(--yellow);
}

.addColorModal .btns {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-gap: 2rem;
}

.addColorModal .btns button {
  width: 10rem;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 1rem;
  transition: 0.6s;
  font-size: 1.7rem;
  color: #fff;
  background: var(--yellow);
  border-radius: 5px;
}

.addColorModal .btns button:nth-child(1) {
  background: dodgerblue;
}

.addColorModal .btns button:nth-child(2) {
  background: var(--green2);
}

/* ------------------------------------ */

/* Modal overlay */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  opacity: 0;
  visibility: hidden;
  transition: .3s ease;
  
  z-index: 9999;
}

/* Show modal */
.confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Modal box */
.confirm-box {
  width: min(90%, 400px);
  padding: 25px;
  border-radius: 20px;
  
  background: #fff;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .15);
  
  transform: scale(.9);
  transition: .3s ease;
}

/* Animate box */
.confirm-modal.active .confirm-box {
  transform: scale(1);
}

/* Title */
.confirm-box h3 {
  margin: 0 0 10px;
  font-size: 1.8rem;
}

/* Message */
.confirm-box p {
  margin: 0;
  line-height: 1.6;
  color: #666;
  font-size: 1.6rem;
}

/* Buttons container */
.confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Buttons */
.confirm-buttons button {
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  transition: .2s;
}

/* Cancel */
.cancel-btn {
  background: #eee;
}

.cancel-btn:hover {
  transform: translateY(-2px);
}

/* Confirm */
.confirm-btn {
  background: #ff4d4d;
  color: white;
}

.confirm-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 1200px) {
  .color-storage-section .search-box {
    width: 60%;
  }
  
  .color-storage-layout {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 991px) {
  .modal-box {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .color-storage-section{
    padding: 20px;
  }
  .color-storage-section .search-box {
    width: 80%;
  }
  
  .color-storage-layout {
    max-width: 100%;
  }
  
  .modal-box {
    width: 70%;
  }
}

@media (max-width: 500px) {
  .color-storage-section{
    padding: 12px;
  }
  .color-storage-section .search-box {
    width: 100%;
  }
  
  .modal-box {
    width: 100%;
    max-width: 85vw;
  }
}