@use '../../../style/variables.scss';

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 20px 0;

  .onboardingSection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(237, 235, 239, 0.1);

    .sectionTitle {
      font-size: 14px;
      font-weight: 600;
      color: variables.$gray-600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
    }

    .onboardingOptions {
      display: flex;
      gap: 12px;

      .onboardingButton {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        background: variables.$darkgray-300;
        border: 1px solid variables.$purple-700;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        color: variables.$lightgray-200;
        transition: all 0.2s;

        .icon {
          font-size: 18px;
        }

        &:hover {
          background-color: variables.$purple-100;
          border-color: variables.$purple-500;
        }

        &:active {
          background-color: variables.$purple-200;
        }
      }
    }
  }

  .templatesSection {
    .sectionTitle {
      font-size: 14px;
      font-weight: 600;
      color: variables.$gray-600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 16px;
    }

    .cardsGrid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;

      @media (max-width: 600px) {
        grid-template-columns: 1fr;
      }

      .templateCard {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: variables.$darkgray-300;
        border: 1px solid rgba(237, 235, 239, 0.1);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        min-height: 70px;

        .cardIcon {
          font-size: 32px;
          width: 48px;
          height: 48px;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-shrink: 0;
        }

        .cardContent {
          flex: 1;
          min-width: 0;

          .cardTitle {
            font-size: 15px;
            font-weight: 600;
            color: variables.$lightgray-200;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .cardDescription {
            font-size: 13px;
            color: variables.$gray-500;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
          }
        }

        &:hover {
          background-color: variables.$purple-100;
          border-color: variables.$purple-500;
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(123, 70, 246, 0.15);

          .cardTitle {
            color: white;
          }

          .cardDescription {
            color: variables.$lightgray-200;
          }
        }

        &:active {
          background-color: variables.$purple-200;
          transform: translateY(0);
        }
      }
    }
  }

  .menuBlock {
    display: flex;
    flex-direction: column;
    width: 189px;
    border-radius: 8px;
    border: 1px solid variables.$purple-700;
    position: absolute;
    height: 70px;
    width: 190px;
    background-color: variables.$darkgray-300;
    padding: 6px 0px;
    top: 140px;
    right: -75px;
    z-index: 10;

    .menuItem {
      font-size: 16px;
      padding: 8px 8px 8px 20px;

      &:hover {
        background-color: variables.$black-400;
        transition: all 0.3s;
      }

      &:active {
        background-color: variables.$black-700;
        color: variables.$lightgray-200;
        transition: all 0.3s;
      }

      &:disabled {
        background-color: rgba(50, 50, 50, 0.6);
        color: variables.$gray-500;
        transition: all 0.3s;
      }
    }
  }

  .userBlock {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .dropdown {
      width: 20px;
      padding: 0px;
      background: none;
      border-radius: 0;
    }

    .userName {
      display: flex;
      align-items: center;
      column-gap: 8px;
    }
  }

  .editButtons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 8px;

    .editButton {
      width: 100%;
      border-radius: 10px;
    }
  }

  .editInput {
    font-size: 16px !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 12px;
    width: 100%;
  }

  .title {
    font-size: 16px !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 12px;
  }

  .date {
    margin-top: 4px;
    color: rgb(116, 116, 116);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
}
