@use "../../../../../styles/abstracts/variables";
@use "../../../../../styles/abstracts/mixins";

.update {
  background: rgba(0, 0, 0, 0.9);
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 2rem 1rem;

  &__content {
    max-width: 550px;
    width: 100%;
    background: #1e1e1e;
    border-radius: 0.6rem;
    padding: 2rem;
    color: variables.$col-white;
    position: relative;
    margin: 4rem auto;
    animation: slideUp 0.3s ease forwards;

    @media (max-width: 768px) {
      padding: 1.5rem;
    }

    &--close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: variables.$col-danger-bg;
      color: variables.$col-danger-color;
      padding: 0.35rem 0.6rem;
      border-radius: 4px;
      cursor: pointer;
      font-weight: 600;
      font-size: 0.8rem;
      transition: opacity 0.2s ease;

      &:hover {
        opacity: 0.85;
      }
    }

    &--details {
      &--header {
        &--helper {
          background: variables.$col-orange;
          margin-bottom: 1rem;
          max-width: 28%;
          padding: 0.4rem 0.3rem;
          border-radius: 50px;
          color: variables.$col-dark;
          font-size: 0.75rem;
          font-weight: 500;
          text-align: center;
        }

        h2 {
          font-size: 1.1rem;
          font-weight: 500;
          color: variables.$col-white;
        }

        p {
          font-size: 0.85rem;
          opacity: 0.9;
          line-height: 1.6;
          padding-bottom: 1.5rem;
        }
      }

      form {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        label {
          font-size: 0.85rem;
          font-weight: 600;
          margin-bottom: 0.3rem;
        }

        input,
        select {
          width: 100%;
          background: #252525;
          border: 1px solid #333;
          border-radius: 6px;
          padding: 0.6rem 0.8rem;
          color: variables.$col-white;
          font-size: 0.9rem;
          outline: none;

          &:focus {
            border-color: variables.$col-orange;
          }
        }

        button {
          background: variables.$col-orange;
          color: variables.$col-dark;
          font-weight: 600;
          font-size: 0.9rem;
          padding: 0.8rem;
          border-radius: 8px;
          transition: 0.2s ease;

          &:hover {
            opacity: 0.9;
          }

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

        .error {
          color: variables.$col-danger-color;
          font-size: 0.75rem;
          margin-top: 0.2rem;
        }
      }
    }
  }
}

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