.note-modal-content {
  padding: 0;

  .template-section {
    margin-top: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 16px;

    .add-template-btn {
      flex-shrink: 0;
      display: flex;
      box-sizing: border-box;
      min-height: 44px;
      padding: 4px 8px;
      justify-content: center;
      align-items: center;
      gap: 4px;
      border-radius: 10px;
      border: 1px solid #c3b2e7;
      background: #eee5ff;
      color: #7f56da;
      text-align: center;
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      white-space: nowrap;
      outline: none;

      &__icon {
        flex: none;
        font-size: 14px;
      }

      &:hover {
        background: #e4d6ff;
        border-color: #7f56da;
      }

      &:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(127, 86, 218, 0.2);
      }
    }

    .note-modal-templates-container {
      flex: 1;
      min-width: 0;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-scroll-snap-type: x mandatory;
      -ms-scroll-snap-type: x mandatory;
      scroll-snap-type: x mandatory;
      white-space: nowrap;
      position: relative;
      scroll-behavior: smooth;

      // 隐藏滚动条但保持滚动功能
      &::-webkit-scrollbar {
        display: none;
      }
      -ms-overflow-style: none;
      scrollbar-width: none;

      .note-modal-templates-scroll {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        width: max-content;
        min-width: 100%;

        .note-modal-template-tag {
          display: inline-flex;
          flex-shrink: 0;
          align-items: stretch;
          overflow: hidden;
          border-radius: 10px;
          border: 1px solid #7f56da;
          background: #fff;
          white-space: nowrap;

          color: #7f56da;
          text-align: center;
          font-size: 14px;
          font-weight: 600;

          .note-modal-template-use,
          .note-modal-template-delete {
            display: inline-flex;
            flex-shrink: 0;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            min-height: 44px;
            margin: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            cursor: pointer;

            &:focus-visible {
              outline: 2px solid #7f56da;
              outline-offset: -3px;
            }
          }

          .note-modal-template-use {
            min-width: 64px;
            padding: 8px 12px;

            &:hover,
            &:active {
              background: #eee5ff;
            }
          }

          .note-modal-template-text {
            display: inline-block;
            max-width: 20ch;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            word-break: keep-all;
            overflow-wrap: normal;
          }

          .note-modal-template-delete {
            min-width: 44px;
            padding: 0 16px;
            border-left: 1px solid #e4d6ff;
            color: #667085;

            &:hover,
            &:active {
              background: #fef3f2;
              color: #b42318;
            }

            svg {
              display: block;
              width: 16px;
              height: 16px;
            }
          }
        }
      }
    }
  }

  .template-delete-message {
    max-height: 160px;
    margin: 0 0 24px;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 22px;
  }

  .input-section {
    margin-bottom: 16px;
    padding: 13px 20px;
    border-radius: 10px;
    border: 1px solid #475467;

    .note-multilingual-input {
      width: 100%;

      .translation-wrapper {
        width: 100%;
      }

      .translation-wrapper > .translation-input {
        display: block;
        width: 100%;
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
        padding: 0 40px 0 0 !important;
        overflow-y: auto !important;
        border: 0;
        outline: 0;
        box-shadow: none;
        background: transparent;
        box-sizing: border-box;
        resize: none;

        &:focus,
        &:focus-within {
          border: 0;
          outline: 0;
          box-shadow: none;
        }
      }
    }

    .note-input {
      position: relative;
      display: block;
      height: 100px !important;
      max-height: 100px;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      resize: none;
      border: none;
      outline: none;
      padding: 0 !important;
      margin: 0;
      width: 100%;
      background: transparent;

      color: #000;
      font-size: 14px;
      font-weight: 400;
      line-height: 22px;

      textarea.pisell-lowcode-input {
        display: block;
        width: 100%;
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
        overflow-y: auto !important;
        resize: none;
        padding: 0 !important;
        border: none;
        outline: none;
        box-shadow: none;
        background: transparent;
        box-sizing: border-box;

        &:focus,
        &:focus-within {
          border: none;
          outline: none;
          box-shadow: none;
        }
      }

      &:focus,
      &:focus-within {
        border: none;
        outline: none;
        box-shadow: none;
      }
    }
  }

  .action-buttons {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;

    .delete-btn {
      width: 200px;
      height: 48px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 16px;

      .note-modal-delete-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        line-height: 1;

        svg {
          display: block;
        }
      }
    }

    .confirm-btn {
      width: 200px;
      height: 48px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 16px;
    }
  }
}

.template-modal-content {
  padding: 0;

  .template-input-section {
    display: flex;
    gap: 16px;
    align-items: flex-start;

    .template-input {
      height: 48px;
      flex: 1;
      display: flex;
      padding: 0 20px;
      align-items: flex-start;
      justify-content: center;
      gap: 4px;
      border-radius: 10px;
      border: 1px solid var(--Gray-600, #475467);
    }

    .template-confirm-btn {
      width: 136px;
      height: 48px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 16px;
    }
  }
}

.pisell-add-temp-modal .pisell-lowcode-modal-content {
  min-height: 132px !important;
}
