/* Toast (Alert) card styles */

.card {
  width: 300px;
  max-width: 90vw;
  height: 150px;
  background: #f3f3f3;
  border-radius: 15px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  margin: 0 auto;
  padding: 0 10px;
  backdrop-filter: blur(10px);
  z-index: 1000;
  font-family: "Yekan Bakh FaNum" , -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* border: 1px solid #eee; */
  border: none;
}

.card-wrapper {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  height: 100%;
}

.card-icon {
  width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon .icon-cart-box {
  background-color: #1a1a1a2f;
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* When a product image is shown, let it fill the circle (no dark tint). */
.card-icon .icon-cart-box--image {
  background-color: transparent;
  overflow: hidden;
}

.card-icon .icon-cart-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.card-content {
  width: 80%;
  padding-left: 10px;
}

.card-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 5px;
}

.card-title {
  font-size: 1em;
  font-weight: 600;
  color: #111111;
}

.card-action {
  width: 5%;
  text-align: left;
}

.card-action svg {
  cursor: pointer;
  fill: rgba(0, 0, 0, 0.2);
  transition: 0.3s ease-in-out;
}

.card-action svg:hover {
  fill: rgba(0, 0, 0, 0.6);
}

.product-name {
  font-size: 0.8em;
  color: #2c2c2c;
  margin-bottom: 4px;
}

.product-name:hover {
  cursor: pointer;
  color: #444444;
  text-decoration: underline;
}

.product-price {
  font-size: 0.9em;
  font-weight: 600;
  color: #111111;
  margin-bottom: 8px;
}

.button {
  position: relative;
  transition: all 0.3s ease-in-out;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  padding-block: 0.5rem;
  padding-inline: 1.25rem;
  background-color: rgb(5, 5, 5);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffff;
  gap: 10px;
  font-weight: bold;
  outline: none;
  overflow: hidden;
  font-size: 15px;
  cursor: pointer;
  height: 35px;
  width: fit-content;
}

.icon {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease-in-out;
}

/* The arrow used to sit in the flex flow, so the label was only centred as
   part of a label+arrow group — visibly off-centre in the pill. Pull the arrow
   out of the flow (it keeps its trailing side) and hold the padding symmetric,
   so the label is centred on the pill itself. */
.card .button {
  padding-inline: 2.25rem;
}

.card .button .button-label {
  flex: 1 1 auto;
  text-align: center;
}

.card .button .icon {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  translate: 0 -50%;
}

.button:hover {
  transform: scale(1.05);
  border-color: #fff9;
}

.button:hover .icon {
  transform: translate(4px);
}

.button:hover::before {
  animation: shine 1.5s ease-out infinite;
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100px;
  width: 120px; /* a bit wider so it covers the whole pill */
  height: 100%;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 1),   /* make this fully white */
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0.9;               /* stronger so you can see it */
  z-index: 1;
}

@keyframes shine {
  0%   { left: -120px; }
  60%  { left: 100%; }
  100% { left: 100%; }
}
