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

$text-muted: #6b6b6b;

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
}

.modalContent {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 1.8rem;
  position: relative;
  font-family: "Figtree" !important;
  animation: fadeIn 0.25s ease;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.08),
    0 20px 40px rgba(94, 56, 23, 0.08);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modalHeader {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  position: relative;

  h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: $text-dark;
  }

  p {
    font-size: 0.85rem;
    color: $text-muted;
  }
}

.closeBtn {
    position: absolute;
    top: 0;
    right: 0;

    width: 32px;
    height: 32px;

    border-radius: 50%;
    border: 1px solid $border;

    background: #ffffff;
    color: $text-light;

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

    cursor: pointer;

    transition: all 0.2s ease;

    &:hover {
      background: $primary-soft;
      color: $primary;
      transform: rotate(90deg);
    }
  }

.modalForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;

  label {
    font-size: 0.8rem;
    font-weight: 600;
    color: $text-dark;
  }

  input,
  select, textarea {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    background: #fafafa;
    color: $text-dark;

    transition: all 0.2s ease;

    &:hover {
      background: #fff;
      border-color: #d6c2aa;
    }

    &:focus {
      outline: none;
      border-color: #7a4b20;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(122, 75, 32, 0.08);
    }
  }

  textarea {
    height: 6rem;
  }
}

.error {
  color: #dc2626;
  font-size: 0.75rem;
}

.submitBtn {
  margin-top: 0.5rem;
  background: $green;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-weight: 600;
  cursor: pointer;

  transition: all 0.2s ease;

  &:hover {
    background: $text-dark;
  }

  &:active {
    transform: scale(0.98);
  }

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

/* MOBILE */
@media (max-width: 768px) {
  .modalContent {
    padding: 1.5rem;
  }
}