@use "../../../styles/abstracts/variables" as *;
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&display=swap');


.modalBackdrop {
  position: fixed;
  inset: 0;

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

  padding: 1rem;

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

  z-index: 9999;
}

/* ===============================
   MODAL
=============================== */

.modalContent {
  width: 100%;
  max-width: 480px;

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

  padding: 1.7rem;

  border: 1px solid $border;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.04);

  font-family: "Figtree", sans-serif;
}

/* ===============================
   HEADER
=============================== */

.modalHeader {
  margin-bottom: 1.4rem;
  position: relative;

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

  p {
    font-size: 0.85rem;
    color: $text-light;
    margin-top: 0.3rem;
  }

  .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;
    }
  }
}

/* ===============================
   FORM
=============================== */

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

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

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

  input,
  textarea,
  select {
    width: 100%;

    padding: 0.65rem 0.75rem;

    border-radius: 10px;
    border: 1px solid $border;

    font-size: 0.85rem;

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

    transition: all 0.2s ease;

    &::placeholder {
      color: $text-light;
    }

    &:focus {
      outline: none;
      border-color: $primary-border;
      box-shadow: 0 0 0 3px rgba(122, 75, 32, 0.12);
    }
  }

  textarea {
    resize: none;
  }


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

/* ===============================
   INFO BOX (PREMIUM)
=============================== */

.infoBox {
  display: flex;
  gap: 10px;

  padding: 0.8rem;

  border-radius: 12px;

  background: $primary-soft;
  border: 1px solid $primary-border;

  margin-top: 0.3rem;
}

.infoIcon {
  width: 28px;
  height: 28px;

  border-radius: 8px;

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

  background: rgba(122, 75, 32, 0.12);
  color: $primary;

  font-size: 0.9rem;
}

.infoContent {
  display: flex;
  flex-direction: column;

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

  p {
    font-size: 0.75rem;
    color: $text-light;
    line-height: 1.4;
  }
}


/* ===============================
   SEARCH BOX
=============================== */

.searchBox {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  width: 100%;

  padding: 0.65rem 0.75rem;

  border-radius: 10px;
  border: 1px solid $border;

  background: #ffffff;

  transition: all 0.2s ease;

  /* subtle depth */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);

  svg {
    font-size: 0.9rem;
    color: $text-light;
    flex-shrink: 0;
  }

  input {
    border: none;
    outline: none;
    flex: 1;

    font-size: 0.85rem;
    color: $text-dark;

    background: transparent;

    &::placeholder {
      color: $text-light;
    }
  }

  &:hover {
    border-color: $primary-border;
  }

  &:focus-within {
    border-color: $primary-border;
    box-shadow: 0 0 0 3px rgba(122, 75, 32, 0.12);
  }
}

/* ===============================
   BUTTON
=============================== */

.submitBtn {
  margin-top: 0.5rem;

  width: 100%;

  padding: 0.7rem;

  border-radius: 12px;
  border: none;

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

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

  cursor: pointer;

  transition: all 0.25s ease;

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(122, 75, 32, 0.25);
  }

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

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 600px) {
  .modalContent {
    padding: 1.3rem;
    border-radius: 14px;
  }

  .modalHeader h2 {
    font-size: 1.05rem;
  }

  .modalHeader p {
    font-size: 0.8rem;
  }

  .formGroup input,
  .formGroup select,
  .formGroup textarea {
    font-size: 0.82rem;
    padding: 0.6rem;
  }

  .submitBtn {
    font-size: 0.82rem;
    padding: 0.65rem;
  }
}

@media (max-width: 400px) {
  .modalContent {
    padding: 1.1rem;
  }
}