@import "../styles/animation.scss";

.template-page {
  height: 100%;
  display: flex;
  flex-direction: column;

  .template-page-body {
    padding: 20px;
    overflow-y: auto;

    .template-filter {
      width: 100%;
      max-width: 100%;
      margin-bottom: 20px;
      animation: slide-in ease 0.3s;
      height: 40px;

      display: flex;

      .search-bar {
        flex-grow: 1;
        max-width: 100%;
        min-width: 0;
      }

      .template-filter-lang {
        height: 100%;
        margin-left: 10px;
      }

      .template-create {
        height: 100%;
        margin-left: 10px;
        box-sizing: border-box;
        min-width: 80px;
      }
    }

    @media screen and (max-width: 700px) {
      .template-filter {
        margin-left: -10px;

        .search-bar {
          display: none;
        }
      }
    }

    .template-item-container {
      min-width: 400px;
    }

    .template-item {
      display: flex;
      justify-content: space-between;
      padding: 20px;
      border: var(--border-in-light);
      animation: slide-in ease 0.3s;

      &:not(:last-child) {
        border-bottom: 0;
      }

      &:first-child {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
      }

      &:last-child {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
      }

      .template-header {
        display: flex;
        align-items: center;

        .template-icon {
          display: flex;
          align-items: center;
          justify-content: center;
          margin-right: 10px;
        }

        .template-title {
          .template-name {
            font-size: 14px;
            font-weight: bold;
          }

          .template-info {
            font-size: 12px;
          }
        }
      }

      .template-actions {
        display: flex;
        flex-wrap: nowrap;
        transition: all ease 0.3s;
      }

      @media screen and (max-width: 600px) {
        display: flex;
        flex-direction: column;
        padding-bottom: 10px;
        border-radius: 10px;
        margin-bottom: 20px;
        box-shadow: var(--card-shadow);

        &:not(:last-child) {
          border-bottom: var(--border-in-light);
        }

        .template-actions {
          width: 100%;
          justify-content: space-between;
          padding-top: 10px;
        }
      }
    }
  }
}