@use "../../../styles/abstracts/variables" as *;
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

/* ================= BACKDROP ================= */
.modalBackdrop {
  position: fixed;
  inset: 0;
  font-family: "Figtree" !important;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);

  z-index: 9999;
  padding: 1rem;

  animation: fadeIn 0.25s ease;
}

/* ================= MODAL ================= */
.modalContent {
  width: 100%;
  max-width: 420px;

  background: #ffffff;
  border-radius: 16px;

  padding: 1.8rem 1.6rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  border: 1px solid $border;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.06);

  animation: popIn 0.25s ease;
}

/* ================= CONFIRM ICON ================= */
.iconWrapper {
  width: 50px;
  height: 50px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 0.9rem;

  position: relative;
  overflow: hidden;

  /* 🔥 soft success background (brand aligned) */
  background: linear-gradient(
      135deg,
      rgba(94, 56, 23, 0.12),
      rgba(122, 75, 32, 0.08)
    );

  border: 1px solid rgba(122, 75, 32, 0.18);

  box-shadow:
    0 10px 25px rgba(122, 75, 32, 0.12),
    inset 0 0 0 1px rgba(255,255,255,0.4);

  transition: all 0.3s ease;

  /* subtle glow pulse */
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(122, 75, 32, 0.25),
      transparent 70%
    );
    opacity: 0;
    transition: 0.4s ease;
  }

  svg {
    font-size: 1.6rem;
    color: $primary; // 🔥 your brand color
    transition: transform 0.3s ease;
  }

  /* hover = premium feedback */
  &:hover {
    transform: scale(1.05);

    box-shadow:
      0 14px 35px rgba(122, 75, 32, 0.2),
      inset 0 0 0 1px rgba(255,255,255,0.6);

    &::after {
      opacity: 1;
    }

    svg {
      transform: scale(1.1);
    }
  }
}

/* ================= TEXT ================= */
.title {
  font-size: 1.15rem;
  font-weight: 700;
  color: $text-dark;
  margin-bottom: 0.3rem;
}

.message {
  font-size: 0.9rem;
  color: $text-light;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ================= ACTIONS ================= */
.actions {
  width: 100%;
  display: flex;
  gap: 0.7rem;
}

/* ================= BUTTONS ================= */
.cancelBtn {
  flex: 1;

  padding: 0.7rem;
  border-radius: 10px;

  border: 1px solid $border;
  background: #fff;

  font-weight: 600;
  font-size: 0.85rem;

  color: $text-dark;

  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: $bg-soft;
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}

.confirmBtn {
  flex: 1;

  padding: 0.7rem;
  border-radius: 10px;

  border: none;

  background: linear-gradient(135deg, $primary, $primary-2);
  color: #fff;

  font-weight: 600;
  font-size: 0.85rem;

  cursor: pointer;
  transition: all 0.25s ease;

  box-shadow: 0 8px 18px rgba(122, 75, 32, 0.25);

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(122, 75, 32, 0.3);
  }

  &:disabled {
    background: $primary-soft;
    color: $text-light;
    cursor: not-allowed;
    box-shadow: none;
  }
}

/* ================= ANIMATION ================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .modalContent {
    padding: 1.4rem 1.2rem;
    border-radius: 14px;
  }

  .actions {
    flex-direction: column;
  }

  .cancelBtn,
  .confirmBtn {
    width: 100%;
  }
}

/* 🔥 Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 🔥 Button loading state */
.loadingBtn {
  opacity: 0.8;
  cursor: not-allowed;
}

/* 🔥 Align spinner + text */
.loadingContent {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 🔥 Backdrop subtle lock */
.loadingBackdrop {
  cursor: not-allowed;
}